Modify the comment style and comment style in phpcms

Source: Internet
Author: User

Modify the comment style and comment style in phpcms

The built-in comment plug-in phpcms is very useful! However, the style is ugly and Baidu cannot find a solution. Maybe its search method is incorrect, So I studied it myself. Here I can use two methods to modify it.

Method 1:

Use the get method in PHPCMS to obtain data

1 // The commentid field value of the commentid field of the commentid table is spliced to 2 {php $ commentid = 'content _'. $ catid. '-'. $ id. '-'. $ modelid;} 3 // query to obtain data 4 {pc: get SQL = "SELECT * FROM v9_comment_data_1 where commentid = '$ commentid'" cache = "0" return = "data"} 5 // loop output 6 {loop $ data $ key $ val} 7 <li class = "list-group-item"> 8 <div class = "media"> 9 <a class = "media-left" href = "#"> 10  11 </a> 12 <div class =" media-body "> 13 

Method 2:

In addition to getting data using the get method, there is also the simplest way to find/phpcms/templates/default/comment/show_list.html and find the following code to modify the style.

1 {pc: comment action = "lists" commentid = "$ commentid" siteid = "$ siteid" page = "$ _ GET [page]" hot = "$ hot" num = "20 "} 2 {if! Empty ($ data)} 3 <div class = "comment_button"> <a href = "{APP_PATH} index. php? M = comment & c = index & a = init & commentid = {$ commentid} & title = {urlencode ($ comment [title]? $ Comment [title]: $ title)} & url = {urlencode ($ comment [url]? $ Comment [url]: $ url)} & hot = 0 & iframe = 1 "{if empty ($ hot )} class = "on" {/if}> latest </a> <a href = "{APP_PATH} index. php? M = comment & c = index & a = init & commentid = {$ commentid} & title = {urlencode ($ comment [title]? $ Comment [title]: $ title)} & url = {urlencode ($ comment [url]? $ Comment [url]: $ url ))} & hot = 1 & iframe = 1 "{if $ hot} class =" on "{/if}> hottest </a> </div> 4 5 <div class =" comment "> 6 {loop $ data $ r} 7 

 

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.