lib_template.php这个文件是什么作用?

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

谁能说下下面代码是什么意思,谢谢
  1. /* 可以设置内容的模板 */
  2. $template_files = array(
  3. 'index.dwt',
  4. 'article.dwt',
  5. 'article_cat.dwt',
  6. 'brand.dwt',
  7. 'category.dwt',
  8. 'user_clips.dwt',
  9. 'compare.dwt',
  10. 'gallery.dwt',
  11. 'goods.dwt',
  12. 'group_buy_goods.dwt',
  13. 'group_buy_flow.dwt',
  14. 'group_buy_list.dwt',
  15. 'user_passport.dwt',
  16. 'pick_out.dwt',
  17. 'receive.dwt',
  18. 'respond.dwt',
  19. 'search.dwt',
  20. 'flow.dwt',
  21. 'snatch.dwt',
  22. 'user.dwt',
  23. 'tag_cloud.dwt',
  24. 'user_transaction.dwt',
  25. 'style.css',
  26. 'auction_list.dwt',
  27. 'auction.dwt',
  28. 'message_board.dwt',
  29. 'exchange_list.dwt',
  30. );

  31. /* 每个模板允许设置的库项目 */
  32. $page_libs = array(
  33. 'article' => array(
  34. '/library/ur_here.lbi' => 0,
  35. '/library/search_form.lbi' => 0,
  36. '/library/member.lbi' => 0,
  37. '/library/recommend_best.lbi' => 3,
  38. '/library/recommend_hot.lbi' => 3,
  39. '/library/comments.lbi' => 0,
  40. '/library/goods_related.lbi' => 0,
  41. '/library/recommend_promotion.lbi' => 3,
  42. '/library/history.lbi' => 0,
  43. ),
  44. 'article_cat' => array(
  45. '/library/ur_here.lbi' => 0,
  46. '/library/search_form.lbi' => 0,
  47. '/library/member.lbi' => 0,
  48. '/library/category_tree.lbi' => 0,
  49. '/library/top10.lbi' => 0,
  50. '/library/history.lbi' => 0,
  51. '/library/recommend_best.lbi' => 3,
  52. '/library/recommend_hot.lbi' => 3,
  53. '/library/recommend_promotion.lbi' => 3,
  54. '/library/promotion_info.lbi' => 0,
  55. '/library/cart.lbi' => 0,
  56. '/library/vote_list.lbi' => 0,
  57. '/library/article_category_tree.lbi' => 0,
  58. ),
  59. 'brand' => array(
  60. '/library/ur_here.lbi' => 0,
  61. '/library/search_form.lbi' => 0,
  62. '/library/member.lbi' => 0,
  63. '/library/category_tree.lbi' => 0,
  64. '/library/top10.lbi' => 0,
  65. '/library/history.lbi' => 0,
  66. '/library/recommend_best.lbi' => 3,
  67. '/library/goods_list.lbi' => 0,
  68. '/library/pages.lbi' => 0,
  69. '/library/recommend_promotion.lbi' => 3,
  70. '/library/promotion_info.lbi' => 0,
  71. '/library/cart.lbi' => 0,
  72. '/library/vote_list.lbi' => 0,
  73. ),
  74. 'category' => array(
  75. '/library/ur_here.lbi' => 0,
  76. '/library/search_form.lbi' => 0,
  77. '/library/member.lbi' => 0,
  78. '/library/category_tree.lbi' => 0,
  79. '/library/top10.lbi' => 0,
  80. '/library/history.lbi' => 0,
  81. '/library/recommend_best.lbi' => 3,
  82. '/library/recommend_hot.lbi' => 3,
  83. '/library/goods_list.lbi' => 0,
  84. '/library/pages.lbi' => 0,
  85. '/library/recommend_promotion.lbi' => 3,
  86. '/library/brands.lbi' => 3,
  87. '/library/promotion_info.lbi' => 0,
  88. '/library/cart.lbi' => 0,
  89. '/library/vote_list.lbi' => 0
  90. ),
  91. 'compare' => array(
  92. '/library/ur_here.lbi' => 0,
  93. '/library/search_form.lbi' => 0,
  94. ),
  95. 'flow' => array(
  96. '/library/ur_here.lbi' => 0,
  97. '/library/search_form.lbi' => 0,
  98. ),
  99. 'index' => array(
  100. '/library/ur_here.lbi' => 0,
  101. '/library/search_form.lbi' => 0,
  102. '/library/member.lbi' => 0,
  103. '/library/new_articles.lbi' => 0,
  104. '/library/category_tree.lbi' => 0,
  105. '/library/top10.lbi' => 0,
  106. '/library/invoice_query.lbi' => 0,
  107. '/library/recommend_best.lbi' => 3,
  108. '/library/recommend_new.lbi' => 3,
  109. '/library/recommend_hot.lbi' => 3,
  110. '/library/recommend_promotion.lbi' => 4,
  111. '/library/group_buy.lbi' => 3,
  112. '/library/auction.lbi' => 3,
  113. '/library/brands.lbi' => 3,
  114. '/library/promotion_info.lbi' => 0,
  115. '/library/cart.lbi' => 0,
  116. '/library/order_query.lbi' => 0,
  117. '/library/email_list.lbi' => 0,
  118. '/library/vote_list.lbi' => 0
  119. ),
  120. 'goods' => array(
  121. '/library/ur_here.lbi' => 0,
  122. '/library/search_form.lbi' => 0,
  123. '/library/promotion_info.lbi' => 0,
  124. '/library/cart.lbi' => 0,
  125. '/library/member.lbi' => 0,
  126. '/library/category_tree.lbi' => 0,
  127. '/library/goods_attrlinked.lbi' => 0,
  128. '/library/history.lbi' => 0,
  129. '/library/goods_fittings.lbi' => 0,
  130. '/library/goods_gallery.lbi' => 0,
  131. '/library/goods_tags.lbi' => 0,
  132. '/library/comments.lbi' => 0,
  133. '/library/bought_goods.lbi' => 0,
  134. '/library/goods_related.lbi' => 0,
  135. '/library/goods_article.lbi' => 0,
  136. '/library/relatetag.lbi' => 0,
  137. ),
  138. 'search_result' => array(
  139. '/library/ur_here.lbi' => 0,
  140. '/library/search_form.lbi' => 0,
  141. '/library/member.lbi' => 0,
  142. '/library/category_tree.lbi' => 0,
  143. '/library/promotion_info.lbi' => 0,
  144. '/library/cart.lbi' => 0,
  145. '/library/search_result.lbi' => 0,
  146. '/library/top10.lbi' => 0,
  147. '/library/search_advanced.lbi' => 0,
  148. '/library/history.lbi' => 0,
  149. '/library/pages.lbi' => 0,
  150. ),
  151. 'tag_cloud' => array(
  152. '/library/ur_here.lbi' => 0,
  153. '/library/search_form.lbi' => 0,
  154. '/library/promotion_info.lbi' => 0,
  155. '/library/cart.lbi' => 0,
  156. '/library/member.lbi' => 0,
  157. '/library/category_tree.lbi' => 0,
  158. '/library/history.lbi' => 0,
  159. '/library/top10.lbi' => 0,
  160. '/library/recommend_best.lbi' => 3,
  161. '/library/recommend_new.lbi' => 3,
  162. '/library/recommend_hot.lbi' => 3,
  163. '/library/recommend_promotion.lbi' => 3,
  164. ),
  165. 'group_buy_goods' => array(
  166. '/library/ur_here.lbi' => 0,
  167. '/library/search_form.lbi' => 0,
  168. '/library/member.lbi' => 0,
  169. '/library/category_tree.lbi' => 0,
  170. '/library/promotion_info.lbi' => 0,
  171. '/library/cart.lbi' => 0,
  172. '/library/history.lbi' => 0,
  173. ),
  174. 'group_buy_list' => array(
  175. '/library/ur_here.lbi' => 0,
  176. '/library/search_form.lbi' => 0,
  177. '/library/member.lbi' => 0,
  178. '/library/category_tree.lbi' => 0,
  179. '/library/promotion_info.lbi' => 0,
  180. '/library/cart.lbi' => 0,
  181. '/library/top10.lbi' => 0,
  182. '/library/history.lbi' => 0,
  183. ),
  184. 'search' => array(
  185. '/library/ur_here.lbi' => 0,
  186. '/library/search_form.lbi' => 0,
  187. '/library/member.lbi' => 0,
  188. '/library/category_tree.lbi' => 0,
  189. '/library/promotion_info.lbi' => 0,
  190. '/library/cart.lbi' => 0,
  191. '/library/top10.lbi' => 0,
  192. '/library/history.lbi' => 0,
  193. ),
  194. 'snatch' => array(
  195. '/library/ur_here.lbi' => 0,
  196. '/library/search_form.lbi' => 0,
  197. '/library/member.lbi' => 0,
  198. '/library/category_tree.lbi' => 0,
  199. '/library/promotion_info.lbi' => 0,
  200. '/library/cart.lbi' => 0,
  201. ),
  202. 'auction_list' => array(
  203. '/library/ur_here.lbi' => 0,
  204. '/library/search_form.lbi' => 0,
  205. '/library/member.lbi' => 0,
  206. '/library/category_tree.lbi' => 0,
  207. '/library/promotion_info.lbi' => 0,
  208. '/library/cart.lbi' => 0,
  209. '/library/history.lbi' => 0,
  210. ),
  211. 'auction' => array(
  212. '/library/ur_here.lbi' => 0,
  213. '/library/search_form.lbi' => 0,
  214. '/library/member.lbi' => 0,
  215. '/library/category_tree.lbi' => 0,
  216. '/library/promotion_info.lbi' => 0,
  217. '/library/cart.lbi' => 0,
  218. '/library/top10.lbi' => 0,
  219. '/library/history.lbi' => 0,
  220. ),
  221. 'message_board' => array(
  222. '/library/ur_here.lbi' => 0,
  223. '/library/search_form.lbi' => 0,
  224. '/library/member.lbi' => 0,
  225. '/library/category_tree.lbi' => 0,
  226. '/library/promotion_info.lbi' => 0,
  227. '/library/cart.lbi' => 0,
  228. '/library/top10.lbi' => 0,
  229. '/library/history.lbi' => 0,
  230. '/library/message_list.lbi' => 10,
  231. ),
  232. 'exchange_list' => array(
  233. '/library/ur_here.lbi' => 0,
  234. '/library/cart.lbi' => 0,
  235. '/library/category_tree.lbi' => 0,
  236. '/library/history.lbi' => 0,
  237. '/library/pages.lbi' => 0,
  238. '/library/exchange_hot.lbi' => 5,
  239. '/library/exchange_list.lbi' => 0,
  240. ),
  241. );
复制代码

回答:
设置 模板设置中
某个页面可以选择的库文件。

嗯,明白了,謝謝

还是晓天哥们厉害

有一个问题,这个lib_template.php 规定了 库文件我自定义的库文件 引用进去 重新编辑后 就会消失
但在这个文件里 定义了 也不管用 有谁知道这是为什么啊 ? '/library/test.lbi' => 0,