The Arcive of vBulletin Modifications Site. |
|
|
[TIP] Bandwidth savings tip
For those of us with big boards, and with avatars enabled, here is a small piece of code I added to my postbit (in my case postbit_legacy) template, which makes it so that guests do not see avatars. FIND: ------ <if condition="$show['avatar']"> ABOVE ADD: ------------ <if condition="is_member_of($bbuserinfo, 1)"> <else /> THEN FIND (couple lines down): ------------------------------- </div> </if> BELOW ADD: ------------- </if> thats it... simple yet effective. |
|
#2
|
||||
|
||||
|
Very cool
|
|
#3
|
|||
|
|||
|
Nice. Thanks.
In my postbit if I add the </if> where you suggest it hides all data on left. Adding the </if> just after; PHP Code:
|
|
#4
|
||||
|
||||
|
and if you have avatar categories, make all the images hosted in other servers so that the main forum is faster and lighter
|
|
#5
|
||||
|
||||
|
u can just wrap the code in <if condition="$show['member']"></if>
to be : Code:
<if condition="$show['member']"> <if condition="$show['avatar']"><td class="alt2"><a rel="nofollow" href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> </if> |
|
#6
|
||||
|
||||
|
I even developed a better looking and band width saving one :
Find and replace : Code:
<if condition="$show['avatar']"><td class="alt2"><a rel="nofollow" href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> Code:
<!-- 100fm6.com BW save --> <if condition="$show['member']"> <if condition="$show['avatar']"><td class="alt2"><a rel="nofollow" href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> <else /> <if condition="!$GLOBALS['FIRSTPOSTID']"> <if condition="$show['avatar']"><td class="alt2"><a rel="nofollow" href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> </if> <!-- /100fm6.com BW save --> 1- for members show avatars as normal 2- for visitors show avatars in first post only like it? |
![]() |
|
|