Home > CMS Tutorial > DEDECMS > body text

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

藏色散人
Release: 2019-12-26 09:39:27
Original
1780 people have browsed it

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}
Copy after login

Description:

LIMIT 0, 30 The 30 is the number of calls

[field:arctitle function=&#39;cn_substr(@me,20)&#39;/]
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!