The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Minimum Reputation to Join Public User Group Details »» | |||||||||||||||||||||||||||
Minimum Reputation to Join Public User Group
Developer Last Online: Nov 2013
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> Code:
<else /> <if condition="$usergroup['minreputation']"> $vbphrase[minimum_reputation]: $usergroup[minreputation] <else /> $vbphrase[anyone_free_to_join_group] </if> </if> 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> 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> Show Your Support
|
Comments |
#2
|
||||
|
||||
Sounds usefull I will reserve this for my new site and one I add it I will click install
|
#3
|
||||
|
||||
Yeah I'll definitely install this right now.
|
#4
|
||||
|
||||
Upgraded to version 1.5, major feature added.
|
#5
|
|||
|
|||
How can I make it so someone has to have a minimum post count and minimum reputation? Not the or as mentioned in hack description, but both =).
|
#6
|
|||
|
|||
thanks
|
#7
|
|||
|
|||
After install I got:
Warning: array_intersect(): Argument #2 is not an array in /reputation.php(172) : eval()'d code on line 23 Warning: implode(): Bad arguments. in /reputation.php(172) : eval()'d code on line 23 when giving reputation. Everything seems to be functioning correctly, but I have disabled the mod until I know what the hell this is. |
#8
|
||||
|
||||
Okay, I think I fixed your problem. Upgrade the product.
Both minimum post count and reputation... Hmm, I'd need to make some fairly extensive changes, but it's a good idea for the hack anyway. Will do. =) |
#9
|
|||
|
|||
Cool hack
I'd like to be able to make the profile_joingroup_unmoderated call at the global level, just so I could display it in another page. Any idea how to get the variables? Thanks |
#10
|
||||
|
||||
As in you'd want to display a list of usergroups you need minimum reputation to join somewhere on another page?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|