Phpcms in the comments plugin is very useful! But the style of personal feeling ugly ruthless, Baidu can not find a solution, perhaps their own search method is not right, so they studied the research, here can be used in two ways to modify
Method One:
Get data using the Get method in Phpcms
1 //Commentid field value for stitching comment table2 {php $commentid = ' content_ '. $catid. ' -'. $id. ' -'. $modelid;}3 //Query get Data4 {pc:get sql= "select * from v9_comment_data_1 where Commentid = ' $commentid '" cache= "0" return= "data"}5 //Cyclic output6 {loop $data $key $val}7 <Liclass= "List-group-item">8 <Divclass= "Media">9 <aclass= "Media-left"href="#">Ten <imgsrc= "{img_path}tou.png"class= "Img-circle"alt="..."> One </a> A <Divclass= "Media-body"> - <h5class= "Media-heading">{$val [username]}</h5> - <spanstyle= "font-size:10px;">{$val [content]}</span> the </Div> - </Div> - </Li> - {/loop} +{/PC}
Method Two:
In addition to using the Get method to get the data in the simplest way, find/phpcms/templates/default/comment/show_list.html find the following code, to modify the style can be
1 {pc:comment action= "lists" commentid= "$commentid" siteid= "$siteid" page= "$_get[page]" hot= "$hot" num= "20"} 2 {if!empty ($data)}3 <Divclass= "Comment_button"><ahref= "{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> <ahref= "{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 <Divclass= "comment">6 {loop $data $r}7 <h5class= "title fn">{direction ($r [direction])}<FontColor= "#FF0000">{format::d ate ($r [creat_at], 1)}</Font>{if $r [UserID]} {Get_nickname ($r [userid])} {Else} {$r [username]} {/if}</h5>8 <Divclass= "Content">{$r [content]}9 <Divclass= "RT"><ahref= "javascript:void (0)"onclick= "Reply ({$r [id]}, ' {$commentid} ')">Reply</a> <ahref= "javascript:void (0)"onclick= "Support ({$r [id]}, ' {$commentid} ')">Support</a>(<FontID= "support_{$r [id]}">{$r [support]}</Font>)Ten </Div> One <DivID= "reply_{$r [id]}"style= "Display:none"></Div> A </Div> - - <Divclass= "Bk30 hr mb8"></Div> the {/loop} - </Div> - - <DivID= "pages"class= "Text-r">{$pages}</Div> + {/if} -{/PC}
Modify the comment style in Phpcms