首页 > PHP > Xiuno BBS首页循环调用每个版块及帖子列表

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

 <?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 } ?>

参考自ok0816.com

标签: xiuno

添加新评论