Quote:
Originally Posted by Ted S
This addon actually isn't that hard...
If you work with a new plugin for the hook register_addmember_process (or just find this in register.php) you'll basically need to add to get the invite code, check it and update the group.
This code will preform a basic check and move a user, you'll have to get a bit more advanced if you want to compare codes against a database table.
Code:
// parse the form field
$vbulletin->input->clean_gpc('r', 'invitecode', TYPE_NOHTML);
// check if they entered the code "secret code"
if ($vbulletin->GPC['invitecode'] == 'Secret Code'){
$userdata->set('usergroupid', '5'); // change the usergroup from 5 to whatever
}
Playing around with the code you can do other things like send a special email out, show a different thank you message and so forth.
|
Thank you so much for this codebit,, it works like a charm
running it on a local test board, and its impressive... LOVELy..
any tips on where i can read up on importing data from the database ?
and saveing to the db using php, was thinking maybe making a admin control to
set usergroup and invitation code