![]() |
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?
|
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 ?? |
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.
|
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']"> 3- save. done ! |
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.
|
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. |
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.
|
All times are GMT. The time now is 01:32 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|