vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Guests viewing avatars.... (https://vborg.vbsupport.ru/showthread.php?t=69668)

martinh4 09-20-2004 01:24 PM

Guests viewing avatars....
 
There was a hack to stop guest from viewing Avatars and sigs. I have searched and searched but can't find it. Can anyone point me in the right direction?

Zachery 09-20-2004 01:37 PM

Quote:

Originally Posted by martinh4
There was a hack to stop guest from viewing Avatars and sigs. I have searched and searched but can't find it. Can anyone point me in the right direction?

In the postbit template find

<if condition="$show['avatar']">

Change it to

<if condition="$show['avatar'] AND $bbuserinfo[userid] != 0">

Now find

<if condition="$post['signature']">

Replace with

<if condition="$post['signature'] AND $bbuserinfo[userid] != 0">


Save and enjoy

martinh4 09-21-2004 12:50 AM

Thank's Zachery, life saver!! :)

hidjra 04-18-2006 07:43 PM

I'm also interrested in this mod, but is there a way to also limit the querying of the avatar from the database for guests. Cause this template-mod only disables the displaying of the avatar (which offcourse saves some bandwith), but if you don't query the avatar at all it may gain some performance. Especially for people using multiple servers set-ups (like me).

Grtz,
Hidjra

Just figured it out

in file 'class_postbit.php' around line 559 look for

PHP Code:

$this->post['avatarurl'] = 'image.php?' $this->registry->session->vars['sessionurl'] . 'u=' $this->post['userid'] . '&amp;dateline=' $this->post['avatardateline']; 

replace with

PHP Code:

// begin avatar mod/hack
                  
if($this->registry->userinfo['userid']>0)
                    {
                      
$this->post['avatarurl'] = 'image.php?' $this->registry->session->vars['sessionurl'] . 'u=' $this->post['userid'] . '&amp;dateline=' $this->post['avatardateline'];
                    }
                    
// end avatar mod/hack 

Grtz,
Hidjra


All times are GMT. The time now is 07:53 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.01066 seconds
  • Memory Usage 1,728KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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