Back to vBulletin 3.5 Add-ons

AUTOJOIN - Auto-entry in membergroup via field in profile
Mod Version: 1.05, by makaiguy

This modification is in the archives.
vB Version: 3.5.4 Rating: (0 vote - 0 average) Installs: 18
Released: 01 Apr 2006 Last Update: 06 Jun 2006 Downloads: 103
Not Supported Uses Plugins Re-usable Code Translations  

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 usergroup
2) Yes/No choice for single usergroup via radio button
3) Choose one of several usergroups via radio buttons
4) Choose any of several usergroups via multiple checkboxes
Note 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:
  • 1.00 - Initial release
  • 1.01 - Sorts output membergroups numerically plus a few other small changes
  • 1.02 - Rewritten using defined functions for adding to, and removing from, memberbgroups. This should make it easier to follow the logic and to adapt the code for other situations (e.g.checkboxes or radio buttons instead of text profile fields)
  • 1.03 - InGroup() and OutGroup() functions rewritten to make them more useful when dealing with other situations than the somewhat restricted application of entry/exit of specific membergroup via stored password.
  • 1.03.1 - Additional tweaking of InGroup() and OutGroup() functions. Tested extensively and seem to be working as intended. Tested examples of using via radio buttons instead of text field added.
  • 1.04 - Added protection against doing anything re user's current PRIMARY usergroup in secondary usergroup list. Functions renamed to IntoGroup() and OutOfGroup().
  • 19 April 2006 - all code moved from this thread into the downloadable text file.
  • 1.05 - Added control for using multiple checkboxes to choose any of several usergroups.
  • 22 May 2007 - tested with vB 3.6.7-PL1
  • 24 Sep 2012 - tested with vB 3.8.7-PL3

Download

This modification is archived and cannot be downloaded.


vblts.ru supports vBulletin®, 2022-2024