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)
-   -   Default Avatar if None is Selected (https://vborg.vbsupport.ru/showthread.php?t=44829)

GuruXL 10-20-2002 10:00 PM

Default Avatar if None is Selected
 
Please note I will NOT provide support for this hack as it is not mine, I am posting it because I made a request for it and I thought it would be nice to be available for those who wanted to use it. I made one small modification to it but other than that its Copyright 2002 to Neo.

FIND In admin/functions.php

PHP Code:

        if ($post[avatarid]!=0) {
            
$avatarurl=$post[avatarpath];
        } else {
            if (
$post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
            } else {
                
$avatarurl="";
            }
        }
        if (
$avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        } 

AND REPLACE WITH

PHP Code:

        if ($post[avatarid]!=0) {
            
$avatarurl=$post[avatarpath];
        } else {
            if (
$post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
            } else {
                
$avatarurl="http://www.domain.com/forum/images/avatars/default.gif";
            }
        }
        if (
$avatarurl=="" or ($bbuserinfo[userid]>and !($bbuserinfo[showavatars]))) {
            
$post[avatar]="http://www.domain.com/forum/images/avatars/default.gif";
        } else {
            eval(
"\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
        } 

Now you will see that part that I edited. The blank $avatarurl.
Now you can change the path within the one that contains $avatarurl="http://www.domain.com/forum/images/avatars/default.gif"; to any path you want. Just dont touch the other two with parses the avatars on the site.


Thanks again Neo and also hellsatan for his nice input!

Neo 10-21-2002 09:18 PM

Thanks for the recognition.

AviationForum 10-22-2002 07:50 PM

*Installed* :)

sasjamal 10-25-2002 06:35 PM

It does not work on 2.28?

Chris M 10-25-2002 06:42 PM

It should do:)

Satan

NTLDR 10-25-2002 07:09 PM

No reason for it not to work with 2.2.8, however this only covers the postbit and not the numerous other places avatars appear.

sauron2002 11-09-2002 06:40 AM

works for me on 2.2.8 on posts, anit checked other parts

OmaniMan 05-07-2003 03:49 AM

Great Friends

nnjj.net 05-07-2003 04:29 AM

work greaaaaaaaat thanx :)

Dean C 05-07-2003 03:41 PM

Ok i know this is a really old hack but if the author is still around please update the first post and put the hack instructions in a textfile :)

Thanks

- miSt

Erwin 05-08-2003 09:49 AM

Guests cannot see contents of [php] and [code] tags in any case. :) But it is recommended to put instructions in a text file.

lordofgun 05-27-2003 01:25 AM

This works well unless you turn avatars off in your profile. Then it shows the link to the avatar and takes up half the width of the page. :D

Any fix??


All times are GMT. The time now is 04:43 PM.

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.01117 seconds
  • Memory Usage 1,753KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete