View Full Version : Editing ModCP?
Urges
08-31-2005, 01:19 PM
I have a few things I would like to be able to do here, so I was wondering if anyone could help.
I would like to remove certain tools from modcp, and limit the time mods can ban users (3 weeks, or any time period below). This would be modcp1.
I would like to create another mod cp with all the tools removed from modcp1 enabled at another location, e.g. "domain.com/modcp2" (for super mods).
How do I prevent normal mods from accessing modcp2? Password it? How do I do this? (lol...).
Thanks for any help.
Biker_GA
08-31-2005, 01:25 PM
I think it would be easier to just use Kirby's permission plugin and allow/disallow your mods from using certain functions on the site.
Urges
08-31-2005, 01:32 PM
I think it would be easier to just use Kirby's permission plugin and allow/disallow your mods from using certain functions on the site.
Link please?
I'll check it out, although what I said above is what I want to do really...
I know it can be done, because I was a moderator on a board that did that once...
Biker_GA
08-31-2005, 01:33 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=91121" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=91121</a>
Urges
08-31-2005, 01:45 PM
I would still prefer to do it the way posted above I think, so if anyone can help please do.
I will have a look at that hack later.
Biker_GA
08-31-2005, 01:48 PM
Keep in mind, with that hack, only those items the moderators have permission for will show in the ModCP.
Urges
08-31-2005, 06:36 PM
Anyone else got any ideas on how to do what I asked?
Andreas
08-31-2005, 06:42 PM
1.) Only Links where Moderators have Permission will show up.
So it doesn't make sense to remove certain entries?
2.) This can be done with a Plugin, and IIRC I already posted the Code somewhere ...
3.) You could simply check if the User accessing it is a Supermod. If he isn't, issue an Error.
This can be done with a Plugin as well.
Urges
08-31-2005, 06:48 PM
Heh, could you possible link me to those plugins? I've done some searching but can't find what I want...
Thanks a lot :).
Andreas
08-31-2005, 06:50 PM
Erm ... I said it can be done with Plugins.
I didn't say that those Plugins do exist already ;)
Urges
08-31-2005, 07:36 PM
I installed the super moderator permissions plug, and that does pretty much everything I want, except I can't limit the amount of time moderators are allowed to ban for, and I can't add extra administrative tools into Smod CP.
I'm pretty fussy :P.
Does anyone know how I can manually remove and add mod tools, and manually create another modcp, (which is password protected - this will be given out to super moderators), and add/remove tools from there.
Thanks a lot.
Andreas
08-31-2005, 07:41 PM
Add: Hook mod_index_navigation
Remove: Not possible without File Edits. However, this should not be necessary as only those Entries where the User has Permission will show up.
To limit the amount of time for a Ban, take a look here:
https://vborg.vbsupport.ru/showthread.php?t=93459
Urges
08-31-2005, 08:03 PM
Add: Hook mod_index_navigationWhat do you mean by that? I appologise for my incompetence, and thank you.
Andreas
08-31-2005, 08:04 PM
I mean that you can add Code to Hook mod_index_navigation the extend the ModCP Navigation Frame.
Urges
08-31-2005, 08:13 PM
I mean that you can add Code to Hook mod_index_navigation the extend the ModCP Navigation Frame.
...And how would I go about doing that? Lol, I do appologise, I have no experience when it come to editing vB...
Also, the 3 week ban plugin only allows the moderator to ban for a period of 3 weeks, nothing less. The object is so that they can ban for the time periods of 1 day - 3 weeks. Oh, and there is no way to separate the 3 week ban permission from modcp to smodcp (who should be able to to ban for any of the default periods of time).
Perhaps you should just give up on me now? :P.
Thanks.
Andreas
08-31-2005, 08:29 PM
Well, your request was "for 3 weeks ONLY.", so the Plugin exactly implements this :)
If you want "for up to 3 weeks ONLY", use this Code instead:
function my_convert_date_to_timestamp($period)
{
$p = explode('_', $period);
if ($p[0] == 'P')
{
$time = 0;
return 0;
}
else
{
$d = explode('-', date('H-i-n-j-Y'));
$date = array(
'h' => &$d[0],
'm' => &$d[1],
'M' => &$d[2],
'D' => &$d[3],
'Y' => &$d[4]
);
/*if ($date['m'] >= 30)
{
$date['h']++;
}*/
$date["$p[0]"] += $p[1];
return mktime($date['h'], 0, 0, $date['M'], $date['D'], $date['Y']);
}
}
if ($_REQUEST['do'] == 'dobanuser' AND my_convert_date_to_timestamp($vbulletin->GPC['period']) > (TIMENOW+1814400) AND !($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']))
{
print_stop_message('no_permission_ban_users');
}
The Code you have to put in Hook mod_index_navigation depends on what you want to do, therefore I can't tell.
There is no "SMod CP" - just a ModCP that can be accessed by Moderators, Supermods and Admins.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.