无需修改任何源码,直接用php代码在任何页面(静态或者动态)都可以调用全站评论(所有数据表的评论)。
输出:评论者,评论者头像,被评论文章栏目名称、文章标题、文章链接、评论详细内容,评论时间,按照评论时间排序。
代码如下:
[e:loop={"select * from {$dbtbpre}enewspl_1 order by saytime limit 10",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> <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> <?=$bqr['username']?>在<a href="<?=$bqsr[classurl]?>" target="_blank"><?=$bqsr[classname]?></a>发表 </div> <a href="<?=$mytitle['titleurl']?>" title="<?=$mytitle['title']?>" rel="external nofollow"> <span class="comment_author"><strong><?=$bqr['username']?></strong></span> <?=$bqr['saytext']?> </a> </li> [/e:loop]