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
  #52  
Old 07-10-2005, 12:34 AM
Dark_Konoko's Avatar
Dark_Konoko Dark_Konoko is offline
 
Join Date: Dec 2004
Location: Reading, South England.
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Christine are you sure that you have added the updated Changegroup.php to the zip? Any user with access to the ModCP is still able to change usergroup levels like so:

modcp/changegroup.php?do=changeuser&u=*usernumberhere*
Reply With Quote
  #53  
Old 07-10-2005, 12:42 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm, all Files in the ZIP are dated 2004, and cahngegroup.php doesn't seem to be the current Version, at least it differs from the File I have.
Reply With Quote
  #54  
Old 07-10-2005, 12:49 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dark_Konoko,

It didn't overwrite the zip. Likely a problem between the seat and the keyboard.

It is there now -- please verify that this is working for you.

Thanks!
Reply With Quote
  #55  
Old 07-10-2005, 01:03 AM
Dark_Konoko's Avatar
Dark_Konoko Dark_Konoko is offline
 
Join Date: Dec 2004
Location: Reading, South England.
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Confirmed. Works great now Thank you to both you and KirbyDE.
Reply With Quote
  #56  
Old 07-10-2005, 01:50 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All credit to KirbyDE for figuring this out.

I am just responsible for PEBSAK (problem exists between seat and keyboard) upload errors.

Thank you muchly for catching this so quickly.
Reply With Quote
  #57  
Old 07-10-2005, 02:43 AM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Apologies for missing earlier questions -- I have updated my subscription on this thread for email notification. :redface:

@Watson
You give mod access by editing the mods rights -- Smods and Admins have by default

@mustang_lex
That is up to you. The hack allows you to choose via usergroup permissions which groups can be changed and which can't.
Reply With Quote
  #58  
Old 07-22-2005, 04:01 AM
Acedeal Acedeal is offline
 
Join Date: Jul 2005
Location: Texas
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Christine

your say to search for;
PHP Code:
$cell[] = iif($canbanusersconstruct_link_code($vbphrase['ban_user'], "banning.php?$session[sessionurl]do=banuser&userid=$user[userid]")); 
but mine is
PHP Code:
$cell[] = iif($canbanusers'<span class="smallfont">' construct_link_code($vbphrase['ban_user'], "banning.php?$session[sessionurl]do=banuser&amp;userid=$user[userid]") . '</span>'); 
big difference on the lines, and what prob's is it going to cause?

also,
where do i find the screen you posted that shows the users permissions?
https://vborg.vbsupport.ru/attachmen...chmentid=17010

Found it, but the words are blank, must have something to do with the code above being a bit different

Code:
Can Restore Banned Users  	Yes No 	
	                                    Yes No
Can Edit User Signatures         Yes No
words are missing for that cell.

[UPDATE]
FIXED-

only problem I have is that it moves them from one group to another-
any way to make it add them to groups instead of removing them from group-

Hench the name group moderator
I need my group moderators to be able to add people / take people away from groups, just not shuffle from one group to another-

Other then that- nice mod.
Reply With Quote
  #59  
Old 07-22-2005, 08:55 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Acedeal,

The difference was in the addition of a span class for a font declaration.

Do you have this working as you need it to for your team?
Reply With Quote
  #60  
Old 07-22-2005, 09:10 PM
Acedeal Acedeal is offline
 
Join Date: Jul 2005
Location: Texas
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Christine.
It's working as intended.
(looking at code to see how to make it Add users, instead of moving them to a new group)

Nice mod
Reply With Quote
  #61  
Old 07-26-2005, 05:26 PM
MThornback MThornback is offline
 
Join Date: Apr 2005
Location: Canada
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My super mods can't edit user groups but they can do everything else i've selected them to be able to....like sigs, avatars etc....

They get the no permission message even though they should be allowed given they are super mods....

Error is: "You can't change user groups for users who are not considered normal, registered users"

No SQL errors at all...I have no idea what if anything I might have done to make it ALMOST work 100%....help please
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 02:16 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.06182 seconds
  • Memory Usage 2,317KB
  • 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
  • (2)bbcode_php
  • (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
  • (4)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