欢迎光临

木子屋

标题: ECShop v2.7.2后台管理菜单修改

作者: dnawo

日期: 2010-05-18 11:44 AM

分类: 程序修改

内容: ECShop v2.7.2中，和后台菜单相关的文件有两个：
·菜单项：admin\includes\inc_menu.php
·菜单文本：languages\zh_cn\admin\common.php
所以，要修改菜单主要也就是修改这两个文件了。
理论基础
1).菜单项管理
inc_menu.php文件用于管理菜单数量、显示顺序、链接等，该文件内容形如：
复制内容到剪贴板 程序代码['02_cat_and_goods']['01_goods_list'] = 'goods.php?act=list'; // 商品列表
['02_cat_and_goods']['02_goods_add'] = 'goods.php?act=add'; // 添加商品
['02_cat_and_goods']['03_category_list'] = 'category.php?act=list';
['02_cat_and_goods']['05_comment_manage'] = 'comment_manage.php?act=list';
['02_cat_and_goods']['06_goods_brand_list'] = 'brand.php?act=list';
['02_cat_and_goods']['08_goods_type'] = 'goods_type.php?act=manage';
['02_cat_and_goods']['11_goods_trash'] = 'goods.php?act=trash'; // 商品回收站
['02_cat_and_goods']['12_batch_pic'] = 'picture_batch.php';
['02_cat_and_goods']['13_batch_add'] = 'goods_batch.php?act=add'; // 商品批量上传
['02_cat_and_goods']['14_goods_export'] = 'goods_export.php?act=goods_export';
['02_cat_and_goods']['15_batch_edit'] = 'goods_batch.php?act=select'; // 商品批量修改
['02_cat_and_goods']['16_goods_script'] = 'gen_goods_script.php?act=setup';
['02_cat_and_goods']['17_tag_manage'] = 'tag_manage.php?act=list';
['02_cat_and_goods']['50_virtual_card_list'] = 'goods.php?act=list&extension_code=virtual_card';
['02_cat_and_goods']['51_virtual_card_add'] = 'goods.php?act=add&extension_code=virtual_card';
['02_cat_and_goods']['52_virtual_card_change'] = 'virtual_card.php?act=change';
['02_cat_and_goods']['goods_auto'] = 'goods_auto.php?act=list';
['03_promotion']['02_snatch_list'] = 'snatch.php?act=list';
['03_promotion']['04_bonustype_list'] = 'bonus.php?act=list';
['03_promotion']['06_pack_list'] = 'pack.php?act=list';
['03_promotion']['07_card_list'] = 'card.php?act=list';
['03_promotion']['08_group_buy'] = 'group_buy.php?act=list';
['03_promotion']['09_topic'] = 'topic.php?act=list';
['03_promotion']['10_auction'] = 'auction.php?act=list';
['03_promotion']['12_favourable'] = 'favourable.php?act=list';
['03_promotion']['13_wholesale'] = 'wholesale.php?act=list';
['03_promotion']['14_package_list'] = 'package.php?act=list';
//['03_promotion']['ebao_commend'] = 'ebao_commend.php?act=list';
['03_promotion']['15_exchange_goods'] = 'exchange_goods.php?act=list';
做程序的应该都知道这是一个二维数组，格式如下：
复制内容到剪贴板 程序代码['一级分类']['二级分类']='链接地址';
它们在页面上的显示顺序测试发现是以分类名称进行排序的！
2).菜单文本管理
细心的可能问了，那菜单的文本呢？总不能就显示01_goods_list、02_goods_add这类文本吧，这就要用到common.php文件了。由于我们大都用简体中文，所以修改languages\zh_cn\admin\common.php文件就可以了，如果你要用繁体中文，那就修改languages\zh_tw\admin\common.php，其他依此类推。该文件内容形如：
复制内容到剪贴板 程序代码/* 菜单分类部分 */
['02_cat_and_goods'] = '商品管理';
['03_promotion'] = '促销管理';
['04_order'] = '订单管理';
['05_banner'] = '广告管理';
['06_stats'] = '报表统计';
['07_content'] = '文章管理';
['08_members'] = '会员管理';
['09_others'] = '杂项管理';
['10_priv_admin'] = '权限管理';
['11_system'] = '系统设置';
['12_template'] = '模板管理';
['13_backup'] = '数据库管理';
['14_sms'] = '短信管理';
['15_rec'] = '推荐管理';
['16_email_manage'] = '邮件群发管理';
/* 商品管理 */
['01_goods_list'] = '商品列表';
['02_goods_add'] = '添加新商品';
['03_category_list'] = '商品分类';
['04_category_add'] = '添加分类';
['05_comment_manage'] = '用户评论';
['06_goods_brand_list'] = '商品品牌';
['07_brand_add'] = '添加品牌';
['08_goods_type'] = '商品类型';
['09_attribute_list'] = '商品属性';
['10_attribute_add'] = '添加属性';
['11_goods_trash'] = '商品回收站';
['12_batch_pic'] = '图片批量处理';
['13_batch_add'] = '商品批量上传';
['15_batch_edit'] = '商品批量修改';
['16_goods_script'] = '生成商品代码';
['17_tag_manage'] = '标签管理';
['18_product_list'] = '货品列表';
['52_attribute_add'] = '编辑属性';
['53_suppliers_goods'] = '供货商商品管理';
其格式如下：
复制内容到剪贴板 程序代码['一级分类或二级分类'] = '显示文本';
实战管理菜单修改
打开inc_menu.php，找到：
复制内容到剪贴板 程序代码['07_content']['03_article_list'] = 'article.php?act=list';
['07_content']['02_articlecat_list'] = 'articlecat.php?act=list';
['07_content']['vote_list'] = 'vote.php?act=list';
['07_content']['article_auto'] = 'article_auto.php?act=list';
//['07_content']['shop_help'] = 'shophelp.php?act=list_cat';
//['07_content']['shop_info'] = 'shopinfo.php?act=list';
修改如下：
复制内容到剪贴板 程序代码['07_content']['01_article_add'] = 'article.php?act=add';
['07_content']['02_article_list'] = 'article.php?act=list';
['07_content']['03_articlecat_list'] = 'articlecat.php?act=list';
['07_content']['vote_list'] = 'vote.php?act=list';
['07_content']['article_auto'] = 'article_auto.php?act=list';
//['07_content']['shop_help'] = 'shophelp.php?act=list_cat';
//['07_content']['shop_info'] = 'shopinfo.php?act=list';
打开common.php，找到：
复制内容到剪贴板 程序代码['02_articlecat_list'] = '文章分类';
['articlecat_add'] = '添加文章分类';
['03_article_list'] = '文章列表';
['article_add'] = '添加新文章';
['shop_article'] = '网店文章';
['shop_info'] = '网店信息';
['shop_help'] = '网店帮助';
['vote_list'] = '在线调查';
修改如下：
复制内容到剪贴板 程序代码/* 文章管理 */
['03_articlecat_list'] = '文章分类';
['articlecat_add'] = '添加文章分类';
['02_article_list'] = '文章列表';
['01_article_add'] = '添加新文章';
['shop_article'] = '网店文章';
['shop_info'] = '网店信息';
['shop_help'] = '网店帮助';
['vote_list'] = '在线调查';
保存后，刷新页面，你会看到加了"添加新文章'"菜单，并且顺序也改变了。

+ 查看当前日志评论 (0)

登录

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.129 ms

返回

标题: ECShop v2.7.2后台管理菜单修改

你没有权限发表评论

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.129 ms

返回

暂无评论

返回

────────────

木子屋

PJBlog3 v3.2.9.518 Inside.

Processed In 1.146 ms

返回