帝国cms首页调用整站最新5条评论详细信息
无需修改任何源码,直接用php代码在任何页面(静态或者动态)都可以调用全站评论(所有数据表的评论)。输出:评论者,评论者头像,被评论文章栏目名称、文章标题、文章链接、评论详细内容,评论时间,按照评论时间排序。代码如下:<ul>[e:……
无需修改任何源码,直接用php代码在任何页面(静态或者动态)都可以调用全站评论(所有数据表的评论)。
输出:评论者,评论者头像,被评论文章栏目名称、文章标题、文章链接、评论详细内容,评论时间,按照评论时间排序。
代码如下:
<ul>[e:loop={"select * from {$dbtbpre}enewspl_1 order by saytime limit 5",0,24,0}]<?php$myid=$bqr['userid'];$myid2=$bqr['id'];$member=$empire->fetch1("select userpic from phome_enewsmemberadd where userid='$myid'");$mytitle=$empire->fetch1("select titleurl,title from phome_ecms_news where id='$myid2'");?> <li class="clr"> <div class="top"> <div class="img"> <a href="<?=$bqr['newsurl']?>e/space/?userid=<?=$bqr[userid]?>" target="_blank"> <img src="<?=$member['userpic']?$member['userpic']:'/style/images/nopic.gif' ?>" width="46" height="46" /> </a> </div> <div class="word"> <div class="name"> <?=$bqr['username']?> 在 <a href="<?=$bqsr[classurl]?>" target="_blank"><?=$bqsr[classname]?></a> 栏目 <span>评论文章:</span> </div> <div class="title"> <a href="<?=$mytitle['titleurl']?>" target="_blank"><?=$mytitle['title']?></a> </div> </div> </div> <div class="btm"> <i class="pre"></i><?=$bqr['saytext']?><i class="nxt"></i> </div> </li>[/e:loop]
- 上一篇
帝国CMS正文内容设置关键词与图片链接冲突的问题
以下是解决方法,已测试!在e/class/functions.php中,查找代码:“ function ReplaceKey($newstext,$classid=0)” 或 “//替换关键字”(有时打开为utf-8时中文显示为乱码)把这一大段大部分(即:“//替换关键字”部分)
- 下一篇
帝国cms后台恢复数据库出现的错误
在本地调试并备份好,上传服务器还原出现这样的问题You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use n