vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Avatar Taken Hack (https://vborg.vbsupport.ru/showthread.php?t=32114)

Littlebit 11-04-2001 03:13 PM

I added the modify avatarbit taken template and changes to version 2.03...I just upgraded to 2.20 and need to make some modifications to have the avatars taken option work with the new registration pick avatar option ( was glad to see that in the update!). Could someone give me a hand? I still have the modify avatarbit taken template and I made the old change in the member.php already...hope it was okay to do it in the new ver.2.20 member.php.
:surprised

Neo 11-05-2001 03:24 AM

hey hey, where is this hack, i saw it now i can find it..

Littlebit 11-06-2001 03:49 PM

This was thanks to Firefly and it was for version 2.03
Quote:

In member.php, replace this code:
code:
------------------------------------------------------------------------
eval("\$avatarlist .= \"".gettemplate("modifyavatarbit")."\";");[/php]
with this:
[code] if ($istaken=$DB_site->query_first("SELECT userid FROM user WHERE avatarid='$avatarid'")) {
eval("\$avatarlist .= \"".gettemplate("modifyavatarbit_taken")."\";") ;
} else {
eval("\$avatarlist .= \"".gettemplate("modifyavatarbit")."\";");
}
------------------------------------------------------------------------
Now create a new template, name it modifyavatarbit_taken, and use this:
code:
------------------------------------------------------------------------
<td bgcolor="#13486D" valign="bottom" align="center"><normalfont>
Taken! <img src="$avatar[avatarpath]">
<br>$avatar[title]</normalfont></td>
------------------------------------------------------------------------
I have made these same changes in version 2.20, just need some help modifying the new avatar additions to 2.20 as well.



:)

Admin 11-06-2001 04:01 PM

Littlebit, can you maybe post the URL to your forum so I can see the new system and learn it?
As we don't offer our own avatars here, and I don't have any other forum, I have no idea how it looks like / works. :)
You can PM me if you wish.

Admin 11-06-2001 04:52 PM

Try this. :)

In register.php, replace this:
Code:

        if (!$avatar['title']) {
                  $avatar['title'] = $avatar['avatarpath'];
                  if (strstr($avatar['title'], '/')) {
                    $avatar['title'] = substr( strrchr($avatar['title'], '/') , 1);
                  }
                  $avatar['title'] = str_replace('_', ' ', $avatar[title]);
                  $dotpos = strrpos($avatar[title], '.');
                  $avatar[title] =  substr($avatar[title], 0, $dotpos);
        }
        eval("\$avatarbits .= \"".gettemplate("register_avatarbit")."\";");

with this:
Code:

        if (!$istaken=$DB_site->query_first("SELECT userid FROM user WHERE avatarid='$avatar[avatarid]'")) {
          if (!$avatar['title']) {
                    $avatar['title'] = $avatar['avatarpath'];
                    if (strstr($avatar['title'], '/')) {
                      $avatar['title'] = substr( strrchr($avatar['title'], '/') , 1);
                    }
                    $avatar['title'] = str_replace('_', ' ', $avatar[title]);
                    $dotpos = strrpos($avatar[title], '.');
                    $avatar[title] =  substr($avatar[title], 0, $dotpos);
          }
          eval("\$avatarbits .= \"".gettemplate("register_avatarbit")."\";");
        }

this should work. :)

Neo 11-06-2001 04:59 PM

so umm... which code should i use?

Littlebit 11-06-2001 05:07 PM

Firefly,
I just uploaded changes to the register.php. Opps..I got this:
Parse error: parse error in register.php on line 659

Admin 11-06-2001 05:10 PM

Littlebit, I'm getting a parse error when trying to go to register.php.
Are you sure you did everything correctly?

neo, the last code is for us in register.php, to hide taken avatars.
What Littlebit posted above is for member.php.

Admin 11-06-2001 05:14 PM

If you want you can send me your register.php attached in an e-mail (firefly@poolie.net) and I'll get it taken care of.

Littlebit 11-06-2001 05:17 PM

Did I miss a { or something maybe? I copied a few extra lines for you to see also..here's my code:

if (!$istaken=$DB_site->query_first("SELECT userid FROM user WHERE avatarid='$avatar[avatarid]'")) {
if (!$avatar['title']) {
$avatar['title'] = $avatar['avatarpath'];
if (strstr($avatar['title'], '/')) {
$avatar['title'] = substr( strrchr($avatar['title'], '/') , 1);
}
$avatar['title'] = str_replace('_', ' ', $avatar[title]);
$dotpos = strrpos($avatar[title], '.');
$avatar[title] = substr($avatar[title], 0, $dotpos);
}
eval("\$avatarbits .= \"".gettemplate("register_avatarbit")."\";");
}
eval("\$avatarbit = \"".gettemplate("register_avatar")."\";");
}
}

if ($who=="adult") {


All times are GMT. The time now is 01:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01126 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete