Home  >  Article  >  Backend Development  >  destoon实现公司新闻详细页添加评论功能的方法_PHP

destoon实现公司新闻详细页添加评论功能的方法_PHP

WBOY
WBOYOriginal
2016-06-01 11:51:54777browse

本文讲述了destoon实现公司新闻详细页添加评论功能的方法,具体步骤如下:

首先找到相应的页面:
template\default\homepage\new.htm
 
在对应的地方添加如下代码:

{if $could_comment && in_array($moduleid, explode(',', $EXT['comment_module']))}
<div id="comment_div" style="display:;">
 <div class="main_head"><div><span class="f_r px12">共<span id="comment_count">0</span>条  </span><strong><span id="message_title">相关评论</span></strong></div></div>
 <div class="main_body"><script type="text/javascript">Df('{$MODULE[3][linkurl]}comment.php&#63;mid={$moduleid}&itemid={$itemid}', 'id="destoon_comment" style="width:100%;"');</script></div>
</div>
{/if}

上述代码实际上是template\default\homepage\introduce.htm这个页面大约104行左右开始的一段评论代码,直接拿过来,再根据需要进行修改一下就可以使用了。
这里所做的修改是把itemid={$COM[userid]} 改成了itemid={$itemid},也就是文章的id.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn