帝国cms如何调用信息发布者(即投稿者)的会员头像和名字
时间:07-20
作者:
以灵动标签调用为例
$addur=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$bqr[userid]."' limit 1");
$userpic=$addur['userpic']?$addu
$addur=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$bqr[userid]."' limit 1");
$userpic=$addur['userpic']?$addu
以灵动标签调用为例
$addur=$empire->fetch1("select * from {$dbtbpre}enewsmemberadd where userid='".$bqr[userid]."' limit 1");
$userpic=$addur['userpic']?$addur['userpic']:$public_r[newsurl].'e/data/images/nouserpic.gif';
推荐下面的方法
<?php
$userr=sys_ShowMemberInfo($userid,'userpic');
?>
<img src="<?=$userr[userpic]?$userr[userpic]:'/e/data/images/nouserpic.gif'?>">
$userr=sys_ShowMemberInfo($userid,'userpic');
?>
<img src="<?=$userr[userpic]?$userr[userpic]:'/e/data/images/nouserpic.gif'?>">
这个是读取会员的头像,同样道理如果读取名字 使用 username 替换userpic