Method of destoon to Realize the Function of Adding Comments to the Detailed Page of Company News

  • 2021-07-09 07:25:44
  • OfStack

This paper describes the method of destoon to realize the function of adding comments to the company news detail page. The specific steps are as follows:

First find the corresponding page:
template\default\homepage\new.htm

Add the following code in the corresponding place:


{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"> Altogether <span id="comment_count">0</span> Article &nbsp;&nbsp;</span><strong><span id="message_title"> Related comments </span></strong></div></div>
 <div class="main_body"><script type="text/javascript">Df('{$MODULE[3][linkurl]}comment.php?mid={$moduleid}&itemid={$itemid}', 'id="destoon_comment" style="width:100%;"');</script></div>
</div>
{/if}

The above code is actually a comment code starting from about 104 lines on the page of template\ default\ homepage\ introduce.htm. Take it directly and modify it as needed.
The change here is to change itemid= {$COM [userid]} to itemid= {$itemid}, which is the article's id.


Related articles: