View Full Version : Add User to Secondary Usergroup Based on the Value of a Custom Profile Field at Reg.
amykhar
06-12-2005, 10:00 PM
This version is for the SECONDARY group. The one for primary groups is here:
https://vborg.vbsupport.ru/showthread.php?t=82992
As far as plugins goes, this one is an advanced plugin because you WILL need to make some tweaks to suit your needs.
What this plugin does: If you have a custom profile field, for example one for gender, it checks to see if the user has selected a specific value and then assigns them to a secondary user group based on that selection.
Instructions for installation:
A. Create your custom profile field and make a note of the field number. (Or simply make a note of the field number of an existing field.)
B. Make a note of the value you are checking for. For example, you may be looking to see if your member selected "male" in your custom gender field.
C. Make a note of the usergroup number that you want to set the user to.
D. Here you have two options:
Option 1: Edit the attached XML file before you import it to change the field number, the value that you check for and the usergroupid. In my XML file, I am checking field5 to see if the value is yes and changing the usergroup to 10.
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="vbulletin">
<title>Put User in Secondary Group Based on Custom Profile Field Value</title>
<hookname>register_activate_process</hookname>
<phpcode><![CDATA[// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'yes')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}
$userdata->set('membergroupids', $membergroupids); }]]></phpcode>
</plugin>
</plugins>
If you are checking field10 instead of field5, change all references of field5 to field10.
Example: if you are checking your field to see if the value is male, you would change (change field number as needed):
if ($user['field5'] == 'yes')
to:
if ($user['field5'] == 'male')
And, finally, change the usergroup as appropriate. Instead of 10 in this line:
$membergroupids = $membergroupids . ", 10";
substiture your usergroupid of choice.
And in this line as well,
$membergroupids = 10;
Option 2: Import the XML file as is, open the plugin manager, and make your edits there.
NOTE: This mod works for forums that require users to verify their email address upon registration. If your forum does not require users to verify their email address, you will need to use a different hook. If I have time, I'll test that variation.
----------------
Example Gender Mod that separates users into secondary groups based on their gender. Don't forget, the values are case sensitive and the field numbers and usergroup numbers need to be changed to suit your site's setup.
// Get the value for field 20
$gender = $vbulletin->db->query_first("SELECT * FROM userfield WHERE userid=".$vbulletin->userinfo['userid']);
if ($gender['field20'] == 'male')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 42";
}
else
{
$membergroupids = 42;
}
$userdata->set('membergroupids', $membergroupids);
}
else
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 41";
}
else
{
$membergroupids = 41;
}
$userdata->set('membergroupids',$membergroupids);
}
Amy
Ooooooooooooh! This is so great. I'm not running vB3.5 yet, so if you could make this for vB 3.07??? Please Amy? :D (begging). If there's already a hack, I'd be much obliged with a pointer.
Cyricx
07-14-2005, 02:29 PM
Would it be possible to use this code to check their and thereby age?
Like I have an 18+ forum that I use a secondary usergroup to control access to.
amykhar
07-14-2005, 02:33 PM
Would it be possible to use this code to check their and thereby age?
Like I have an 18+ forum that I use a secondary usergroup to control access to.
Yes, you could use this basic structure. It wouldn't check the value of the userfield. It would do the math on their age.
Amy
It would be nice if you could also hook the usercp pages so if they change an option the usergroups that were assigned at registration would also change.
Other than that, nice plugin :)
Brinnie
07-15-2005, 01:07 AM
Hello,
Would you be so kind as to give an example of how this mod might be used? I am looking to do something with my usergroups (see attachment) but I don't know if I need this mod or the primary group mod.
Thanks a million. :)
Brinnie
Brinnie
07-15-2005, 01:09 AM
It would be nice if you could also hook the usercp pages so if they change an option the usergroups that were assigned at registration would also change.
Other than that, nice plugin :)
That's what I was just wondering.
If I install this, would my members be able to cross party lines?
amykhar
07-15-2005, 01:11 AM
It would be nice if you could also hook the usercp pages so if they change an option the usergroups that were assigned at registration would also change.
Other than that, nice plugin :)
I'll see what I can do.
Amy
Brinnie
07-15-2005, 01:51 AM
no love 4 my question? :(
Chris M
07-15-2005, 01:59 AM
no love 4 my question? :(
You asked it in the wrong place - Ask it in the "vBulletin Modification Questions" forum for vB 3.5.0 or the "General Modification Discussion" for 3.0.x depending on which forum you want it to run on ;)
Satan
Brinnie
07-15-2005, 02:06 AM
You asked it in the wrong place - Ask it in the "vBulletin Modification Questions" forum for vB 3.5.0 or 3.0.x depending on which forum you want it to run on ;)
Satan
oh ok. I'm a n00b, I don't know these things.
Do I need to entitle it: " Add User to Secondary Usergroup Based on the Value of a Custom Profile Field at Reg."?
Chris M
07-15-2005, 02:10 AM
oh ok. I'm a n00b, I don't know these things.
Do I need to entitle it: " Add User to Secondary Usergroup Based on the Value of a Custom Profile Field at Reg."?
No - Reeve of Shinra has provided one way of doing it, here (http://www.vbulletin.com/forum/showpost.php?p=916350&postcount=8)
If you decide to do it that way, you will only require the use of one of the hacks by amy :)
If you decide to do it via custom code, you will need to ask ;)
Satan
Brinnie
07-15-2005, 02:35 AM
No - Reeve of Shinra has provided one way of doing it, here (http://www.vbulletin.com/forum/showpost.php?p=916350&postcount=8)
If you decide to do it that way, you will only require the use of one of the hacks by amy :)
If you decide to do it via custom code, you will need to ask ;)
Satan
Do you know which one of these hacks would be better?
Chris M
07-15-2005, 02:37 AM
Do you know which one of these hacks would be better?
It depends whether you want the user to be moved into a different Primary Group or added to a Secondary Group :)
Satan
akanevsky
08-01-2005, 08:14 PM
Nice hack. A few suggestions:
1. Make it configurable from admincp.
2. Replace
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}
With
$membergroupids .= (!empty($membergroupids) ? ", " : "") . 10;
amykhar
08-01-2005, 08:15 PM
1. Yes, that can be done now. When I wrote this, changes to the admincp required code edits, which I was trying to avoid.
2. I realize your way is shorter, but when I write code for here, I prefer to break things out to make it as simple to read as possible. That way, new coders get a glimpse at what is going on.
thecool
08-18-2005, 10:18 PM
Is there anyway to have the user added as a primary user of the Customer field as opposed to a secondary user?
thanks
Andreas
08-18-2005, 10:19 PM
Did you know that vBulletin has a nice search function? ;)
https://vborg.vbsupport.ru/showthread.php?t=82992
thecool
08-18-2005, 10:44 PM
Did you know that vBulletin has a nice search function? ;)
https://vborg.vbsupport.ru/showthread.php?t=82992
Didn't read it up top, browsed it and missed, thanks for the heads up.
Bad Bunny
10-02-2005, 06:25 AM
Is this working for gold? Cause I can't seem to get it to work. I have field5 and Yes (is it dependent on caps?) adds to group 11. Which is pretty simple...since it's almost default.
Sovereign
10-02-2005, 06:54 PM
Yay, this will work for ranksets, assigns users to rank groups (for custom rankings like Army, Star Wars etc.) Now for one without email validation...
amykhar
10-03-2005, 04:54 PM
It's case sensitive and it's working on my gold site.
PennylessZ28
10-04-2005, 12:06 AM
What would the use of this system be? Could I use this to say put Females in a Female Usergroup and Male in a Male group and then search for a user by sex? if that was the usergroup?
amykhar
10-04-2005, 02:55 AM
I have a private forum for women and one for men. This gives my users access to those groups. You could use it for whatever floats your boat though - not just gender. You could check to see if people like peas or not. Or, you could sort people into clans at registration time. Whatever your little heart desires and is capable of coding ;)
PennylessZ28
10-04-2005, 03:13 AM
Good deal, I didn't think about gender related forums. I am working on something and you just gave me an awesome idea. Thanks bro!
sensimilla
10-04-2005, 05:43 AM
so it can work with only one choice..?
what if I want "male" "female" "couple" to create 3 different usergrups?
TIA
GamerzWorld
10-04-2005, 07:50 AM
This hack is great what ive been looking for, however have a question. Currently i have two clans running on my board, both require validation before you get moved into the secondary usergroup. Will this hack automatically bypass this or simply add them into the que, and if it does bypass is there anyway i can make it so it simply adds them for auth by the group admin
amykhar
10-04-2005, 07:28 PM
It bypasses it as written. It wouldn't be a major deal to add them to the queue instead.
Sadie Frost
10-06-2005, 01:49 AM
Not working for me in RC3 - would image verification interfere with this or anything?
amykhar
10-06-2005, 02:35 AM
No and it's still working on my site which has used every version up to and including gold. Check any edits you made to the plugins and ensure the fields and cases are correct.
Sadie Frost
10-06-2005, 03:26 AM
Okay I tried doing this with your gender code, and I get sort of a weird result. This is what I have:
// Get the value for field 20
$gender = $vbulletin->db->query_first("SELECT * FROM userfield WHERE userid=".$vbulletin->userinfo['userid']);
if ($gender['field6'] == 'M')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 30";
}
else
{
$membergroupids = 30;
}
$userdata->set('membergroupids', $membergroupids);
}
else
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 31";
}
else
{
$membergroupids = 31;
}
$userdata->set('membergroupids',$membergroupids);
}
So my gender field is field 6, and my choices at M or F. So I made a test user with the M setting, and it put them in usergroup 31. So unless I'm reading that wrong, that's the wrong one. Am I just totally missing something here? Any help would be appreciated :)
GamerzWorld
10-07-2005, 03:46 PM
It bypasses it as written. It wouldn't be a major deal to add them to the queue instead.
How would i do that? Many users cant find the group membership page so as i said this would be great if they could select which clan they were in and be automatically joined to que for validation
scottblumin
10-12-2005, 08:37 PM
so it can work with only one choice..?
what if I want "male" "female" "couple" to create 3 different usergrups?
TIA
Did anyone answer this question - I have the same question. I have four usergroups based on Geography.
Thanks.
GamerzWorld
10-14-2005, 11:27 AM
How would i do that? Many users cant find the group membership page so as i said this would be great if they could select which clan they were in and be automatically joined to que for validation
Any guidance :)
GrendelKhan{TSU
10-14-2005, 01:06 PM
you know...before this thread...
I didn't even really get what one needed secondary user groups for. so thanks!!
now I can take that OFF my list of things to learn, and put it ON my list of things to install. :P
<<< runs in n00b shame :)
cool stuff...will be installed when I get that far. :D
GamerzWorld
10-16-2005, 03:37 PM
Ok i give up, hehe
On thing that's really been missing in vBulletin IMHO is group-centric management (ie, select a group and then add/remove users). However, this plug-in looks like it might help me...
In my particular case, I run a private board for a youth organization with some forums that are only accessible by users in a certain training level, and other forums that are only accessible by users in a certain team. Both of these groupings are a reflection of their level and membership within the organization, as opposed to the board itself.
Normally, the level changes each year (assuming they pass), and the team membership can change fairly regularly as well.
Traditionally, I have used secondary groups for this, but as I mentioned above, that's a pain to maintain (since I can't just select the "Level 1" group and add fifteen members... Rather, I have to select each of the fifteen members manually and add them to the "Level 1" group as a secondary group).
However, the use of a custom profile field to control their membership would greatly simplify this for me, since not only would it control the group membership easily, but it would also allow me to import this information from an existing database (since I do already have it stored in a membership database).
There would be a couple of things that I would need to consider...
Firstly, I would need it to hook into somewhere else other than user registration, since the profile fields will change from time to time for existing users. I'm thinking of a hook into forumhome_start or somewhere related to login. This particular board only has about 200 users, so I'm not overly concerned about performance issues (although I'd like to avoid any glaring one). Any thoughts on a more suitable hook for this purpose?
The second problem, which is a more complex one, would be have it remove any groups for which the user is no longer. In other words, if the user is now in Level 2, they should be removed from the Level 1 group (or, put more simply, I guess they could be removed from ALL level groups and then re-added to the one that matches their profile field). The same would need to occur for the team groups (they can only be a member of one team at a time).
Any thoughts or advice on how to accomplish this would be very helpful. I don't consider myself a novice in programming, but I would like to benefit from the advice of those more experienced in working with vBulletin (especially the new 3.5 hooks system) before I attempt any of this myself...
Code Monkey
10-29-2005, 04:41 AM
You might want to check if the user is already in that group.
banjolawyer
01-08-2006, 04:53 PM
Would this plugin work for adding a user to more than one secondary usergroup? For example if I added a "multiple selection checkbox" custom profile field, could it add the user to 2 or 3 differnt public usergroups if the user checks 2 or 3 checkboxes?
DaveAK
02-19-2006, 11:59 PM
Any one got this working when you don't have email verification? I tried using the "register_addmember_complete" hook, but this didn't work. I'm not a complete novice to PHP, but I am when it comes to vBulletin. I understand the purpose of the hooks, but I can't seem to figure out which one I need to use.
paulfletcher
03-13-2006, 01:54 AM
Does this still work if I'm using CMPS on my board? Do I have to change the "Product" option in vbulletin from "vBulletin" to "CMPS" when I'm installing this?
paulfletcher
03-14-2006, 12:49 AM
Anyone :-)...? So alone...
amykhar
03-14-2006, 01:02 AM
Why wouldn't it and why would you? :confused:
paulfletcher
03-15-2006, 02:30 AM
lol. I don't know. I'm new to vBulletin, and so far. When I've tried installing this script it still doesn't work. I've made sure my text field during registration is not hidden, and that it is field5, and that its upgrading to the correct usergroup ID. (just like your script). And I've tried typing in the correct information so my account can be upgraded, although... Still no luck. The newly registered user is still not being upgraded.
So I was thinking that it was probably my stupidity that was preventing the script from being correctly installed.
Any thoughts?
Thanks,
Paul Fletcher
paulfletcher
03-15-2006, 02:49 PM
Would you, are someone be willing to help me install this plugin and get it working. I'll get you an admin login for our forum.
Thanks,
Paul
paulfletcher
03-16-2006, 02:54 AM
Alright. So, our site has to open on March 27th, and I'm clueless on how to make this script work. After installing the script... Everything the same (except groupID has been changed from 10 to 11.
I get this error when I activate my account.
Parse error: parse error, unexpected '<' in /homepages/9/d89699556/htdocs/xyztraining_com/register.php(930) : eval()'d code on line 1
When looking in the registration.php file on line 930 I see this...
$hook = vBulletinHook::fetch_hook('register_activate_proce ss')) ? eval($hook) : false;
Does this help anyone figure out where my problem may be lying?
Thanks,
Paul
rnmcd
03-16-2006, 02:57 AM
Would you, are someone be willing to help me install this plugin and get it working. I'll get you an admin login for our forum.
Thanks,
Paul
Maybe it doesn't work with your version of vBulletin(?).
paulfletcher
03-16-2006, 11:52 AM
Thats what I originally though as well, but Amykhar told me that she has it working on vBulletin 3.5.4.
Wouldn't this error
Parse error: parse error, unexpected '<' in /homepages/9/d89699556/htdocs/xyztraining_com/register.php(930) : eval()'d code on line 1
suggest that there is an extra "<" somewhere in the script? Although I can't find it, and the ones that I do see I have no clue whether there actually supposed to be there. (I don't know PHP).
Any thoughts?
Thanks,
Paul
amykhar
03-16-2006, 01:48 PM
paul, my software for work just went out the door and I have about half an hour of free time before I need to get back to work. PM me your admin info and I'll see what I can do for you.
paulfletcher
03-16-2006, 08:42 PM
I sent the login credentials to you.
Thanks again,
Paul
paulfletcher
03-17-2006, 09:47 PM
It's working Great! Thanks for your help.
-Paul
rnmcd
03-17-2006, 09:54 PM
It's working Great! Thanks for your help.
-Paul
Did amykhar happen to mention what the problem was?
paulfletcher
03-17-2006, 10:11 PM
Ah yes... Sorry.
She said that the variables were different after email activation (in the script... I think). Thats all I know :-) But the script is now doing everything we need on our site.
Thanks,
Paul Fletcher
Sculli
03-18-2006, 10:12 AM
This plug is awesome.
I would like to use it to have a radio-button single selection going on where users can switch as the please.
How would I go about accomplishing that? Just a bunch of if statements checking which groupid needs to be removed before assigning a new one?
paulfletcher
03-19-2006, 03:22 AM
Are you talking about adding the radio-buttons in the user CP, so a user is able to switch between categories and user-groups as they want?
Thanks,
Paul
Sculli
03-19-2006, 03:42 AM
Yes that is exactly it. The user will have the choice between usergroupA, usergroupB, and usergroupC. The choice is made using radio buttons, so the user can only be a member of one of the groups at any given time. But the user can switch groups at will through the Edit Profile.
paulfletcher
03-19-2006, 02:03 PM
I actually looked into doing something like that. Where our activation code text field would be able to be changed in the login / privacy area. Although for this to work you would have to change the hook. Probably from register_activate_process to when you login.
Although I don't know how to do this (modifying the original script), you could just try playing around with the hook settings. So every-time the user logs in, the script is activated to see what the value of that radio button is.
Thanks,
Paul
rnmcd
03-19-2006, 02:33 PM
Yes that is exactly it. The user will have the choice between usergroupA, usergroupB, and usergroupC. The choice is made using radio buttons, so the user can only be a member of one of the groups at any given time. But the user can switch groups at will through the Edit Profile.
I was under the impression that is the way it is done presently.
Anyone happen to have this installed on a board that they could let me look at?
amykhar
03-19-2006, 03:14 PM
The choice doesn't have to be radio buttons. A text field works as well. But, the choice can't be changed after the user registers. They would have to use the regular member group interface for that.
rnmcd
03-19-2006, 03:52 PM
The choice doesn't have to be radio buttons. A text field works as well. But, the choice can't be changed after the user registers. They would have to use the regular member group interface for that.
Oh I get it now. The user can't change their usergroup by changing the respective profile field in the UserCP.
When you say, "They would have to use the regular member group interface for that." "They" are Admins, not members, right?
amykhar
03-19-2006, 05:01 PM
No. I mean members. Members can leave public groups and ask to join public groups. Combine this with my mod that pms group leaders when users make a request, and you'll have a usable interface.
I don't need my members to change groups after registration becuase except in very rare cases, I don't think their gender is going to change ;)
Sculli
03-19-2006, 06:43 PM
But, the choice can't be changed after the user registers. They would have to use the regular member group interface for that.You mean as it is coded now it can't be changed? There is no reason it couldn't be changed if it was coded differently though, right?
I run an online game related message board, and users can have one of three allegiances. Depending on which allegiance they currently have, they are assigned to a usergroup that then assigns them a rank image that shows their allegiance. However, users can change their allegiance in game, and I would like them to be able to change their allegiance choice as well.
I currently use simple publically joinable usergroups. The issue with that is that a user could join multiple groups and thus display multiple allegiance rank images. Some users do, and it's annoying to me to have to hunt them down and tell them that they are misusing the allegiance option.
If I were able to make the allegiance choice a radio button choice in the profile, then they could only have one allegiance at a time, but they would need to be able to change it when they change it in game.
There ought to be a faily simple way to do that. Something along the lines of:
-radio button choice indicates user wants to be part of group A
-check whether user is part of group B already, if so, remove user from group B
-check whether user is part of group C already, if so, remove user from group C
-add user to group A
Murty
04-11-2006, 03:49 AM
a few months ago i was having trouble installing the "Put User in Secondary Group Based on Custom Profile Field Value" hack. Well i thought it was all sorted, but for some reason, users are still being put into any random fields(eg male or female). I have not edited any code or anything, but it has been an increasing issue (having to manually change users).
Has anyone got any thoughts?
Please help
Injektilo
04-26-2006, 08:38 AM
amykhar or even someone else...please help me out here
i have a gender field with 3 options (male,female,secret) how can i set males to have one secondary usergroup, for females another, and for those who selected ecret to remain as it is (dont get a secondary usergroup)
amykhar
04-26-2006, 09:45 AM
It's just ifs and elseifs to handle three groups.
sepulchres
05-02-2006, 08:47 AM
Is it possible to use this function based on two custom fields instead of one? If so, how would the code differ to the one above? Cheers.
ronoxQ
05-24-2006, 12:05 AM
You'd just add another field to the plugin that looks for a different field.
Amy, here's my modified profile code, but it doesn't add me under a secondary usergroup. Any ideas?
// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'North')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}
$userdata->set('membergroupids', $membergroupids); }
// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'South')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 11";
}
else
{
$membergroupids = 11;
}
$userdata->set('membergroupids', $membergroupids); }
// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'West')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 13";
}
else
{
$membergroupids = 13;
}
$userdata->set('membergroupids', $membergroupids); }
// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'East')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 12;
}
$userdata->set('membergroupids', $membergroupids); }
amykhar
05-24-2006, 11:37 AM
ronoxQ, I'm going to respond via pm.
ThePiston
06-06-2006, 04:08 PM
I've got a 5-option radio field that I can't get to work corectly.
I sort of got it to work, but with this code, it it puts new members into 2 Groups, whatever they chose and always the last Group (the else clause) listed as well (so 2 groups). Where am I going wrong?
// Get the value for field 20
$gender = $vbulletin->db->query_first("SELECT * FROM userfield WHERE userid=".$vbulletin->userinfo['userid']);
if ($gender['field5'] == 'team1')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 9";
}
else
{
$membergroupids = 9;
}
$userdata->set('membergroupids', $membergroupids);
}
if ($gender['field5'] == 'team2')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 11";
}
else
{
$membergroupids = 11;
}
$userdata->set('membergroupids', $membergroupids);
}
if ($gender['field5'] == 'team3')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}
$userdata->set('membergroupids', $membergroupids);
}
if ($gender['field5'] == 'team4')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 12";
}
else
{
$membergroupids = 12;
}
$userdata->set('membergroupids', $membergroupids);
}
if ($gender['field5'] == 'team5')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 13";
}
else
{
$membergroupids = 13;
}
$userdata->set('membergroupids', $membergroupids);
}
else
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 14";
}
else
{
$membergroupids = 14;
}
$userdata->set('membergroupids',$membergroupids);
}
*****EDIT**** I fixed it, I needed 'else if' and not 'if'
Shoebuddy
06-12-2006, 09:41 AM
Can I write this code? or use a switch statement
if ($user['field5'] == 'MIS (Summer)')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 45";
}
}
if ($user['field5'] == 'MIS (Fall)')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 45";
}
}
$userdata->set('membergroupids', $membergroupids);
futuredood
06-15-2006, 08:57 PM
is their any way to make this a hack with a user interface?
amykhar
06-15-2006, 09:38 PM
It's not the kind of mod that's really conducive for a user interface. It's one of those set it once and never touch it again kinds of things.
futuredood
06-16-2006, 02:38 AM
hmm.. i'd like to have it so that people can select from the list. the thing is, if i have a list of five options, say A B C D E, and then I end up adding a 6th option and still wanted to maintain the ABC order, I'd place it between the A and the B. the problem with that is, users who selected B are now changed because the list changed by one line. any ideas?
patrickstar
06-28-2006, 12:58 AM
ok this is what i did:
1. created new profile field: gender
2. value = 'M' or 'F'
3. created new usergroup: female
usergroup id: 10
i have made the neccesary changes to the xml file and now the silly question. how do i upload it to my plug in manager. i just save text and upload?
thanks and great hack.
paulfletcher
06-28-2006, 04:29 AM
AdminCP > Plugin System > Plugin Manager > Add New Plugin
I think this is what your looking for.
Thanks,
Paul
paulfletcher
06-28-2006, 04:31 AM
Oh, if you already have the plugin installed and you just want to make a code edit. Inside the Plugin Manager, click on the plugin you want to edit. Once the next page has loaded, located Plugin PHP Code... To the right of that is where you can edit your code.
Thanks,
Paul
patrickstar
06-28-2006, 08:38 AM
AdminCP > Plugin System > Plugin Manager > Add New Plugin
I think this is what your looking for.
Thanks,
Paul
yea i found that but my question is, how do i download the xml file? its not allowing me the option to save it, it just opens up to the text.
amykhar
06-28-2006, 11:19 AM
Right click - > 'Save As'
patrickstar
06-28-2006, 01:17 PM
lol. that easy uh?
well i just wanted to make sure, i havent uploaded a plug in yet.
thanks again, this is a great hack, that i am going to use.
patrickstar
06-29-2006, 01:14 AM
hello amy can you help me out. i thought i did everything right.
1. i added new usergroup = 10
2. i have gender field '7'
3. i have required email verification
4. i have gender required at time of registration
5. M or F
this is what i have as php code:
// Get the value for field 7
$user = $db->query_first("
SELECT field7
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field7'] == 'F')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}
$userdata->set('membergroupids', $membergroupids); }
but when i enable the plug in, everything seems to go fine when registerring, but i get this message after following my registration link and logging in:
Your account has already been activated so please try logging in.
everytime i try to log in.
can you please help with any suggestions. thanks.
patrickstar
06-29-2006, 11:08 PM
ok so basically i have the plug in enabled, i have email verification on and the code as above. i have registered usergroup permissions to the girls forum off and the custom permissions for the custom usergroup 'female' granted. will the registerred usergroup settings over ride the 'female' usergroup settings on this? and when i register as a female with the required field 'F', i do not see that as a secondary usergroup.
please help, even suggestions.
patrickstar
06-30-2006, 08:40 PM
<font size="1">chirp</font>
JenniferK
08-28-2006, 04:10 PM
Quote:
Originally Posted by Cyricx
Would it be possible to use this code to check their and thereby age?
Like I have an 18+ forum that I use a secondary usergroup to control access to.
Quote:
Originally Posted by amykhar
Yes, you could use this basic structure. It wouldn't check the value of the userfield. It would do the math on their age.
Amy
Can I have a little help with how to do this exactly?
moonclamp
09-08-2006, 02:37 PM
Can anyone tell me the SQL query I'd need to run if I wanted to add the relevent existing members to the secondary group too?
criscokid
09-16-2006, 10:16 AM
Can anyone tell me the SQL query I'd need to run if I wanted to add the relevent existing members to the secondary group too?
Take a look at the mySQL commands - make user a secondary usergroup member thread (http://www.vbulletin.com/forum/showthread.php?t=200075).
moonclamp
09-16-2006, 10:47 AM
Take a look at the mySQL commands - make user a secondary usergroup member thread (http://www.vbulletin.com/forum/showthread.php?t=200075).
Cheers :)
criscokid
09-17-2006, 10:16 AM
How would I edit the XML file to add users to Usergroup ID 15 when Profile field16 = Male and Profile field17 = 1 or 2?
criscokid
09-18-2006, 06:20 PM
Can anyone tell me the SQL query I'd need to run if I wanted to add the relevent existing members to the secondary group too?
Following on from my previous post elling you how to achieve this... I ran the two commands and now I all of the females are now members of the secondary group that I was setting. I assume this is beacuse the 'Male' appears in the word 'Female'?
Toopac
09-24-2006, 03:06 PM
What would i need to do to get this working with email validation turned off?
I have not downloaded or installed anything yet.
Any help is most appreciated:cool:
wes_517
12-01-2006, 01:52 AM
While trying to find something that will require moderation before giving access to the group, I saw a few people were interested, here's one version of code, it may not be pretty, but it works...
it also doesn't email out, but it does the job.
when they register, if field 23 is a hit, it adds them into the moderation table of the database.
// Get the value for field 23
$user = $db->query_first("
SELECT field23
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
$id = $vbulletin->userinfo['userid'];
$time = time();
$sql_string = "SELECT field23
FROM " . TABLE_PREFIX . "userfieldWHERE userid = " . $vbulletin->userinfo['userid'] . "";
switch ($user['field23']) {
case "CASE1":
break;
case "CASE2":
$sql_string = "INSERT INTO vb_usergrouprequest (userid, usergroupid, reason, dateline)
VALUES ('$id','77','New Registration','$time')";
break;
case "CASE3":
$sql_string = "INSERT INTO vb_usergrouprequest (userid, usergroupid, reason, dateline)
VALUES ('$id','67','New Registration','$time')";
break;
case "CASE4":
$sql_string = "INSERT INTO vb_usergrouprequest (userid, usergroupid, reason, dateline)
VALUES ('$id','14','New Registration','$time')";
break;
case "CASE5":
$sql_string = "INSERT INTO vb_usergrouprequest (userid, usergroupid, reason, dateline)
VALUES ('$id','13','New Registration','$time')";
break;
case "CASE6":
$sql_string = "INSERT INTO vb_usergrouprequest (userid, usergroupid, reason, dateline)
VALUES ('$id','32','New Registration','$time')";
break;
}
$answer = $db->query_first($sql_string);
I can do PHP, but efficiency isn't a strong point within VB yet for me, so if anyone would like to improve the code, feel free and I'd appreciate it.
the duplicate SQL string is me after a long day just trying to make sure that SOME sql happens if none of the cases are hit, it would probably be just as good to check the sql to see if there is a string...
Murty
12-10-2006, 10:18 PM
Does anyone know if this will work for 3.6?
Woot for 200 posts :)
I was wanting it for 3.6 as well, any ideas anyone?
Murty
01-22-2007, 05:10 AM
amykhar said that she has it working, so it should probly work.
FireFish
01-25-2007, 03:28 PM
It would be nice to be able to allow multiple instances of this running for different user groups based on different values.
Not sure what i'm doing wrong, here is the code i'm using, it is field5 that i'm wanting, and 'Female' is what i'm looking for, to put into group 33, if they aren't Female, then group 2. What have i done wrong?
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="vbulletin">
<title>Put User in Secondary Group Based on Custom Profile Field Value</title>
<hookname>register_activate_process</hookname>
<phpcode><![CDATA[// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'Female')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 33";
}
else
{
$membergroupids = 2;
}
$userdata->set('membergroupids', $membergroupids); }]]></phpcode>
</plugin>
</plugins>
FireFish
01-26-2007, 08:40 PM
Not sure what i'm doing wrong, here is the code i'm using, it is field5 that i'm wanting, and 'Female' is what i'm looking for, to put into group 33, if they aren't Female, then group 2. What have i done wrong?
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="vbulletin">
<title>Put User in Secondary Group Based on Custom Profile Field Value</title>
<hookname>register_activate_process</hookname>
<phpcode><![CDATA[// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'Female')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 33";
}
else
{
$membergroupids = 2;
}
$userdata->set('membergroupids', $membergroupids); }]]></phpcode>
</plugin>
</plugins>
Here's your problem:
{
$membergroupids = 2;
}
Should be:
{
$membergroupids = 33;
}
It knows to put others who enter anything but Female into 'Users Awaiting Confirmation'
How do I update the currently registered users for this? Where to I place the hook?
I'm using it as a gender mod.
FireFish
03-19-2007, 03:41 PM
Good question: Here's what I did:
I made the new Profile Field for this mod as 'Private', which means once it is entered, the field doesn't show up to be editted by the user or shown.
However, the problem lies in the existing users.
What you do is run a SQL Statement to update the value of that field for all users to, say, 'none'.
This script only works for new registrations ongoing.
If a user adjusted the value of that field, it won't add them to your secondary group unless it was while they were registering.
You should make the default value 'none' & instruct your visitors to only fill in their 'Invitation Code' if they were given one.
Medina
04-12-2007, 07:37 PM
I'm having a problem with this nice hack.
When NEW members on my forum register and choose from the custom-field (male or woman) they won't see at all the special corners that are made for male/woman members. This hack does work with existing members. Who could help me with this.
At the begin it worked fine, but now it seems their is a strange problem with it, i self think that it's at the hook location.
I would be thankfull.
Medina
MAXpowerPXL
04-16-2007, 07:38 AM
Would this plugin work for adding a user to more than one secondary usergroup? For example if I added a "multiple selection checkbox" custom profile field, could it add the user to 2 or 3 differnt public usergroups if the user checks 2 or 3 checkboxes?
so it can work with only one choice..?
what if I want "male" "female" "couple" to create 3 different usergrups?
TIA
:confused: I am also wondering about this..
I have about 10 usergroups.. I would like to let users join one more (even all).
Medina
04-16-2007, 09:26 AM
dear amy,
is this plugin also for 3.6 suitable?
Regards
Medina
asaeed
04-25-2007, 03:00 PM
amy
i want to use your ads with out
require users to verify their email address upon registration
i dont use that in my fourm
Medina
05-20-2007, 03:10 PM
can i please have a reply on my question :o
Murty
05-20-2007, 11:42 PM
can i please have a reply on my question :o
Hey medina, i dont think you will be able to contact amy through this thread. you will probably have to send her a pm. But to save you the hassle, i have already PMed her and she said it works fine, but i have put it on and stuff around with it for ages and still havent go it to work. I now have someone making a whole new mod for me. Once hes finished it and ive tested it, i will let you know and you might be able to buy a copy from him if you really need it.
Hope that helps.
Medina
05-21-2007, 06:35 AM
Hey medina, i dont think you will be able to contact amy through this thread. you will probably have to send her a pm. But to save you the hassle, i have already PMed her and she said it works fine, but i have put it on and stuff around with it for ages and still havent go it to work. I now have someone making a whole new mod for me. Once hes finished it and ive tested it, i will let you know and you might be able to buy a copy from him if you really need it.
Hope that helps.
Hello Murty,
Thank for your reply.
I'm two days busy with Amy's plugin, but i won't work on 3.6.5. I think that you first have to install vb 3.5. and install Amy's plugin and so you have to upgrade it to 3.6.
Is that maybe a option? Or am i talking bullshit. :D
Anyway if your new mod is all done Murty can you please response on this topic, so i can take a look to the new mod.
Thank you
Regard,
Medina
Murty
05-22-2007, 08:21 PM
Yeah i stuffed around with it as well. To be honest the mod didnt really ever work for me properly on 3.5 anyways. I am still awaiting for my mod to be completed, but i will let you know when its done.
Murty
05-29-2007, 10:49 PM
Hey guys,
For those of you interested, a guy has created a modification that will move users to a specified usergroup depending on a profile field selection.
For me, when a user registers, they need to select whether they are male or female. Once they have registered, depending on whether they selected male or female, they get moved to the male or female user group i created.
You are able to get this mod by sending an email to: hugh@alaweb.com and requesting the 'user profile group modification'.
This mod was not made for free, so it will cost you $25.00 US.
I have tested it with vb 3.6.5 and it works great, highly recommend!
PM me if you want more info.
ahmedeldeep
07-09-2007, 05:51 PM
Thank you
groeken
09-22-2007, 07:57 PM
Hello,
is anybody here using this mod on vb 3.6.8? Im not sure but on my site it wont work.
I am, and it's working fine :)
groeken
09-24-2007, 08:10 PM
mhh.. then must be an error in my syntax, i think. Maybe anyone has an idea what is wrong..
the main problem is that if i had to activate more than 1 user at the same time the users will be put in the same group, allthough they had different choices for the selected field.
$user = $db->query_first("SELECT field8 FROM " . TABLE_PREFIX . "userfield WHERE userid = '" . $vbulletin->userinfo['userid'] . "'");
if ($user['field8'] == '1. Fachsemester') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 17";
}
else {
$membergroupids = 17;
}
$userdata->set('membergroupids', $membergroupids);
}
elseif ($user['field8'] == '2. Fachsemester') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 18";
}
else {
$membergroupids = 18;
}
$userdata->set('membergroupids', $membergroupids);
}
elseif ($user['field8'] == '3. Fachsemester') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 19";
}
else {
$membergroupids = 19;
}
$userdata->set('membergroupids', $membergroupids);
}
elseif ($user['field8'] == '4. Fachsemester') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 20";
}
else {
$membergroupids = 20;
}
$userdata->set('membergroupids', $membergroupids);
}
elseif ($user['field8'] == '5. Fachsemester') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 21";
}
else {
$membergroupids = 21;
}
$userdata->set('membergroupids', $membergroupids);
}
elseif ($user['field8'] == '6. Fachsemester') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 22";
}
else {
$membergroupids = 22;
}
$userdata->set('membergroupids', $membergroupids);
}
elseif ($user['field8'] == 'Diplom oder spaeter') {
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids) {
$membergroupids = $membergroupids . ", 23";
}
else {
$membergroupids = 23;
}
$userdata->set('membergroupids', $membergroupids);
}
any ideas?
groeken
Ramsesx
04-20-2008, 08:07 AM
Does this work for 3.7?
Yes it works for me on 3.7 RC1
Doesn't work for me on 3.7 gold, database error apon sign up.
MG Webmaster
06-09-2008, 09:12 PM
So does it work on 3.7.1????
biome.pat
09-17-2008, 03:42 PM
Hey folks! I've read through this whole thread, and can't seem to find anyone with the same problem (except maybe Murty in post #63). It seems that the plugin works for most registrations, but a few users end up in the wrong category. To explain, I've got it set up so field5 is a single-selection menu where members/students pick their year of study. I have it set up so that if they pick "Year 1" from the pull-down (instead of the other options of "Year 2", "Year 3", "Year 4+", "Grad Student" or "Alumni/Other"), they're put in a special usergroup with different forum access (called "Year - 1"), while if they pick anything else, they're put in another usergroup (called "Year - Other").
Settings are like so:
Set Default: Yes, Including a First Blank
Field Required: Yes, at Registration and Profile Updating
Field Editable by User: Only at Registration
Private Field: No
Field Searchable on Members List: Yes
Show on Members List: Yes
Every few days, I've been doing a search for students who have both "Year 1" chosen in the profile field, and are in "Year - Other" usergroup. If I'd set this up correctly, there shouldn't be any users found, but there are always a few.
Any ideas? It might be important to mention that the board has a high registration volume at the beginning of the academic year, so we've had over 1000 new users in 48 days.
// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'Year 1')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 13";
}
else
{
$membergroupids = 13;
}
$userdata->set('membergroupids', $membergroupids);
}
else
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 14";
}
else
{
$membergroupids = 14;
}
$userdata->set('membergroupids', $membergroupids);
}
Any insight would be muchly appreciated!
biome.pat
09-17-2008, 05:10 PM
Alright, so after doing 30 or so registrations is different browsers (and changing "Set Default" to "No", so that each registrant has so select the menu and choose an option (as opposed to first year's just seeing it already selected and leaving it), it seems it's an IE issues. After I changes the "Set Default" option, firefox never seems to have any problems (an it did once or twice before), but IE never puts them in the right category. They automatically end up in the usergroup indicated by the else statement (id:14 or "Year - Other"). Any ideas here folks? I'm baffled!
Levo1980
12-30-2008, 03:30 PM
sorry my english ist not the best
i have import the xml and befor i import this i have changed this like this:
// Get the value for field 8
$user = $db->query_first("
SELECT field8
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field8'] == 'weiblich')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = $membergroupids . ", 10";
}
else
{
$membergroupids = 10;
}
$userdata->set('membergroupids', $membergroupids); }
But it doenst work....
I use VB 3.6.6 and on fild8 they have to select m?nnlich or weiblich (male or female), i want that all "weiblich" go to the secondary usergroup ladies which have the the ID:10.
Can somebody help me???
Bellinis
02-26-2009, 09:55 AM
Dear amykhar & others,
I'd been looking for such mod for a long time. Will this one still work for 3.8? I'm affraid not....
Is there an updated version of some similar mod?
Thanks a lot in advance!
sensimilla
04-07-2009, 02:22 PM
Dear amykhar & others,
I'd been looking for such mod for a long time. Will this one still work for 3.8? I'm affraid not....
Is there an updated version of some similar mod?
Thanks a lot in advance!
Same here.. I am in need of this hack.
Any way to make this happen any time they change fields, not just on registration?
GHC Webmaster
12-31-2009, 07:46 AM
I'm trying to get this mod to work on VB4.0 but it does not seem to work anymore. Would you be willing to modify the mod for vb4?
The relevant hook is still there I noticed. I especially need the gender example you posted in your original post.
Thanks in advance!
Regards,
Walrick
Artes_Marciales
04-09-2010, 06:54 PM
Dear amykhar & others,
I'd been looking for such mod for a long time. Will this one still work for 3.8? I'm affraid not....
Is there an updated version of some similar mod?
Thanks a lot in advance!
Same here.. I am in need of this hack.
coffee
05-08-2010, 03:38 AM
Installed on vBulletin 4.0.3 PL1 and is perfect !
bulldog51981
01-04-2011, 06:29 PM
I had this mod working perfect until we updated to 4.1, I would be willing to donate if this could be updated please! I use it for the gender example and it was working great!
Stormlilly
01-11-2011, 03:24 AM
I have a need for this too :) Would be great if it could be updated.
RebelliousKrimp
02-08-2012, 12:13 PM
I would also love an update on this mod, if you would be so kind. :)
Tagged for now, I eagerly await your (hopeful) enthusiasm to rework it! =D
temsamane
04-03-2012, 08:07 PM
i need this mod for vb4
Tyran1
04-10-2012, 01:08 AM
need a fix for 3.8.7 please!!!!!
mavherzog
04-23-2012, 10:44 AM
i need this mod for vb4
Ditto!!
Rebecca217
08-14-2012, 01:55 PM
Same here. :) Would be willing to donate.
imported_FreDy
09-07-2012, 10:35 AM
I need this mod for vB4 too... I would pay for it
Ramsesx
09-22-2012, 07:39 PM
It shouldn't be too hard to get this running, it's just a simple sql query more or less.
Couldn't one of the coders here give a hint?
BenniX12
01-01-2013, 02:06 PM
Hi!
I figured out how to modify the code. The code works fine when it is inserted after line 1507. This is just behind the hook "($hook = vBulletinHook::fetch_hook('register_activate_proce ss')) ? eval($hook) : false;"
The code is:
// Get the value for field 5
$user = $db->query_first("SELECT field5 FROM " . TABLE_PREFIX . "userfield WHERE userid = $userinfo[userid]");
if ($user['field5'] == 'Test')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = 9;
}
else
{
$membergroupids = 9;
}
$userdata->set('membergroupids', $membergroupids);
}
My prob is, that it does not work when I use it as a plugin. Could anybody help?
I guess .... but it did'nt work
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="vbulletin">
<title>Put User in Secondary Group Based on Custom Profile Field Value</title>
<hookname>register_activate_process</hookname>
<phpcode><![CDATA[// Get the value for field 5
$user = $db->query_first("SELECT field5 FROM " . TABLE_PREFIX . "userfield WHERE userid = " . $vbulletin->userinfo['userid'] . "");
if ($user['field5'] == 'Mathebuch')
{
$membergroupids = $userdata->fetch_field('membergroupids');
if ($membergroupids)
{
$membergroupids = 9;
}
else
{
$membergroupids = 9;
}
$userdata->set('membergroupids', $membergroupids);
$userdata->save();
}]]></phpcode>
</plugin>
</plugins>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.