vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Allow Limited Usergroup Changes Through ModCP (https://vborg.vbsupport.ru/showthread.php?t=62018)

Christine 02-27-2004 10:00 PM

Allow Limited Usergroup Changes Through ModCP
 
09 July 2005 UPDATE: Changegroup.php reworked for security

Thanks to boy genius KirbyDE :D 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.

:)

Christine 02-28-2004 09:53 PM

And here are the ModCP screen shots -- this is what the Mod will see when they go to edit the users' usergroups:

Chris M 02-28-2004 11:14 PM

Nice idea for a hack! :)

Satan

Christine 02-28-2004 11:39 PM

Thanks! :)

Our team LOVES this. I wrote it back for 2.0.6 but never released it through the upgrades because it was really messy -- I was lazy and hardcoded the usergroupids directly into the php file. Heh.

:confused:

Limitter 03-06-2004 06:32 PM

Christine
by change from Group come an error

/modcp/changing.php

????

thx

L.

Christine 03-06-2004 10:17 PM

Hi Limitter,

I put the test php file in the zip by mistake. Thank you for finding that!!

I have reuploaded it -- please let me know if you have any problems!

Allan 03-07-2004 05:54 AM

Nice idea Christine :), thanks you :)

Limitter 03-07-2004 07:11 AM

Yes Christine,

thx for your Support and Thx for the Hack my team is Happy :)

*install*

Limitter

OGT 03-28-2004 12:23 AM

From 'mods change usergroups.txt'
Quote:

Replace with:

if (!can_moderate(0, 'canunbanusers') AND !can_moderate(0, 'canunbanusers') AND !can_moderate(0, 'canmodify') AND !can_moderate(0, 'canviewprofile') AND !can_moderate(0, 'caneditsigs') AND !can_moderate(0, 'caneditavatar'))
should the bold text read

PHP Code:

!can_moderate(0'canbanusers'

if not, should it be removed from the if?

Great hack BTW!

sifuhall 04-06-2004 06:46 PM

Thanks for the wonderful hack!


All times are GMT. The time now is 09:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01697 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete