帝国cms:评论列表模板中调用热门文章或是推荐文章的js方法

文章2021-06-2193 人已阅来源:网络

1、后台=》栏目=》增加自定义js

2、起好名字好找

3、写好语句

//根据最新文章 
select * from [!db.pre!]ecms_news where checked=1 order by newstime desc limit 10
//根据推荐文章 
select * from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc limit 10
//根据热门文章 
select * from [!db.pre!]ecms_news where checked=1 order by onclick desc limit 10
//根据头条新闻 
select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc limit 10
//根据评论排行 
select * from [!db.pre!]ecms_news where checked=1 order by plnum desc limit 10
//根据digg排行 
select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc limit 10
//根据投票排行 
select * from [!db.pre!]ecms_news where checked=1 order by votenum desc limit 10
//根据下载排行 
select * from [!db.pre!]ecms_news where checked=1 order by totaldown desc limit 10
//根据评分排行 
select * from [!db.pre!]ecms_news where checked=1 order by infopfen desc limit 10 

4、后台=》栏目》管理自定义js

5、找到,然后任意模板位置使用