vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Custom Avatars as Files (updated for vBulletin 2.2.2) (https://vborg.vbsupport.ru/showthread.php?t=11760)

dost 09-21-2001 02:44 PM

two days passed :P how is it going?

Cocomiel 09-21-2001 05:50 PM

you should look here :


http://www.vbulletin.com/forum/showt...threadid=28337

DarkReaper 11-02-2001 02:28 AM

How can I get this to work with 2.2.0?

psico 11-03-2001 09:33 AM

Not work with 2.2.0 !!!!

this code not exist!!!

showthread.php
and
private.php
and
announcement.php find this:

if ($post[hascustomavatar] and $avatarenabled) {
$avatarurl="avatar.php?s=$session[sessionhash]&userid=$post[userid]";
replace with this:

if ($post[hascustomavatar] and $avatarenabled) {
if ($usefileavatar) $avatarurl="custom_avatars/avatar$post[userid]_$post[avatarrevision].gif";
else $avatarurl="avatar.php?userid=$post[userid]";

Cocomiel 11-03-2001 02:38 PM

This hack was for 2.0, i dont have idea why they put 2.2.0

eva2000 11-03-2001 02:42 PM

must of been devine intervention since twice i tried to install this hack and when i read this thread my browser frooze and forced me to reboot my pc :)

eg_92901 11-15-2001 05:19 PM

Is this supported on vBulletin 2.2.0? I see different code than what is in the instructions for the function.php file.

ladyfyre 11-30-2001 02:49 AM

I would also be quite interested in the answer to that question :)

Since our database is already over 300MB it takes FOREVER to do a dump.sql file, and i will have to move to another server AGAIN in a few days, since we are finally ready to ship our colo box.

SirSteve 12-02-2001 10:41 PM

What about 2.2.1?

bira 12-03-2001 12:03 AM

OK, for those wishing to install this in 2.2.1:

Follow the instructions in post #1 except for the following change:

the instructions for file admin/functions.php should be:

Quote:

Find:

PHP Code:

// ###################### Start getavatarurl #######################
function getavatarurl($userid) {
  global 
$DB_site,$session;

  if (
$avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
                                         FROM user
                                         LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                         LEFT JOIN customavatar ON customavatar.userid=user.userid
                                         WHERE user.userid='
$userid'")) {
    if (
$avatarinfo[avatarpath]!="") {
      return 
$avatarinfo[avatarpath];
    } else if (
$avatarinfo['hascustom']) {
      return 
"avatar.php?userid=$userid&dateline=$avatarinfo[dateline]";
    } else {
      return 
'';
    }
  }


Replace with:

PHP Code:

// ###################### Start getavatarurl #######################
function getavatarurl($userid) {
  global 
$DB_site,$session$usefileavatar;

  if (
$avatarinfo=$DB_site->query_first("SELECT user.avatarid,avatarpath,avatarrevision,NOT ISNULL(avatardata) AS hascustom,customavatar.dateline
                                         FROM user
                                         LEFT JOIN avatar ON avatar.avatarid=user.avatarid
                                         LEFT JOIN customavatar ON customavatar.userid=user.userid
                                         WHERE user.userid='
$userid'")) {
    if (
$avatarinfo[avatarpath]!="") {
      return 
$avatarinfo[avatarpath];
    } else if (
$avatarinfo['hascustom']) {
        if (
$usefileavatar) {
            return 
"custom_avatars/avatar$userid"."_$avatarinfo[avatarrevision].gif";
        } else {
            return 
"avatar.php?userid=$userid";
        }
    } else {
      return 
'';
    }
  }


Find:

PHP Code:

            if ($post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]"

Replace with:

PHP Code:

            if ($post[hascustomavatar] and $avatarenabled) {
                   if (
$usefileavatar) {                   
                       
$avatarurl="custom_avatars/avatar$post[userid]_$post[avatarrevision].gif";
                } else {
                    
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
                } 


And, no changes should be made to showthread.php.


That's it. All other instructions remain the same.

Cheers,

Bira


All times are GMT. The time now is 11:02 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.01173 seconds
  • Memory Usage 1,762KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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