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

第一步:首先我们打开 /article.php 文件,找到

  1. $smarty->assign('comment_type', 1);

在它下面增加一行代码

  1. $smarty->assign('topcatid',array_pop($catlist));

第二步:然后我们来修改 /themes/default/library/comments.lbi,找到

  1. {insert_scripts files='transport.js,utils.js'}
  2. <divid="ECS_COMMENT"> {* ECSHOP 提醒您:动态载入comments_list.lbi,显示评论列表和评论表单 *}{insert type=$type id=$id}</div>

将它修改为

  1. {if$topcatid neq 1}
  2. {insert_scripts files='transport.js,utils.js'}
  3. <div id="ECS_COMMENT"> {* ECSHOP 提醒您:动态载入comments_list.lbi,显示评论列表和评论表单 *}{insert type=$type id=$id}</div>
  4. {/if}

这样就可以了,去重新刷新一下帮助中心的文章页,看是不是没有评论框了。

原文地址:https://www.cnblogs.com/wangblognet/p/2832832.html