How to imitate the latest comments on the right side of DoNews by DEDECMS?
The function of this comment is good. How to implement it in DEDE. Let me show you the code below
Recommended learning: 梦Weavercms
\
Code:
{dede:sql sql="SELECT aid,username,urlindex,arctitle,url,msg FROM `dede_feedback` where ischeck=1 ORDER BY `dtime` DESC LIMIT 0 , 30"} [field:username runphp='yes']if(@me=='guest')@me=游客[/field:username]对<a href="[field:url/]">[field:arctitle function='cn_substr(@me,20)'/]</a>的评论<br/> <a href="/plus/feedback.php?arcID=[field:aid/]&urlindex=[field:urlindex/]">[field:msg/]</a><br/> {/dede:sql}
Description:
LIMIT 0, 30 The 30 is the number of calls
[field:arctitle function='cn_substr(@me,20)'/]
The 20 inside is the number of characters displayed in the title
As for the display style, you can modify it according to your own template
The above is the detailed content of How to imitate DEDECMS? Latest comments on the right side of DoNews. For more information, please follow other related articles on the PHP Chinese website!