PDA

View Full Version : Guests viewing avatars....


martinh4
09-20-2004, 01:24 PM
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
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

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

replace with

// 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