The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Change usergroup?
Anyone have some php code for changing a users group? Is there a simple way to do it that I can add to a template or am I going to have to add a php file to do it and have the template "post" to it?
|
#2
|
||||
|
||||
I didn't understand your question very well, If you could make it a but more clear it would be good.
You want to change one of your user's usergroup?? OR you want to give permissions to X usergroup to use a specific style ?? |
#3
|
|||
|
|||
You know when you click the users name on their post it shows "View public profile" etc. I want to add an option to change the user's group to a specific group.
|
#4
|
||||
|
||||
oh... i get it..
ok let me check that, I guess its not hard to add an option. I'll edit my post if i find a way to do it. --------------- Added [DATE]1256590480[/DATE] at [TIME]1256590480[/TIME] --------------- Ok i found a way to do this. 1- go to your Admin CP > styles & templates > Search in templates. look for postbit_legacy or postbit. if your forum posts looks like here then edit "postbit" but if you use the vertical mode then edit "postbit_legacy", of course you can edit both if you wish. 2- Search for "$template_hook[postbit_user_popup]" above add: Code:
<if condition="$show['admincplink']"> <tr><td class="vbmenu_option" <a href="moderator.php?$session[sessionurl]do=useroptions&u=$post[userid]">Edit User Profile</a></td></tr></if> 3- save. done ! |
#5
|
|||
|
|||
Thanks, but I am more interested in having it change the user's usergroup to specific one when clicked. Also I want to allow moderators to do this.
|
#6
|
||||
|
||||
oh.. ok then you'll need someone with more experience in coding. I design vb styles but i dont know much about coding. this is all i can help with.
good luck. |
#7
|
|||
|
|||
Changing the usergroup involves executing SQL queries which means running a query every time it is clicked. I'm also pretty sure it's not possible to run queries in templates which means you'd have to hook it to a plugin in order to run the query.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|