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