标签:
http://bbs.zb7.com/thread-2310-1-1.html
现在discuz论坛越来越火热,那么Discuz!二次开发如何添加后台管理模块?下面我们就一起来分享下:
涉及到的文件:
admincp.php 后台入口文件
main.inc.php 定义后台界面模板显示文件
admincp.menu.lang.php 后台管理语言文件
menu.inc.php 后台界面菜单定义文件
1、在变量$action中声明
admincp.php 86行加入‘menu_class_list’、‘menu_teacher_list’:
in_array($action, array(‘home‘, ‘settings‘, ‘members‘, ‘profilefields‘, ‘admingroups‘, ‘usergroups‘, ‘ranks‘, ‘forums‘, ‘threadtypes‘, ‘threads‘, ‘moderate‘, ‘attach‘, ‘smilies‘, ‘recyclebin‘, ‘prune‘, ‘styles‘, ‘plugins‘, ‘tasks‘, ‘magics‘, ‘medals‘, ‘google‘, ‘qihoo‘, ‘video‘, ‘announce‘, ‘faq‘, ‘ec‘, ‘tradelog‘, ‘creditwizard‘, ‘jswizard‘, ‘project‘, ‘counter‘, ‘misc‘, ‘adv‘, ‘insenz‘, ‘logs‘, ‘tools‘, ‘checktools‘, ‘search‘, ‘upgrade‘,‘menu_class_list‘,‘menu_teacher_list‘);
复制代码
2、定义自定义顶部菜单的默认显示,main.inc.php 55行加入
//添加顶部菜单
showheader(‘family‘,‘menu_class_list‘);
复制代码
3、定义自定义菜单的语言文件,admincp.menu.lang.php 24行加入
//添加顶部菜单
‘header_family‘ => ‘家庭平台‘,
‘menu_class_list‘ => ‘课程‘,
‘menu_teacher_list‘ => ‘老师‘,
复制代码
4、定义侧栏菜单,menu.inc.php 96行加入
//添加顶部菜单
showmenu(‘family‘, array(
array(‘menu_class_list‘, ‘members‘),
array(‘menu_teacher_list‘, ‘adv‘),
));
//------
复制代码
5、由于discuz后台显示通过JS调用显示,所以必须在main.inc.php111行加入
var headers = new Array(‘index‘, ‘global‘, ‘style‘, ‘forum‘, ‘user‘, ‘topic‘, ‘extended‘, ‘adv‘,‘family‘, ‘tool‘$ucadd);
复制代码
6、/admin文件中定义程序文件
menu_class_list.inc.php
menu_teacher_list.inc.php
http://xuliewei.cn/archives/3024
http://www.huoyue.org/discuz-admin-button?replytocom=579
http://jingyan.baidu.com/article/ff42efa91c05bfc19e220231.html
http://zhidao.baidu.com/link?url=ym4F8uKoeIYlaCAKE9jFavrYetAxLHYctdA1Jqq-FtHnMIlQRsYYLo9L7bYCVlhCHHHbRYcTPjg10lzwsCj_-O_cLQrMbGfM_GDE3jFDIMq
http://bbs.zb7.com/discuz/dx25/plug/construct/construct_admin.htm
标签:
原文地址:http://www.cnblogs.com/actorai/p/4231802.html