首页 话题 小组 问答 好文 用户 我的社区 域名交易 唠叨

[教程]Xiuno BBS首页循环调用每个版块及帖子列表

发布于 2025-05-03 18:32:59
0
61

过滤了置顶帖,也未写权限隐藏,需要可自行添加


<?php foreach($forumlist_show as $_forum) { ?>
   <a href="<?php echo url("forum-$_forum[fid]");?>">
     <?php echo $_forum['name'];?>
   </a>
<?php
$_threadlist = thread__find_by_fid($_forum['fid'], 1, 6);
//6表示每个列表显示6个帖子。
thread_list_access_filter($_threadlist, $gid);
?>
<ul>
  <?php foreach($_threadlist as $_thread) { ?>
   <li>
    <a href="<?php echo url("thread-$_thread[tid]");?>">
     <?php echo $_thread['subject'];?>
    </a>
   </li>
     <?php } ?>
  </ul>
<?php } ?>
评论
一个月内的热帖推荐
啊龙
Lv.1普通用户

9545

帖子

31

小组

3242

积分

赞助商广告
站长交流