帝国cms后台管理评论模板里有评论的列表模板,想在评论列表模板中调用热门文章或是推荐文章,现在考虑到标签和js.
长知识:动态模板无法使用标签,所以标签在这里就pass了,专心搞js----》
1、后台=》栏目=》增加自定义js
2、起好名字好找
3、写好语句
1,根据最新文章 select * from [!db.pre!]ecms_news where checked=1 order by newstime desc limit 10
2,根据推荐文章 select * from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc limit 10
3,根据热门文章 select * from [!db.pre!]ecms_news where checked=1 order by onclick desc limit 10
4,根据头条新闻 select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc limit 10
5,根据评论排行 select * from [!db.pre!]ecms_news where checked=1 order by plnum desc limit 10
6,根据digg排行 select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc limit 10
7,根据投票排行 select * from [!db.pre!]ecms_news where checked=1 order by votenum desc limit 10
8,根据下载排行 select * from [!db.pre!]ecms_news where checked=1 order by totaldown desc limit 10
9,根据评分排行 select * from [!db.pre!]ecms_news where checked=1 order by infopfen desc limit 10
4、后台=》栏目》管理自定义js
5、找到,然后任意模板位置使用<script>src="js地址"</script>