vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Selct Group when Moderating Registration (https://vborg.vbsupport.ru/showthread.php?t=35534)

AkiraLite 02-27-2002 10:00 PM

Selct Group when Moderating Registration
 
This was a major time saver for me. My board uses custom user group to control access to different forum. All registrations are moderated and being able to set the group from the 'en masse' activation page is what I needed.

Edit user.php:
Changes under "Start Moderate + coppa" about line 1180
1.) add usergroupid to the 1st $users query
Code:

$users=$DB_site->query("SELECT userid,username,email,usergroupid FROM user WHERE usergroupid=4 ORDER BY username");
2.)Add makechoosercode to the end of 1st 'if' statement
Code:

if ($DB_site->num_rows($users)==0) {.....
makechoosercode("User Group","usergroupid[$user[userid]]","usergroup",$user[usergroupid]);

Under the next section "# Start do moderate and coppa #
1.) Add the new data to the 'while' statement's $DB_site query
Code:

while (list($key,$val)=each($validate)) {......
$DB_site->query("UPDATE user SET usergroupid=$usergroupid[$key] WHERE userid=$key");

So far it's worked perfectly for me.

Lionel 03-01-2002 12:08 AM

I am not moderating registrations, but I would like at registration time to insert group according to location.

AkiraLite 03-01-2002 11:43 AM

You would have to create a query or array with the possible locations.
Then add the forumla to hash what the user's enter on the registration page and add this result to the post, replacing the default (2) with your value.

Correct?
You want group to be assigned dynamiclly and automaticlly from the external registration page. Not from the Admin CP.
Which is where my hack takes effect.

Lionel 03-01-2002 11:48 AM

yes this is what I am looking for. I'd like to get a second copy of vb to create an alumni site. The way it would work, once people select their school (or city since it is a small country), they automatically exchange within that limit. But I would not know how to start what you are saying.


All times are GMT. The time now is 11:12 AM.

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.01306 seconds
  • Memory Usage 1,716KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete