给超级版主设置版主权限


引用:

收藏:easonlee
原作:antgawe http://www.discuz.net/thread-241902-1-1.html
版本:4.1,5.0也可以
只能管理版面上的版主,不能管理和版主相关联的其他管理组人员

==========================================================

引用:

附:允许版主修改论坛简介 For 4.1
http://www.discuz.net/viewthread.php?tid=309826&highlight=%B0%E6%D6%F7

没有增加新的管理组,没有新增数据库,只是在原来管理组-->超级版主的权限作了一下修改,使得超级版主增加了设置版主的权限。
引用:

修改文件:
admincp.php
menu.inc.php

打开admincp.php --------------------------------------------------------------------------------------------------------

找到:
复制内容到剪贴板
代码:
}
if($cpscript) {
require_once DISCUZ_ROOT.'./admin/'.$cpscript.'.inc.php';
} else {
cpheader();
cpmsg('noaccess');
}
在上边添加(注意是添加在}号的上一行)
复制内容到剪贴板
代码:
elseif($action == 'forumsedit'|| $action == 'moderators' ) {
$cpscript = 'forums';
}

}
else{
if($action == 'home') {
$cpscript = 'home';
} elseif((($allowedituser || $allowbanuser) && $action == 'editmember') || ($allowbanip && $action == 'ipban')) {
$cpscript = 'members';
} elseif($action == 'forumrules') {
$cpscript = 'forums';
} elseif($allowpostannounce && $action == 'announcements') {
$cpscript = 'announcements';
} elseif(($allowmoduser && $action == 'modmembers') || ($allowmodpost && ($action == 'modthreads' || $action == 'modreplies'))) {
$cpscript = 'moderate';
} elseif(($allowcensorword && $action == 'censor') || $action == 'logout') {
$cpscript = 'misc';
} elseif($allowmassprune && $action == 'prune') {
$cpscript = 'prune';
} elseif($action == 'plugins') {
$cpscript = 'plugins';
} elseif($allowviewlog && ($action == 'ratelog' || $action == 'modslog' || $action == 'banlog')) {
$cpscript = 'logs';
}
找到:
复制内容到剪贴板
代码:
elseif($adminid == 2||$adminid == 3 )
将其改为
复制内容到剪贴板
代码:
elseif($adminid == 2)
打开menu.inc.php --------------------------------------------------------------------------------------------------------

找到
复制内容到剪贴板
代码:
if($allowmassprune) {
$menuarray[] = array('name' => $lang['menu_maint_prune'], 'url' => 'admincp.php?action=prune');
}
在下边添加:
复制内容到剪贴板
代码:
showmenu($lang['menu_forums'], array(array('name' => $lang['menu_forums_add'], 'url' => 'admincp.php?action=forumadd'),
array('name' => $lang['menu_forums_edit'], 'url' => 'admincp.php?action=forumsedit'),
array('name' => $lang['menu_forums_merge'], 'url' => 'admincp.php?action=forumsmerge'),
array('name' => $lang['menu_forums_threadtypes'], 'url' => 'admincp.php?action=threadtypes')));
OK

Leave a Reply

Your email address will not be published. Required fields are marked *