Back to vBulletin 3.5 Add-ons

Minimum Reputation to Join Public User Group
Mod Version: 1.6, by antialiasis

This modification is in the archives.
vB Version: 3.5.4 Rating: (0 vote - 0 average) Installs: 5
Released: 15 Apr 2006 Last Update: 15 Aug 2006 Downloads: 18
Not Supported DB Changes Uses Plugins Template Edits  

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.

Download

This modification is archived and cannot be downloaded.

Similar Mods

Send a Private Message to Public Group Leaders Upon a Join Request vBulletin 3.5 Add-ons
Send Private Message to Public Group Leader on Join Requests vBulletin 3.0 Full Releases

vblts.ru supports vBulletin®, 2022-2024