vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   AUTOJOIN - Auto-entry in membergroup via field in profile (https://vborg.vbsupport.ru/showthread.php?t=111870)

makaiguy 03-31-2006 10:00 PM

AUTOJOIN - Auto-entry in membergroup via field in profile
 
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

makaiguy 04-02-2006 03:14 AM

[Post reserved fur future use. Control code that was previously here has been moved into the downloadable text file.]

nasser71 04-02-2006 11:54 AM

1st to install and say thanks m8

Murty 04-08-2006 10:50 PM

I dont understand how this works sorry?

makaiguy 04-11-2006 04:02 AM

Quote:

Originally Posted by Murty
I dont understand how this works sorry?

The user, by entering the required password in a custom field in his profile, will place himself into a specific user group. If he doesn't have the correct password in this field, it will make sure he is NOT in the usergroup.

This process is run each time the user logs in.

Is that what you're asking?

To make this work, you have to create a custom field in the profile where this password can be entered.

You also need to create a custom $vbphrase that houses the required password value.

GamerzWorld 04-11-2006 08:34 AM

Is it possible to enter them into the moderation of a private usergroup? I would love this but I need to know that the group leader can moderate these users

makaiguy 04-11-2006 11:21 PM

Quote:

Originally Posted by GamerzWorld
Is it possible to enter them into the moderation of a private usergroup? I would love this but I need to know that the group leader can moderate these users

If I understand the question...

This just adds the user to the usergroup, the same as if you checked the box for that forum after pulling up his record in the admincp. Whether this usergroup and/or forum require moderation is unaffected by this.

trigon 04-11-2006 11:58 PM

can i use this to divorce the guys from the girls in my board??

bada_bing 04-12-2006 12:43 AM

What if you want to kick a specific user out of the usergroup and he knows the password to get back in?

makaiguy 04-12-2006 03:51 AM

Quote:

Originally Posted by bada_bing
What if you want to kick a specific user out of the usergroup and he knows the password to get back in?

Change the password and tell everybody but him ??

If that is a concern, I don't think this plugin will work for you.

If usergroup membership is used only for forum access purposes, you can lock him out of certain forums via access masks.


All times are GMT. The time now is 11:26 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.01010 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete