Destoon to implement company news Detail Page Add comment function _php instance

Source: Internet
Author: User

This article describes the Destoon to achieve the company news Detail page to add Comment function, the following steps:

First find the appropriate 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" > Total <span id= "Comment_count" >0 </span> article </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 section of the comment code that starts with the template\default\homepage\introduce.htm about 104 lines of this page, and takes it directly. Then you can use it if you want to make a change.
The modification here is to change the itemid={$COM [userid]} to itemid={$itemid}, which is the ID of the article.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.