Home  >  Article  >  CMS Tutorial  >  How to imitate DEDECMS? Latest comments on the right side of DoNews

How to imitate DEDECMS? Latest comments on the right side of DoNews

藏色散人
藏色散人Original
2019-12-26 09:39:271707browse

How to imitate DEDECMS? Latest comments on the right side of DoNews

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

How to imitate DEDECMS? Latest comments on the right side of DoNews

\

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=&#39;yes&#39;]if(@me==&#39;guest&#39;)@me=游客[/field:username]对<a href="[field:url/]">[field:arctitle function=&#39;cn_substr(@me,20)&#39;/]</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=&#39;cn_substr(@me,20)&#39;/]

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn