详情页

ECSHOP隐藏帮助中心文章页的评论功能方法

时间:2024年02月08日

编辑:佚名

第一步:首先我们打开 /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'}
<divid="ECS_COMMENT"> {* ECSHOP 提醒您:动态载入comments_list.lbi,显示评论列表和评论表单 *}{insert 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 type=$type id=$id}</div>
{/if}
这样就可以了,去重新刷新一下帮助中心的文章页,看是不是没有评论框了。
相关文章
猜你需要