Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2004, 05:16 PM
EricR EricR is offline
 
Join Date: Feb 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 09-13-2004, 06:56 PM
EricR EricR is offline
 
Join Date: Feb 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>&nbsp;</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>
Reply With Quote
  #3  
Old 09-13-2004, 09:03 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could always make a new usergroup with restrictive perrmissions and put any user in that group who breaks your avatar rules.
Reply With Quote
  #4  
Old 09-13-2004, 09:27 PM
EricR EricR is offline
 
Join Date: Feb 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Brad
You could always make a new usergroup with restrictive perrmissions and put any user in that group who breaks your avatar rules.
See item #1 in my initial post. The usergroup approach becomes a royal p.i.t.a. when you start talking about paid subscriptions. Avatar permissions are inherited, therefore the only way to turn them off for an individual is if ALL of the usergroups that they belong to have them disabled. You would need to create a new base usergroup with no avatars and then create a new (and disabled) paid subscription usergroup with avatars disable, then move the user from the standard base usergroup and subscription group to the modified base group and subscription group (including subscription expiration date). This way when the subscription expired they would revert to the modified base group without avatars instead of the standard base group (which has avatars). And after all of that the user gets their avatars back when they renew their subscription and are automatically added to the subscriptions-with-avatars group. What a mess. With the conditionals above I simply edit the phpinclude_start template and add/remove userids with no concern at all regarding usergroups and subscriptions.

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04871 seconds
  • Memory Usage 2,192KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete