vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Guest & No avatar Hack re-visited and better then ever (https://vborg.vbsupport.ru/showthread.php?t=33310)

LuBi 12-18-2001 03:48 AM

Does anyone think they could put the code together so that members who do not have an avatar secleted when they post it will show the no avatar selected avatar. Also when guests post on the forum as their avatar it shows the guest avatar? I know this doesn'tm ake much sense but I'm very tired, any help would be great, I know this will not be great for bandwith but please. Thanks! ;)

Admin 12-18-2001 12:01 PM

In functions.php, find this:
Code:

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

and add the path to the new avatar in the $avatarurl="" statement (between the " and ").

Now replace this:
Code:

                $post[posts]="N/A";

                $post[avatar]="";

with this:
Code:

                $post[posts]="N/A";

                $avatarurl="[high]your avatar url![/high]";
                if ($avatarurl=="" or ($bbuserinfo[userid]>0 and !($bbuserinfo[showavatars]))) {
                        $post[avatar]="";
                } else {
                        eval("\$post[avatar] = \"".gettemplate("postbit_avatar")."\";");
                }


LuBi 12-18-2001 03:08 PM

Thanks Chen! I'll try it out right away! Thanks Again!

LuBi 12-18-2001 03:17 PM

Ok well it worked great, but when a guest goes to post it still has options to email them and add sig, how can I remove those from postbit if it's a guest? what code would that take. Or should I post another request cause you have helped me already, and thanks Chen! your always a great help.

Admin 12-18-2001 03:33 PM

It shouldn't show these links - was it that way even before you applied this hack?

LuBi 12-18-2001 03:47 PM

I never looked at it nor allowed guests to post on my board. So when I went I was surprised to see those there because they have no email on the board entered nor would they have a signature.


All times are GMT. The time now is 06:38 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.01056 seconds
  • Memory Usage 1,716KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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