Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Minimum Reputation to Join Public User Group Details »»
Minimum Reputation to Join Public User Group
Version: 1.6, by antialiasis antialiasis is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 04-14-2006 Last Update: 08-14-2006 Installs: 5
DB Changes Uses Plugins Template Edits
 
No support by the author.

This is a nice, simple product that basically allows you to set a minimum reputation for users to be able to join a public user group. Additionally, if a user's reputation level drops back below the limit, that user group will be temporarily "disabled", and then automatically activated again once the user reaches the limit again and so on.

This hack can be modified so that it uses a minimum post count, etc. instead of minimum reputation.

What it does in detail:

1) An option is added to the Admin CP for editing or adding user groups other than the default ones, which allows you to specify a minimum reputation level that people must have in order to join this user group.

2) When listing joinable user groups in the User CP, any free-for-all user group with a set minimum reputation level will have that reputation level shown in the Joining Conditions. If the user has reached that reputation level, the "Join Group" radio button is shown as normal; however, if the user has not, it will instead show a "You do not meet the minimum requirements to join this group" message. (There is also a plugin with a small sanity check: if somehow a user is joining the group anyway and doesn't have enough reputation, the user will stay in the group they're already in.)

3) Every time a user is given positive or negative reputation, a script checks whether any of the user's groups should be enabled or disabled, and if so, it makes the change.

4) When listing joinable user groups in the User CP, any usergroup which is disabled will be listed as one you are not a member of, but will have a notice instead of "Join Group" saying that you are already an inactive member of it.


Special thanks go to hambil for writing a better version of one of the plugins for me when my version wasn't working.

Version 1.6: Fixed both a code bug (see post by chiaa) and the inability to use 0 or a negative number as the minimum reputation.
Version 1.5: Added the feature to kick a user out of a group when dropping below minimum reputation level.


To install, simply import the product (which contains five plugins and five phrases, I believe, and adds two database columns) and make two template edits to modifyusergroups_nonmemberbit:

FIND

Code:
        <else />
                $vbphrase[anyone_free_to_join_group]
        </if>
REPLACE with

Code:
	<else />
                <if condition="$usergroup['minreputation']">
                        $vbphrase[minimum_reputation]: $usergroup[minreputation]
                <else />
		        $vbphrase[anyone_free_to_join_group]
                </if>
	</if>
Also FIND

Code:
        <else />
		<label for="rb_join_$usergroup[usergroupid]"><input type="radio" name="usergroupid" id="rb_join_$usergroup[usergroupid]" value="$usergroup[usergroupid]" />$vbphrase[join_group]</label>
        </if>
REPLACE with

Code:
	<else />
                <if condition="(!$usergroup['minreputation'] OR ($vbulletin->userinfo['reputation'] >= $usergroup['minreputation'])) AND !$inactivegroup">
		         <label for="rb_join_$usergroup[usergroupid]"><input type="radio" name="usergroupid" id="rb_join_$usergroup[usergroupid]" value="$usergroup[usergroupid]" />$vbphrase[join_group]</label>
                <else />
                         <if condition="$inactivegroup">
                                  $vbphrase[group_inactive]
                         <else />
                                  $vbphrase[cannot_join_group]
                         </if>
                </if>
	</if>
And you're done. Enjoy and click Install.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 05-30-2009, 01:33 PM
blackhatspace blackhatspace is offline
 
Join Date: Mar 2009
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does this work for 3.8?
Reply With Quote
  #13  
Old 07-07-2009, 07:08 PM
kalisekj kalisekj is offline
 
Join Date: Dec 2006
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would love to see this but have it for age instead, since I have an adult forum which means you must be a member of the adult user group, it would be nice to have it chk against the age and allow them to join the user group if they are of age.
Reply With Quote
  #14  
Old 08-24-2009, 05:59 AM
lm3a.net's Avatar
lm3a.net lm3a.net is offline
 
Join Date: May 2009
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you,
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 04:00 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.03895 seconds
  • Memory Usage 2,240KB
  • Queries Executed 20 (?)
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
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete