Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Allow Limited Usergroup Changes Through ModCP Details »»
Allow Limited Usergroup Changes Through ModCP
Version: 2.00, by Christine Christine is offline
Developer Last Online: May 2012 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-27-2004 Last Update: 07-09-2005 Installs: 25
DB Changes
Code Changes  
No support by the author.

09 July 2005 UPDATE: Changegroup.php reworked for security

Thanks to boy genius KirbyDE this file has been reworked to secure that users who aren't already in your selected groups cannot be changed by your mods (with a check on attempted overrides).

To update, simply upload the new changegroup.php file in the zip to your /modcp/ directory. No other changes/modifications need to be made.

Please post if there are any problems!

######################################

08 May 2004 UPDATE: Modified file for error reported in post #16

Please download the new file and replace the old one with it. Post if there are any problems!

######################################

Hi all!

Here is the deal with this hack. We have usergroups set up with various permissions, mostly based on limiting their functions if they abuse their rights as a member (limiting them from certain forums, putting them under moderation, etc...).

Our mods need to be able to move our members into (and out of) these restricted groups rather than banning them, but at the same time, they should not be able to move members into (or out of) the mod, admin, waiting for confirmation groups, etc...

NOTE: Banned Groups are NOT touched in this hack -- this is for all groups OTHER than those addressed by the banning function as I wanted to keep that seperate!


What this hack does:

  • Add a token to each usergroup that the admin can set to say 'yes' or 'no' that the mods can move users into and out of the group.
  • Adds a token on the mod permissions level -- super mods can change allowable groups by default, and regular mods can only make these changes if you assign it on a mod by mod basis.
  • Adds the functionality to the ModCP for the mods to make the changes.
Changes that need to be made:

Phrases to add: 5

PHP file edits:
  • admincp/usergroup.php (1 change)
  • admincp/moderator.php (1 change)
  • includes/init.php (2 changes)
  • modcp/user.php (4 changes)
New PHP file:
  • changegroup.php (attached in this zip -- upload to your modcp folder)
Included in this zip:
  • Modification .txt file
  • changegroup.php
  • Screenies!
The screen shots below are of the ACP -- adding the tokens to the Usergroup and giving permissions to the mods.

Enjoy, and as always, if anyone has any constructive feedback, or needs any help, post away.

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 04-29-2004, 11:03 PM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This hack would be even better and like Xenons More Powers for Mods hack if you could DEFINE WHICH groups a Moderator could modify. Could that be implemented? Even if it is hardcoded?

Im trying to allow certain MODS to change only certain groups they are allowed to change. I have 3 differetn mods for 3 different section on my boards and I dont want them messing with other groups.

Could this be added? Maybe by adding the GROUP IDs into the ADMINCP somewhere that a Group can modify.
Reply With Quote
  #13  
Old 04-30-2004, 01:25 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@ OGT -- Sorry, I missed your post. Let me look at that.

@BLackxRam - This is what this hack does. It adds a radio button into the modify Usergroup section of the Admin CP that says "Modifiable Group" Y/N. If you have this radio button set to Yes on the usergroup, it will show up in the dropdown for the mods. If you set it to no, it won't, so they can't change people into it.




Edit to add -- OGT, that one is a typo that was entered twice but won't hurt anything. I didn't include Banning as that is a seperate permission and I didn't want to exclude those who can't ban from being able to change usergroups. You can take that out as a duplicate entry, or if you want only those who can ban to change groups, change it to canbanusers.
Reply With Quote
  #14  
Old 05-01-2004, 05:41 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know I understand that, however what I meant was, I have other mods that I dont want to be able to change certain groups. Like I am looking to have Moderator Group A being able to change usergroups 7, 9, 11 while Moderator Group B can change usergroups 8, 10, and 12. That kind of thing.
Reply With Quote
  #15  
Old 05-01-2004, 05:42 AM
BlackxRam BlackxRam is offline
 
Join Date: Aug 2003
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just like Xenons hack for vb2
Reply With Quote
  #16  
Old 05-01-2004, 06:45 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HI BlackxRam,

I am not familiar with Xenon's vB2 hack as I had written my own back then. I understand what you are looking for now though, but this won't do that without some extensive modifications. Unfortunately, I only use Supermods on my site, so don't have the various mod groups to test this on.

Sorry I couldn't help. You may want to check to see if that hack is in the works to be ported?
Reply With Quote
  #17  
Old 05-04-2004, 09:36 PM
Sidewindr Sidewindr is offline
 
Join Date: Oct 2002
Location: Australia
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There appears to be a bug in changegroup.php if the username being modified has any quotes in the name, see the error below.

Code:
Database error in vBulletin 3.0.1:

Invalid SQL: 
UPDATE user SET

usergroupid = 8
WHERE username = 'big_kev's_ss'

mysql error: You have an error in your SQL syntax near 's_ss'
' at line 5

mysql error number: 1064

Date: Monday 03rd of May 2004 08:59:16 PM
Script: changegroup.php
Reply With Quote
  #18  
Old 05-06-2004, 01:05 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Sidewindr - I will fix...

Edit to add: Please download the new zip and replace the changegroup.php with the one you have now and let me know if this is working.
Reply With Quote
  #19  
Old 05-06-2004, 07:35 AM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack but now that i use a promotions system
it would be great to allow moderators the ability to add users to additional groups
Reply With Quote
  #20  
Old 05-06-2004, 12:10 PM
Sidewindr Sidewindr is offline
 
Join Date: Oct 2002
Location: Australia
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep working like a charm now .. thanks :up:
Reply With Quote
  #21  
Old 05-07-2004, 03:01 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Sidewindr. I sent out an update for it.

Hi msimplay, That wouldn't take much to do -- just add the checkboxes and the logic for membergroupids to be inserted into the database. As long as you keep the restriction of the usergroups that you set up as modifiable, that is all they would see as options.

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 03:45 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.05433 seconds
  • Memory Usage 2,305KB
  • Queries Executed 26 (?)
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)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete