• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

在viewthread_node.htm中如何调用当前发帖用户的用户组。用户扩展积分。

php 搞代码 3年前 (2022-01-23) 19次浏览 已收录 0个评论
文章目录[隐藏]

在viewthread_node.htm中如何调用当前发帖用户的用户组。用户扩展积分。

回复讨论(解决方案)

viewthread_node.htm是什么?
代码呢?

viewthread_node.htm是什么?
代码呢?

就是discuz的帖子内容页面。因为里面用到的是一个变量,这个变量是从后台设置输出出来的。现在不想用后台的这个变量,直接调用这几个

不想用可以在调用的地方删除啊

//$_G['setting']['extcredits'] 就是你在后台设置的所有扩展积分foreach($postlist as $pid=>$post){	foreach($_G['setting']['extcredits'] as $cid=>$v){		$postlist[$pid]['extcredits'][$v['title']] = $post['extcredits'.$cid];	}	echo '用户 :'.$postlist[$pid]['usernameenc'];	echo "<pre class="prettyprint linenums">";	print_r($postlist[$pid]['extcredits']);	echo "

“; //用户组就是 authortitle echo $postlist[$pid][‘authortitle’].’


‘;}

source\module\forum\forum_viewthread.php
在这个页面中 include template … 之上加入以上代码

//$_G['setting']['extcredits'] 就是你在后台设置的所有扩展积分foreach($postlist as $pid=>$post){	foreach($_G['setting']['extcredits'] as $cid=>$v){		$postlist[$pid]['extcredits'][$v['title']] = $post['extcredits'.$cid];	}	echo '用户 :'.$postlist[$pid]['usernameenc'];	echo "<pre class="prettyprint linenums">";	print_r($postlist[$pid]['extcredits']);	echo "

“; //用户组就是 authortitle echo $postlist[$pid][‘authortitle’]2本文来源gaodaima#com搞(代@码$网6

搞gaodaima代码

.’


‘;}


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:在viewthread_node.htm中如何调用当前发帖用户的用户组。用户扩展积分。
喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址