我以增加MYHOME为例:
首先打开admin.php文件数组变量$admincp_actions_normal里加入一项
$admincp_actions_normal = array('myhome','index', 'setting', 'members', 'admingroup', 'usergroups', 'usertag',
'forums', 'threadtypes', 'threads', 'moderate', 'attach', 'smilies', 'recyclebin', 'recyclebinpost', 'prune',
'styles', 'addons', 'plugins', 'tasks', 'magics', 'medals', 'google', 'announce', 'faq', 'ec',
'tradelog', 'jswizard', 'project', 'counter', 'misc', 'adv', 'logs', 'tools', 'portalperm',
'checktools', 'search', 'article', 'block', 'blockstyle', 'blockxml', 'portalcategory', 'blogcategory', 'albumcategory', 'topic', 'credits',
'doing', 'group', 'blog', 'feed', 'album', 'pic', 'comment', 'share', 'click', 'specialuser', 'postsplit', 'threadsplit', 'report',
'district', 'diytemplate', 'verify', 'nav', 'domain', 'postcomment', 'tag', 'connect', 'card', 'portalpermission', 'collection', 'membersplit');
之后新建立目录/source/admincp/menu/ 扩展菜单目录
再之后新建文件/source/admincp/menu/menu_myhome.php 菜单配置
写入文件内容
< ?php
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
$topmenu['food'] = 'food_basic_setting';
food在语言包中对应header_food
food_basic_setting对应URL admin.php?action=food&operation=basic&do=setting
$menu['food'] = array(
// 这里的下标和语言包中的对应 => '点击菜单转到的URL格式为(action_operation_do比如下面这个就是admin.php?action=food&operation=basic&do=information)',
array('menu_food_information', 'food_basic_information'),
);
新建一个语言包文件/source/language/lang_admincp_food.php 菜单语音包. 如果你愿意也可以直接更改/source/language/lang_admincp_menu.php. 这个是discuz自带的语言包. 我认为还是分开好.
文件内容
< ?php
if(!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
exit('Access Denied');
}
$extend_lang = array(
'header_food' => '美食',
'menu_food_setting' => '设置',
'menu_food_information' => '程序信息',
);