UBB.Dev
Posted By: Nycore cp hack, limit moderator and admin options? - 01/15/2005 5:23 PM
Read through the post at top about hacking the cp.cgi and am currently trying to sort it all out. Figured Id ask in the event that the solution is quick:

I want to remove some of the options that moderators have and also remove many admin options. Id like the control panel to look almost totally empty of options with a few more in the admin. I'll make a backup of the edited files so I can always have full admin control by restoring the original vars file.

For example, I dont want admin or mods to have the ability to change the STYLE or appearance. I just want to remove those links entirely via the cp.cgi. I also want to remove paths link even though I have the vars_pathlock installed.

Ive got an admin who constantly clicks the wrong things and costs me hours or repair smile

Am assuming its just a vars file that has the options. And would it be safe to say that I could also add moderator options if necessary?

Thanks in advance
Posted By: Ron M Re: cp hack, limit moderator and admin options? - 01/15/2005 6:05 PM
Check out https://www.ubbdev.com/ubb/ultimatebb.php/topic/33/103.html for a way to keep moderators out of the CP entirely.
thanks, thats a great alternative but if possible Id still like to change what controls the admin has as well. I need my admins to control simple ip bans and other options but not change layout and prune and mass delete etc.
What version of UBB are you using? If 6.6 or above, I can help
6.7.0

Ive done several hacks over the years I just dont yet know what lines to change myself to remove the options. And it probably doesnt have to work perfect just so long as the functioning options work. I'll keep the original vars file for when I need to get in there and take control since Im the only person with server access.
ok, to remove pages for mods

In cp2_lib.cgi
Code
MOD_MENUS_TIER_ONE => [
[$vars_wordlets_cp2{moderator_home}, qw(modhome forums prune massmove rebuilds)],
],
remove "forums" to disallow them to do things like renaming the forum and changing the styles.


In cp2_lib.cgi
Code
[$vars_wordlets_cp2{admin_master},	qw(paths primary genpermissions)],
To remove the paths page, well, remove "paths".

In cp2_lib.cgi
Code
[$vars_wordlets_cp2{admin_display},	qw(general wordlets styles)],
To remove the styles page for admins, remove.... "styles"
Awesome. Stripped everything down and remaining options work) and I think I can figure out how to give moderators some admin options such as IP bans which they normally dont have.
© UBB.Developers