UBB.Dev
Posted By: Keet Admin menu for Moderators - 05/11/2002 6:47 AM
is there a simple way to hack things so that moderators can't change board settings? i don't see templates for the admin menu?
just i like having people to help with stuff like posts and moving things and dealing with trolls, but i don't want them to be able to change the board to say.. allow HTML, or stuff like that
Thanks
Posted By: omegatron Re: Admin menu for Moderators - 05/11/2002 5:15 PM
If I follow what you are asking that is already implemented in Threads. A moderator can approve and delete posts from their admin menu as well as edit any user in the regular user categoryies. They can change things in their own forum and thats it. They do not have access to alter other moderators or admin nor can they change the normal config or theme settings of the board. Only an admin can do these things.
Posted By: Keet Re: Admin menu for Moderators - 05/11/2002 7:58 PM
what i mean is, i have boards, with lots of posts, i can't watch over everything, so i'm getting some friend to be moderators, but as a moderator, they have the power to change any boards settings they've been given permission to.
they could set it to allow HTML code, or change access permissions, or stylesheets, or set it to expire every post after one day, i don't want them to have that kind of power as just a moderator.
Posted By: Dave_L_dup1 Re: Admin menu for Moderators - 05/11/2002 8:28 PM
admin/doeditboard.php
admin/editboard.php
- change
code:
if ( ($user['U_Status'] != 'Moderator') && ($user['U_Status'] != 'Administrator')){
$html -> not_right ("You must be logged in, and be a valid
administrator or moderator to access this.",$Cat);


to
code:
if ($user['U_Status'] != 'Administrator'){
$html -> not_right ("You must be logged in, and be a valid
administrator to access this.",$Cat);



admin/menu.php
- remove the Forum Management section from the output (not essential, but it's cleaner to suppress the link since they aren't permitted to use it)

P.S Isn't the General Modifications forum the more appropriate place for this kind of post?
Posted By: Dave_L_dup1 Re: Admin menu for Moderators - 05/11/2002 9:28 PM
In reply to:

P.S Isn't the General Modifications forum the more appropriate place for this kind of post?




Ignore that comment. I just noticed the GMQ forum is in the v.5 category.
Posted By: Keet Re: Admin menu for Moderators - 05/11/2002 10:15 PM
heh, thanks, and yeah, i posted here since there isn't a GMQ for 6.0 yet
Posted By: Hackman_dup1 Another suggestion for the same mod - 11/09/2002 5:35 AM
I was looking for this exact mod. While it does solve the problem, I would have preferred to remove the menu entirely not just prevent it with other code.

To remove the Forum Management menu from moderators comment out the lines in admin/menu.php:
echo "<p>";
$html -> open_admin_table();
echo <<<EOF
<tr><td valign=top class=tdheader>
<b>Forum Management</b>
</td></tr>
<tr><td valign=top class=lighttable>
<a href="{$configphpurl']}/admin/editboard.php?Cat=$Cat" target="mainFrame">
Edit a forum
</a>
EOF;
$html -> close_table();

Posted By: JoshPet Re: Another suggestion for the same mod - 11/09/2002 5:45 AM
If you want to remove the "admin" menu all together for Moderators... I *think* this should do the trick. (let me know).

In your ubbt.inc.php file, find this:

code:
// ------------------------------------------------------------------
// If they are an admin or moderator they get a link to the admin sec
if ( ($user['U_Status'] == "Administrator") || ($user['U_Status'] == "Moderator") ) {
$target = "target="_top"";
$adminlink = "<a href = "$phpurl/admin/login.php...shortened... | ";
}




Change to this:
code:

// ------------------------------------------------------------------
// If they are an admin or moderator they get a link to the admin sec
if ($user['U_Status'] == "Administrator") {
$target = "target="_top"";
$adminlink = "<a href = "$phpurl/admin/login.php...shortened... | ";
}



Hope that helps.
Posted By: Dave_L_dup1 Re: Another suggestion for the same mod - 11/09/2002 5:54 AM
Note that the Restrict Moderators hack includes this feature. It hasn't been updated for 6.1, but I think the only change would be to change "w3t_" to the appropriate table prefix, if you're using a custom one.
Posted By: Dave_L_dup1 Re: Another suggestion for the same mod - 11/09/2002 5:57 AM
You're "wide posting" again

You can fix that by just using
$adminlink = ...
since that line isn't really important.
Posted By: JoshPet Re: Another suggestion for the same mod - 11/09/2002 6:01 AM
I gotta learn that you use either really big fonts, low resolution, or have a small monitor.

LOL

I shortened above... which should eliminate the scrolling.

I DID think of you if you can believe it. I resized my window to what I figured would be the smallest possible... and it didn't scroll.

I got a 17 in monitor in the closet I'm going to have to send you.
Posted By: msula Re: Another suggestion for the same mod - 11/09/2002 7:45 AM
I'm using the restrict moderators hack to solve that problem, and you're right, the only change to be made is the prefix is needed. But if you are only using one forum, the standard instructions work fine
© UBB.Developers