個人認為幫助中心分類下的文章沒有必要給它加個評論功能,
下面我們來去掉它
第一步:
首先我們打開 /article.php 文件
找到
$smarty->assign('comment_type', 1);
在它下面增加一行代碼
$smarty->assign('topcatid',array_pop($catlist));
第二步:
然后我們來修改 /themes/default/library/comments.lbi
找到
{insert_scripts files='transport.js,utils.js'}
<div id="ECS_COMMENT"> {* ECSHOP 提醒您:動態載入comments_list.lbi,顯示評論列表和評論表單 *}{insert name='comments' type=$type id=$id}</div>
將它修改為
{if $topcatid neq 1}
{insert_scripts files='transport.js,utils.js'}
<div id="ECS_COMMENT"> {* ECSHOP 提醒您:動態載入comments_list.lbi,顯示評論列表和評論表單 *}{insert name='comments' type=$type id=$id}</div>
{/if}
這樣就可以了,去重新刷新一下幫助中心的文章頁,看是不是沒有評論框了。
新聞熱點
疑難解答