PDA

View Full Version : Banned usergroup default avatar


craiovaforum
08-04-2007, 06:19 PM
How do I set a default avatar for the banned usergroup?
Is there any way to do this?
After the user is banned to modify his avatar with a default one.

Gray Matter
08-04-2007, 09:01 PM
In postbit or postbit_legacy, find:

<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>and replace it with:

<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="<if condition="$post[usergroupid]==9">images/avatars/banned.gif"<else />$post[avatarurl]" $post[avwidth] $post[avheight]</if> alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>Change the red number to your banned usergroup's ID and the green URL to the URL of the avatar. Hope this works for you. :)

(Also, remember that this will only affect the avatars within posts, not within member profiles or any other part of the board. You will have to edit those manually if you wish to change them as well.)

craiovaforum
08-05-2007, 12:24 AM
thanks, it works but I have some problem with the size of the image, it shows up like the original avatar of the person.

Gray Matter
08-05-2007, 01:08 AM
Sorry, I failed to take that into account. I've edited the code I wrote in my original post and it should work fine now. :)

Spermy
08-21-2007, 06:22 PM
How would you do it to have 2 different usergroups with 2 different pictures?

Reeve of shinra
08-21-2007, 07:25 PM
<if condition="$show['avatar']">

<if condition="$post[usergroupid]==9>
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]">
<img src="images/avatars/banned.gif"></a>
</td>

<else />

<if condition="$post[usergroupid]==10>
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]">
<img src="images/avatars/banned.gif"></a>
</td>

<else />

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

wally
08-09-2009, 06:09 PM
doesnt work in vb3.7.4 (i know old topic)

anyone a idea how to get this working in vb3.7.4 (or in 3.8.x)?