The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Usergroup Permissions based off Profile Options
Hi Guys,
Looking for a modification that would allow me to select a usergroup based off of a profile option. For instance, if I had a question: "Are you selling goods?" And it is "Yes" or "No" values, I could specify: If "Yes" change usergroup to X. Would this be possible for vBulletin 4? |
#2
|
|||
|
|||
Sorry to do this, but is anyone willing to help with this?
|
#3
|
|||
|
|||
So I tried to do this myself and the code isn't working. Could someone look into this for me?
I made a plugin and it's hooklocation is profile_updateprofile PHP Code:
This is for vBulletin 4.0 by the way. |
#4
|
||||
|
||||
on which hook are you setting this? this code should run after the user has registered in the forum, therefore it should run depending if you are asking your users to validate their email or not and for the people who already are in there, you would need to run a script that will move them to the user group if your forum is too big, but if its small one, less than 50 users or so i suppose it can be done manually
|
#5
|
|||
|
|||
Quote:
"profile_updateprofile" That's the hook I am using. I want users to be switched after they edit their profile not after they register. Since there is no promotion system that supports being based off profile fields, I need something like that. |
#6
|
||||
|
||||
okay, well, your code is requestin the db for data the vbulletin main array already contains, so, try this code and tell me if it works:
PHP Code:
|
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
Quote:
why are you trying to edit the main group and not just add your members to a sub group? it would be much easier AND most of all, you wont overwrite a mod/admin permission if said person tweaks with that button |
#9
|
|||
|
|||
Quote:
|
#10
|
||||
|
||||
PHP Code:
--------------- Added [DATE]1266007473[/DATE] at [TIME]1266007473[/TIME] --------------- well, it might be cleaner but, if a co-admin / moderator clicks yes/no his main permission will be overwritten, even you run the risk to get your main permission overwritten, so, dont mess with main usergroups unless you *REALLY* know what you are doing, and as well i hope you are testing this in a password protected forum away from your live one |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|