首页 > 运营 > CMS建站 > 正文

DEDECMS仿DoNews右侧最新评论的代码_DedeCms教程

2020-01-27 18:38:57
字体:
来源:转载
供稿:网友

 

代码:

{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}

说明:

LIMIT 0 , 30  的30是调用的条数
[field:arctitle function='cn_substr(@me,20)'/] 里面的20是标题显示的字符数
至于显示的样式大家根据自己的模板进行修改吧

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表