PDA

View Full Version : Only show Avatars in X forum/s!


Diana Notacat
09-12-2008, 02:17 AM
I tried searching, and tried using conditionals, but I haven't fond anything that works. So if anyone could point me in the right direction or whip something up, I'd really appreciate it!

Lynne
09-12-2008, 02:23 AM
What conditions have you already tried? You should be able to put one around the avatar in the postbit(_legacy) pretty easily.

Diana Notacat
09-12-2008, 02:40 AM
I'm trying at the moment:

<if condition="$foruminfo['forumid'] == 3">

<if condition="$show['avatar']"><td class="alt2"><a 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>

And it's not displaying. I do have avatars turned on and enabled, so I think I'm getting the wrong conditional...

Lynne
09-12-2008, 02:45 AM
How about $threadinfo[forumid] instead (I don't think you need the single apostrophe's in there).

Diana Notacat
09-12-2008, 03:09 AM
I got it! I used this code here:

<if condition="$forum[forumid] == 3">

<if condition="$show['avatar']"><td class="alt2"><a 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>

Thanks for your help! I wouldn't have thought to change the $condition part!

[EDIT] And in case anyone else needs it... To do it in multiple forums! These are both in the [postbit] template!

<if condition="in_array($forum[forumid], array(x,x,x))">

<if condition="$show['avatar']"><td class="alt2"><a 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>