The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
AUTOJOIN - Auto-entry in membergroup via field in profile Details »» | |||||||||||||||||||||||||||
AUTOJOIN - Auto-entry in membergroup via field in profile
Developer Last Online: Oct 2016
Here's a little something to give back to this community that has been of such help to me.
With this plugin, you can have a user entered into or removed from a secondary usergroup according to several types of controls that can be placed in the user's profile via custom fields. This acts only on SECONDARY usergroups and will not affect the user's PRIMARY usergroup. At each login, the plugin will check for the appropriate setting in the user's profile, then add or remove the user from the specified membergroup as appropriate. Note that this does not act instantaneously upon entry of the data in the profile, but requires a new login for this to take effect. [Starting with vB 3.6.4 (maybe earlier, I didn't install anything between 3.5.4 and 3.6.4) this will take effect with one or two page reloads.] Controls currently available: 1) Password for single usergroupNote that you may write your own additional controls and use the two included functions to do the actual insertion into, and removal from, the target usergroups. Tested with vB 3.5.4, 3.6.4, 3.6.7-PL1, 3.8.7PL3 only. Full instructions are in the downloadable text file autojoin.txt. Update log:
Show Your Support
|
Comments |
#22
|
||||
|
||||
I've updated to version 1.03. When trying to adapt for situations other than the narrow password-in-custom-field control, some modifications were necessary, as the 1.02 code did not deal well with situations where no radio button choice had yet been made by the user.
[S]Code in first post reflects latest version 1.03.[/S] [S]See also the second post which has been updated with working code to use radio buttons in custom profile field to allow user to select one of several usergroups.[/S] All Code now included in download file. |
#23
|
||||
|
||||
Quote:
|
#24
|
||||
|
||||
Version 1.03.1 now in place. See first and second posts in thread.
|
#25
|
||||
|
||||
Version 1.04 is now in place. It adds a check to prevent modifying the user's PRIMARY usergroup.
|
#26
|
|||
|
|||
If i activate the plugin, then this error comes: Fatal error: Call to undefined function: outgroup() in /home/********l/public_html/forum/global.php(349) : eval()'d code on line 86
If i deactivate, everything looks good. Btw, the plugin doesnt work for me, maybe you can take a look on it: I have three fields, one for women (written in german/turkish) one for men, and one for "no i dont want to give this info", also in german/turkish. The only with a new usergroup is the first (groupid 20) |
#27
|
||||
|
||||
Quote:
PHP Code:
Also note that you have a problem with the third option you entered. That should be Code:
// THIRD radio button option // Text shown in radio button for option $choice_text[2] = 'keine Angabe/Bilgi yok'; // Associated usergroup number $ug[2] = '2'; |
#28
|
|||
|
|||
Ok, now it works, any hint to make it for the primary usergroup? Cause i want to move the primary usergroup, not the secondary ones.
|
#29
|
||||
|
||||
All code has been removed from the first two posts in this thread. The latest versions of everything will always be located in the downloadable text file.
|
#30
|
||||
|
||||
Quote:
If you want to change only the primary usergroup, your query needs to update usergroupid instead of membergroupids. Also, since there can only be one primary usergroup, it is a simpler operation because you just reset usergroupid to the new value and don't have to worry about leaving any other primary usergroups alone. This is untested, but it ought to be at least close to what you need: PHP Code:
|
#31
|
||||
|
||||
screen shots?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|