Version: 1.00, by dstruct2k
Developer Last Online: Apr 2014
Version: 3.0.3
Rating:
Released: 08-19-2004
Last Update: Never
Installs: 10
Re-useable Code Code Changes Translations
No support by the author.
Ever wanted to randomly sort your new registrants into seperate usergroups?
Now you can!
Good for Harry Potter themed forums.
Instructions: Create the usergroups you want to randomly sort between and record the usergroupid's for use when installing the hack. Further instructions in TXT file.
File Modifications: 1 (register.php)
Template Mods: 0
Time to install: >2 minutes
Enjoy!
Update: Version 2.0 released
This version incorporates code by True.Rooster which fixes my half-assed attempts at getting the code right. (It's been a while... lol)
To upgrade, reapply the hack.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
This doesn't appear to be working. I put it on my site and signed up as a new member, but for some reason they were placed in 'COPPA users awaiting moderation' (group 4)
I had put the four usergroups as 2 (Gryffindor), 9 (Hufflepuff), 10 (Ravenclaw) and 11 (Slytherin). Maybe you need to check your code. I did a straight copy with the numbers changed.
That would be because you're requiring email verification or COPPA registration. This hack doesn't support verification yet.
Quote:
Originally Posted by integra99
dstruct2k: what is the application of this hack on your site?
That would be because you're requiring email verification or COPPA registration. This hack doesn't support verification yet.
That's the thing. I don't require e-mail verification or COPPA registration on my site, which is why I needed the original hack that I asked for modified. :disappointed:
I don't require e-mail, COPPA registration, image verification, nor birthday's ro register. I just changed the not requiring birthday and am hoping that this alleviates the problem I'm having, but for some reason or other a few people have been thrown into that COPPA group up on registration. Any ideas?
Here's my PHP code verbatim from my DB:
PHP Code:
// RANDOM USERGROUP HACK by dstruct2k
// Replace "999" with the usergroupid's of your randomized groups.
// Add extra groups if required.
// assign user to group 3 if email needs verification
if ($vboptions['verifyemail'])
{
$newusergroupid = 3;
}
else
{
if ($vboptions['moderatenewmembers'] OR $_POST['coppauser'])
{
$newusergroupid = 4;
}
else
{
$newusergroupid = $rndid;
}
}
Okay, since I'm wickedly impatient I decided to see about figuring this out on my own. After disabling virtually everything and still having the problem, I realized that the hack was rotating improperly and therefore throwing people into COPPA - problem is, they weren't IN the COPPA usergroup. The query had somehow created a NEW usergroup with no name and no id number that can't be modified. All as a result of a simple -1
Okay, since I'm wickedly impatient I decided to see about figuring this out on my own. After disabling virtually everything and still having the problem, I realized that the hack was rotating improperly and therefore throwing people into COPPA - problem is, they weren't IN the COPPA usergroup. The query had somehow created a NEW usergroup with no name and no id number that can't be modified. All as a result of a simple -1
// assign user to group 3 if email needs verification
if ($vboptions['verifyemail'])
{
$newusergroupid = 3;
}
else
{
if ($vboptions['moderatenewmembers'] OR $_POST['coppauser'])
{
$newusergroupid = 4;
}
else
{
$newusergroupid = $rndid;
}
}
}
// END RANDOM USERGROUP HACK by dstruct2k
Try that there - I've been creating new users for the last 30 minutes and it is working perfectly. I've tested with everything from 1 usergroup to 10 random ones and no errors. All I did was add an if statement that if there is only one automattically sets that as the group otherwise it randomly generates a group. I fixed the random part as well so it wouldn't throw out bad group numbers.