帝国首页调用评论实现:头像+标题+评论内容建站

SEO新闻
e/class/t_functions.php中 if(empty($r['username'])) { $r['username']='匿名'; } 下面加: $addr=$empire-fetch1(select * from {$dbtbpre}enewsmemberadd where use...

e/class/t_functions.php中

if(empty($r['username']))
        {
                $r['username']='匿名';
        }

下面加:

$addr=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='$r[userid]' limit 1");
        if(empty($r['userid']))
        {
                $r['userpic']="$addr[userpic]"?$addr['userpic']:$public_r[newsurl].'/e/data/images/nouserpic.gif';
        }
        if($r['userid'])
        {
                $r['userpic']="$addr[userpic]"?$addr['userpic']:$public_r[newsurl].'/e/data/images/nouserpic.gif';
        }


然后在下面:

$listtemp列表中加:

$listtemp=str_replace("[!--userpic--]",$r['userpic'],$listtemp);

最后用不用说了,评论标签调用

1
联系我们