帝国CMS评论列表标签showplinfo调用会员头像userpic的方法

[复制链接]
查看1006 | 回复0 | 2020-6-8 20:14:28 | 显示全部楼层 |阅读模式
帝国CMS评论列表标签showplinfo调用会员头像userpic的方法
先看一下效果!

改造方法如下:
  1. /e/class/t_functions.php 打开这个文件:

  2. 找到:

  3. if(empty($r['username']))

  4. {

  5. $r['username']='匿名';

  6. }

  7. 在下面增加:

  8. $addr=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='$r[userid]' limit 1");

  9.         if(empty($r['userid']))

  10.         {

  11.                 $r['userpic']="$addr[userpic]"?$addr['userpic']:$public_r['newsurl'].'e/data/images/nouserpic.gif';

  12.         }

  13.         if($r['userid'])

  14.         {

  15.                 $r['userpic']="$addr[userpic]"?$addr['userpic']:$public_r['newsurl'].'e/data/images/nouserpic.gif';

  16.         }

  17. 找到:$listtemp=str_replace("[!--fdnum--]",$r['fdnum'],$listtemp);

  18. 下面增加:$listtemp=str_replace("[!--userpic--]",$r['userpic'],$listtemp);
复制代码
好了,评论列表调用的标签里用户头像就用[!--userpic--]调用即可了!
亲测有效。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则