修改方法如下:

在:

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);

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

来源:帝国论坛

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用*标注

11 replies on “【分享】首页调用评论实现:头像+标题+评论内容+时间!”

Instagram

[instagram-feed num=6 cols=6 showfollow=false showheader=false showbutton=false showfollow=false]