首页 > CMS > Discuz > 正文

discuz! 调用楼主所在会员组名代码

2024-09-11 09:05:32
字体:
来源:转载
供稿:网友
调用会员组代码$post[authortitle],默认只在viewthread_node.htm中生效,单独使用在viewthread_node.htm中调用的是最后回帖作者所在用户组名。
如要在viewthread.htm中调用楼主所在用户组,需要写成
<!--{loop $postlist $post}--><!--{if $post['first']}-->$post[authortitle]<!--{/if}--><!--{/loop}-->

调用楼主头像:
<!--{avatar($_G[forum_thread][authorid],small)}-->
复制代码
调用楼主主题数:
<!--{eval $louzhuid = $_G[forum_thread][authorid]; $zhutishu = DB::result(DB::query("SELECT threads FROM ".DB::table('common_member_count')." WHERE uid = '$louzhuid'"));}-->$zhutishu
复制代码
调用楼主积分:
<!--{eval $louzhuid = $_G[forum_thread][authorid]; $jifenshu = DB::result(DB::query("SELECT credits FROM ".DB::table('common_member')." WHERE uid = '$louzhuid'"));}-->$jifenshu
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表