帝国CMS内容页模板调用当前信息作者会员相关信息

时间:2023年08月18日

/

来源:网络

/

编辑:佚名

帝国cms模板内容页调用当前会员投稿相关信息,比如发布者名称,发布者头像。
只需要在模板相应位置加入对应的代码即可,具体样式可以根据自己实际情况进行修改,当没有上传头像时显示默认头像图片。
<?php
$userid=$navinfor[userid];
$userinfo=sys_ShowMemberInfo($userid,'');
?>
当前发布者头像:<a rel="nofollow" href="[!--news.url--]e/space/?userid=<?=$userinfo[userid]?>" target="_blank"><img src="<?=$userinfo[userpic]?$userinfo[userpic]:$public_r[newsurl].'e/data/images/nouserpic.gif'?>"></a>
当前发布者名称:<a rel="nofollow" href="[!--news.url--]e/space/?userid=<?=$userinfo[userid]?>" target="_blank"><?=$userinfo[username]?></a>
会员信息调用ShowMemberInfo函数,格式为:sys_ShowMemberInfo(用户ID,查询字段)。
以上就是帝国CMS内容页模板调用当前信息作者会员相关信息的方法。
猜你需要

豫ICP备2021026617号-1  豫公网安备:41172602000185   Copyright © 2021-2028 www.78moban.com/ All Rights Reserved

本站作品均来自互联网,转载目的在于传递更多信息,并不代表本站赞同其观点和对其真实性负责。如有侵犯您的版权,请联系 1565229909#qq.com(把#改成@),我们将立即处理。