The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Disable avatars for a specific user(s)
I have avatars enabled but as always there are the problem few who choose inappropriate avatars. Is there any way (short of messing with usergroups) to disable avatars for a specific user(s)? Specifically I would like a "user may not use an avatar" checkbox in their user settings so I can disable their avatars. Searched on here, vbulletin.com, and vbulletin.org, found nothing
Proposed solutions so far: 1) Create another usergroup that has avatars disabled Problem = I have a paid subscription option as well, so this means I would have to create TWO new usergroups... one for while their subscription is active and one for when it runs out. No way to address simply resubscribing and getting back their avatars. 2) Punish everyone and moderate all avatars Problem = Ugh, way too labor intensive. I want to address a few "bad apples", not punish the entire bushel. There HAS to be a way to disable avatars for a specific user without screwing with subscriptions or usergroups. Even a crude conditional in the postbit (display avatar so long as userid is equal to user1 or user2 or user3 or ...) would be better than the current system. Any thoughts? |
#2
|
|||
|
|||
Got it figured out Took some digging and learned a few new variables along the way, but here's how to do it:
In phpinclude_start add (modify userid's as required): Code:
$banned_avatarids = array(100, 200, 300); In postbit_legacy (what I use anyway): Find Code:
<if condition="$show['avatar']"> <div class="smallfont"> <a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurl" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a> </div> </if> Add before Code:
<if condition="in_array($post[userid], $GLOBALS[banned_avatarids])"> <div class="smallfont"> Insert your text or designated avatar image here, for an image copy the href code above and modify the image source location accordingly </div> <else /> Add after Code:
</if> If you use postbit instead of postbit_legacy you'll have to compare and modify accordingly. Addendum Next is modifying the MEMBERINFO template so their avatar doesn't show in their public profile either: Find Code:
<if condition="$show['avatar']"> <td><img src="$userinfo[avatarurl]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td> <else /> <td> </td> </if> Add Before Code:
<if condition="in_array($post[userid], $GLOBALS[banned_avatarids])"> <td> Insert your text or designated avatar image here, for an image copy the img code above and modify the image source location accordingly </td> <else /> Add after Code:
</if> |
#3
|
|||
|
|||
You could always make a new usergroup with restrictive perrmissions and put any user in that group who breaks your avatar rules.
|
#4
|
|||
|
|||
Quote:
Next on my list is loading my banned avatar image in the phpinclude_start template as well, that way everything is configured from that single template. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|