在在ecshop网店系统中中添加页面,并且实现后台管理,ecshop后台一共需要修改下面的四个文件 C:/Program Files/ShopEx/shop/docroot/ecshop/admin/template.php C:/Program Files/ShopEx/shop/docroot/ecshop/admin/includes/lib_template.php C:/Program Files/ShopEx/shop/docroot/ecshop/languages/zh_cn/admin/template.php C:/Program Files/ShopEx/shop/docroot/ecshop/themes/default/libs.xml 1、 首先做模板文件 help.dwt 和 help.php 见下面的 7 和 8 的文件内容 2 、修改 C:/Program Files/ShopEx/shop/docroot/ecshop/languages/zh_cn /admin/template.php 追加如下内容 $_LANG['template_files']['help'] = ' 用户定义帮助 '; 3 、后台就可以显示出用户定义的模板文件了 4 、修改下面一个文件的 bug C:/Program Files/ShopEx/shop/docroot/ecshop/admin/includes/lib_template.php 将 while ($vals[++$i]['tag'] != 'FILE' || !isset($vals[$i]['attributes'])) 修改成 $i++; while ($vals[$i]['tag'] != 'FILE' || !isset($vals[$i]['attributes'])) // 读出可编辑区库文件名称,放到一个数组中 { …… $i++; } 5 、【每个模板允许设置的库项目】做成 C:/Program Files/ShopEx/shop/docroot/ecshop/admin/includes/lib_template.php 在 $page_libs = array(…… 中加入下面代码 'help' => array( '/library/ur_here.lbi' => 0, '/library/search_form.lbi' => 0, '/library/member.lbi' => 0, '/library/new_articles.lbi' => 0, '/library/category_tree.lbi' => 0, '/library/top10.lbi' => 0, '/library/invoice_query.lbi' => 0, '/library/recommend_best.lbi' => 3, '/library/recommend_new.lbi' => 3, '/library/recommend_hot.lbi' => 3, '/library/recommend_promotion.lbi' => 4, '/library/group_buy.lbi' => 3, '/library/auction.lbi' => 3, '/library/brands.lbi' => 3, '/library/promotion_info.lbi' => 0, '/library/cart.lbi' => 0, '/library/order_query.lbi' => 0, '/library/email_list.lbi' => 0, '/library/vote_list.lbi' => 0 ), 6 、编辑可否设定 C:/Program Files/ShopEx/shop/docroot/ecshop/themes/default/libs.xml 加入下面代码,这些区域就变成可指定的了,以外的部分就不能被设定。如果不在这个文件中加入任何信息,所有的项目都是可编辑的 <file name="help.dwt"> <region name=" 左边区域 "> <lib>cart</lib> <lib>category_tree</lib> <lib>top10</lib> <lib>promotion_info</lib> <lib>order_query</lib> <lib>invoice_query</lib> <lib>vote_list</lib> <lib>email_list</lib> </region> <region name=" 站内快讯上广告位(宽: 210px ) "/> <region name=" 右边主区域 "> <lib>recommend_best</lib> <lib>recommend_new</lib> <lib>recommend_hot</lib> <lib>auction</lib> <lib>group_buy</lib> </region> </file> (责任编辑:最模板) |