ECShop后台管理菜单修改
ECShop中,和后臺(tái)菜單相關(guān)的文件有兩個(gè):
·菜單項(xiàng):admin\includes\inc_menu.php
·菜單文本:languages\zh_cn\admin\common.php
所以,要修改菜單主要也就是修改這兩個(gè)文件了。
理論基礎(chǔ)
1).菜單項(xiàng)管理
inc_menu.php文件用于管理菜單數(shù)量、顯示順序、鏈接等,該文件內(nèi)容形如:
$modules['02_cat_and_goods']['02_goods_add']????????= 'goods.php?act=add';??????????// 添加商品
$modules['02_cat_and_goods']['03_category_list']????= 'category.php?act=list';
$modules['02_cat_and_goods']['05_comment_manage']?? = 'comment_manage.php?act=list';
$modules['02_cat_and_goods']['06_goods_brand_list'] = 'brand.php?act=list';
$modules['02_cat_and_goods']['08_goods_type']?????? = 'goods_type.php?act=manage';
$modules['02_cat_and_goods']['11_goods_trash']??????= 'goods.php?act=trash';????????// 商品回收站
$modules['02_cat_and_goods']['12_batch_pic']????????= 'picture_batch.php';
$modules['02_cat_and_goods']['13_batch_add']????????= 'goods_batch.php?act=add';????// 商品批量上傳
$modules['02_cat_and_goods']['14_goods_export']???? = 'goods_export.php?act=goods_export';
$modules['02_cat_and_goods']['15_batch_edit']?????? = 'goods_batch.php?act=select'; // 商品批量修改
$modules['02_cat_and_goods']['16_goods_script']???? = 'gen_goods_script.php?act=setup';
$modules['02_cat_and_goods']['17_tag_manage']?????? = 'tag_manage.php?act=list';
$modules['02_cat_and_goods']['50_virtual_card_list']?? = 'goods.php?act=list&extension_code=virtual_card';
$modules['02_cat_and_goods']['51_virtual_card_add']????= 'goods.php?act=add&extension_code=virtual_card';
$modules['02_cat_and_goods']['52_virtual_card_change'] = 'virtual_card.php?act=change';
$modules['02_cat_and_goods']['goods_auto']???????????? = 'goods_auto.php?act=list';
$modules['03_promotion']['02_snatch_list']??????????= 'snatch.php?act=list';
$modules['03_promotion']['04_bonustype_list']?????? = 'bonus.php?act=list';
$modules['03_promotion']['06_pack_list']????????????= 'pack.php?act=list';
$modules['03_promotion']['07_card_list']????????????= 'card.php?act=list';
$modules['03_promotion']['08_group_buy']????????????= 'group_buy.php?act=list';
$modules['03_promotion']['09_topic']????????????????= 'topic.php?act=list';
$modules['03_promotion']['10_auction']??????????????= 'auction.php?act=list';
$modules['03_promotion']['12_favourable']?????????? = 'favourable.php?act=list';
$modules['03_promotion']['13_wholesale']????????????= 'wholesale.php?act=list';
$modules['03_promotion']['14_package_list']???????? = 'package.php?act=list';
//$modules['03_promotion']['ebao_commend']????????????= 'ebao_commend.php?act=list';
$modules['03_promotion']['15_exchange_goods']?????? = 'exchange_goods.php?act=list';
做程序的應(yīng)該都知道這是一個(gè)二維數(shù)組,格式如下:
它們?cè)陧?yè)面上的顯示順序測(cè)試發(fā)現(xiàn)是以分類(lèi)名稱(chēng)進(jìn)行排序的!
2).菜單文本管理
細(xì)心的可能問(wèn)了,那菜單的文本呢?總不能就顯示01_goods_list、02_goods_add這類(lèi)文本吧,這就要用到common.php文件了。由于我們大都用簡(jiǎn)體中文,所以修改languages\zh_cn\admin\common.php文件就可以了,如果你要用繁體中文,那就修改languages\zh_tw\admin\common.php,其他依此類(lèi)推。該文件內(nèi)容形如:
$_LANG['02_cat_and_goods'] = '商品管理';
$_LANG['03_promotion'] = '促銷(xiāo)管理';
$_LANG['04_order'] = '訂單管理';
$_LANG['05_banner'] = '廣告管理';
$_LANG['06_stats'] = '報(bào)表統(tǒng)計(jì)';
$_LANG['07_content'] = '文章管理';
$_LANG['08_members'] = '會(huì)員管理';
$_LANG['09_others'] = '雜項(xiàng)管理';
$_LANG['10_priv_admin'] = '權(quán)限管理';
$_LANG['11_system'] = '系統(tǒng)設(shè)置';
$_LANG['12_template'] = '模板管理';
$_LANG['13_backup'] = '數(shù)據(jù)庫(kù)管理';
$_LANG['14_sms'] = '短信管理';
$_LANG['15_rec'] = '推薦管理';
$_LANG['16_email_manage'] = '郵件群發(fā)管理';
/* 商品管理 */
$_LANG['01_goods_list'] = '商品列表';
$_LANG['02_goods_add'] = '添加新商品';
$_LANG['03_category_list'] = '商品分類(lèi)';
$_LANG['04_category_add'] = '添加分類(lèi)';
$_LANG['05_comment_manage'] = '用戶評(píng)論';
$_LANG['06_goods_brand_list'] = '商品品牌';
$_LANG['07_brand_add'] = '添加品牌';
$_LANG['08_goods_type'] = '商品類(lèi)型';
$_LANG['09_attribute_list'] = '商品屬性';
$_LANG['10_attribute_add'] = '添加屬性';
$_LANG['11_goods_trash'] = '商品回收站';
$_LANG['12_batch_pic'] = '圖片批量處理';
$_LANG['13_batch_add'] = '商品批量上傳';
$_LANG['15_batch_edit'] = '商品批量修改';
$_LANG['16_goods_script'] = '生成商品代碼';
$_LANG['17_tag_manage'] = '標(biāo)簽管理';
$_LANG['18_product_list'] = '貨品列表';
$_LANG['52_attribute_add'] = '編輯屬性';
$_LANG['53_suppliers_goods'] = '供貨商商品管理';
其格式如下:
實(shí)戰(zhàn)管理菜單修改
打開(kāi)inc_menu.php,找到:
$modules['07_content']['02_articlecat_list']????????= 'articlecat.php?act=list';
$modules['07_content']['vote_list']???????????????? = 'vote.php?act=list';
$modules['07_content']['article_auto']??????????????= 'article_auto.php?act=list';
//$modules['07_content']['shop_help']???????????????? = 'shophelp.php?act=list_cat';
//$modules['07_content']['shop_info']???????????????? = 'shopinfo.php?act=list';
修改如下:
$modules['07_content']['02_article_list']?????????? = 'article.php?act=list';
$modules['07_content']['03_articlecat_list']????????= 'articlecat.php?act=list';
$modules['07_content']['vote_list']???????????????? = 'vote.php?act=list';
$modules['07_content']['article_auto']??????????????= 'article_auto.php?act=list';
//$modules['07_content']['shop_help']???????????????? = 'shophelp.php?act=list_cat';
//$modules['07_content']['shop_info']???????????????? = 'shopinfo.php?act=list';
打開(kāi)common.php,找到:
$_LANG['articlecat_add'] = '添加文章分類(lèi)';
$_LANG['03_article_list'] = '文章列表';
$_LANG['article_add'] = '添加新文章';
$_LANG['shop_article'] = '網(wǎng)店文章';
$_LANG['shop_info'] = '網(wǎng)店信息';
$_LANG['shop_help'] = '網(wǎng)店幫助';
$_LANG['vote_list'] = '在線調(diào)查';
修改如下:
$_LANG['03_articlecat_list'] = '文章分類(lèi)';
$_LANG['articlecat_add'] = '添加文章分類(lèi)';
$_LANG['02_article_list'] = '文章列表';
$_LANG['01_article_add'] = '添加新文章';
$_LANG['shop_article'] = '網(wǎng)店文章';
$_LANG['shop_info'] = '網(wǎng)店信息';
$_LANG['shop_help'] = '網(wǎng)店幫助';
$_LANG['vote_list'] = '在線調(diào)查';
保存后,刷新頁(yè)面,你會(huì)看到加了"添加新文章'"菜單,并且順序也改變了。
轉(zhuǎn)載于:https://www.cnblogs.com/shangxia/p/3501576.html
總結(jié)
以上是生活随笔為你收集整理的ECShop后台管理菜单修改的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: IPSec ××× 在企业网中的应用
- 下一篇: 20个数据库设计的最佳实践