系统是如何实现的?动态载入comments_list.lbi,显示评论列表和评论表单

2016-07-07 15:07 来源:www.chinab4c.com 作者:ecshop专家

各位大虾,小弟最近在做个网上商店,需要增加一些系统功能,算是二次开发吧
看了一个多星期的代码,些许明白,有个地方卡住了,如题,
希望有类似看代码经验的高手指教!不甚感激~~

回答:
lib_insert.

顶上楼主一贴,不知道 ECSHOP TEAM 中有人愿意回答否?

http://bbs.ecshop.com/thread-63663-1-1.html,我是这样的思路没人给解答!
楼上的有兴趣一起研究下

lib_templates.php
/* 可以设置内容的模板 */
$template_files = array(
'index.dwt',
'article.dwt',
'article_cat.dwt',
'brand.dwt',
'catalog.dwt',
'category.dwt',
'user_clips.dwt',
'compare.dwt',
'gallery.dwt',
'goods.dwt',
'group_buy_goods.dwt',
'group_buy_flow.dwt',
'group_buy_list.dwt',
'user_passport.dwt',
'pick_out.dwt',
'receive.dwt',
'respond.dwt',
'search.dwt',
'flow.dwt',
'snatch.dwt',
'user.dwt',
'tag_cloud.dwt',
'user_transaction.dwt',
'style.css',
'auction_list.dwt',
'auction.dwt',
);

/* 每个模板允许设置的库项目 */
$page_libs = array(
'article' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/recommend_best.lbi' => 3,
'/library/recommend_hot.lbi' => 3,
'/library/comments.lbi' => 0,
'/library/goods_related.lbi' => 0,
'/library/recommend_promotion.lbi' => 3,
'/library/history.lbi' => 0,
),
'article_cat' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/history.lbi' => 0,
'/library/recommend_best.lbi' => 3,
'/library/recommend_hot.lbi' => 3,
'/library/recommend_promotion.lbi' => 3,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/vote.lbi' => 0,
'/library/article_category_tree.lbi' => 0,
),
'brand' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/history.lbi' => 0,
'/library/recommend_best.lbi' => 3,
'/library/goods_list.lbi' => 0,
'/library/pages.lbi' => 0,
'/library/recommend_promotion.lbi' => 3,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/vote.lbi' => 0,
),
'catalog' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
),
'category' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/history.lbi' => 0,
'/library/recommend_best.lbi' => 3,
'/library/recommend_hot.lbi' => 3,
'/library/goods_list.lbi' => 0,
'/library/pages.lbi' => 0,
'/library/recommend_promotion.lbi' => 3,
'/library/brands.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/vote.lbi' => 0,
'/library/price_grade.lbi' => 0,
'/library/filter_attr.lbi' => 0,
),
'compare' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
),
'flow' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
),
'index' => 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' => 3,
'/library/group_buy.lbi' => 3,
'/library/auction.lbi' => 3,
'/library/brands.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/order_query.lbi' => 0,
'/library/email_list.lbi' => 0,
'/library/vote_list.lbi' => 0
),
'goods' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/goods_attrlinked.lbi' => 0,
'/library/history.lbi' => 0,
'/library/goods_fittings.lbi' => 0,
'/library/goods_gallery.lbi' => 0,
'/library/goods_tags.lbi' => 0,
'/library/comments.lbi' => 0,
'/library/bought_goods.lbi' => 0,
'/library/goods_related.lbi' => 0,
'/library/goods_article.lbi' => 0,
),
'search_result' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/search_result.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/search_advanced.lbi' => 0,
'/library/history.lbi' => 0,
'/library/pages.lbi' => 0,
),
'tag_cloud' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/history.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/recommend_best.lbi' => 3,
'/library/recommend_new.lbi' => 3,
'/library/recommend_hot.lbi' => 3,
'/library/recommend_promotion.lbi' => 3,
),
'group_buy_goods' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/history.lbi' => 0,
),
'group_buy_list' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/history.lbi' => 0,
),
'search' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/history.lbi' => 0,
),
'snatch' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
),
'auction_list' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/history.lbi' => 0,
),
'auction' => array(
'/library/ur_here.lbi' => 0,
'/library/search_form.lbi' => 0,
'/library/member.lbi' => 0,
'/library/category_tree.lbi' => 0,
'/library/promotion_info.lbi' => 0,
'/library/cart.lbi' => 0,
'/library/top10.lbi' => 0,
'/library/history.lbi' => 0,
),
);