xiuno各页面用户所在用户组gid的调取方式 折腾教程

22SS 2022-5-12 2545

post回复列表  调取 gid
$_post['user']['gid']​

thread内容页面  调取 gid 

$thread['user']['gid']​

自定义板块是否显示在首页,简单代码

$fids = array('1','2','3','4','5'); <!--需要显示在首页的板块ID-->​

调取最后回复用户gid代码
    if($thread['lastuid']){
    $users = user_read_cache($thread['lastuid']);
    $thread['users'] = $users;
    };​

一行代码实现展示当前在线用户的用户名

<?php foreach(online_list_cache() as $online_user) { echo $online_user['username'].' '; } ?>

内容页面作者的用户组gid调取
$thread['user']['gid']​

内容页面作者的用户组group名称调取

──── 0人觉得很赞 ────
最新回复 (3)
  • lv1314521 2022-11-11
    0 地板
    谢谢分享。
  • zzr 2022-9-4
    0 板凳
    谢谢分享
  • geruixi 2022-8-30
    0 沙发
    很实用,谢谢
返回