Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-26-2009, 07:18 PM
high6 high6 is offline
 
Join Date: Jun 2008
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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?
Reply With Quote
  #2  
Old 10-26-2009, 07:21 PM
Lautaro's Avatar
Lautaro Lautaro is offline
 
Join Date: Jan 2009
Location: United States
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 ??
Reply With Quote
  #3  
Old 10-26-2009, 07:28 PM
high6 high6 is offline
 
Join Date: Jun 2008
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 10-26-2009, 07:34 PM
Lautaro's Avatar
Lautaro Lautaro is offline
 
Join Date: Jan 2009
Location: United States
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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&amp;u=$post[userid]">Edit User Profile</a></td></tr></if>
That will show add the link "Edit user profile" in the list and only users with admin CP access will see it.

3- save.

done !
Reply With Quote
  #5  
Old 10-26-2009, 08:20 PM
high6 high6 is offline
 
Join Date: Jun 2008
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 10-26-2009, 08:36 PM
Lautaro's Avatar
Lautaro Lautaro is offline
 
Join Date: Jan 2009
Location: United States
Posts: 233
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 10-26-2009, 11:44 PM
James Birkett James Birkett is offline
 
Join Date: Jun 2009
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04927 seconds
  • Memory Usage 2,217KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete