The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Banned usergroup default avatar
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. |
#2
|
|||
|
|||
In postbit or postbit_legacy, find:
Code:
<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>
Code:
<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>
(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.) |
#3
|
||||
|
||||
thanks, it works but I have some problem with the size of the image, it shows up like the original avatar of the person.
|
#4
|
|||
|
|||
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.
|
#5
|
|||
|
|||
How would you do it to have 2 different usergroups with 2 different pictures?
|
#6
|
||||
|
||||
HTML Code:
<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> |
#7
|
||||
|
||||
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)? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|