加油哥随机帖子-任意板块只要有十个帖子即可显示
大佬 2021-9-18

以前的版本需要板块有100个帖子才会显示太麻烦-现在只要十个帖子啦

你任意一个板块发10个帖子不难吧

修改在

\plugin\xn_bgee_radom_thread\hook\thread_postlist_before.htm

 

<?php
   $_randthreadlist = thread_find_by_fid($thread['fid'],rand(1,10), 10);
      
   // 过滤没有权限访问的主题 / filter no permission thread
   thread_list_access_filter($_randthreadlist, $gid);

  ?>
  <div class="card">
   <div class="card-block">
    <h6 class="card-title">猜你喜欢:</h6>
    <ul class="text-middle break-all">
     <?php foreach($_randthreadlist as $_thread) { ?>
     <li>
      <a href="<?php echo url("thread-$_thread[tid]");?>">
       <?php echo $_thread['subject'];?>
      </a>
     </li>
     <?php } ?>
    </ul>
   </div>
  </div>

上传的附件:
最新回复 (16)
全部楼主
  • forxiuno
    2021-10-12 2
    0
    longbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbuglongbug
  • munan
    2021-10-16 3
    0
    楼主,你写得实在是太好了。我惟一能做的,就只有把这个帖子顶上去这件事了。 
  • munan
    2021-10-21 4
    0
    楼主,我只是来混个熟的!老板,侬亿雷凑闹嫩了!
  • xyzuqi
    2021-10-31 5
    0
    我要拿出这帖子奉献给世人赏阅,我要把这个帖子一直往上顶,往上顶!顶到所有人都看到为止! 
  • asdrt123
    2021-11-4 6
    0
    楼主,我只是来混个熟的!老板,侬亿雷凑闹嫩了!
  • asdrt123
    2021-11-4 7
    0
    我要拿出这帖子奉献给世人赏阅,我要把这个帖子一直往上顶,往上顶!顶到所有人都看到为止! 
  • asdrt123
    2021-11-4 8
    0
    沙发我没有,板凳我没有,板也没有,只好站在后面排队支持! 
  • 7232708273
    2021-12-29 9
    0
    祝xiunobbs论坛越办越好!!!
  • ghfcmhbf
    2022-3-18 10
    0
    楼主,我只是来混个熟的!老板,侬亿雷凑闹嫩了!
  • gaojituan
    2022-4-14 11
    0
    不错的帖子!
  • tyuv123
    2022-7-22 12
    0
  • geruixi
    2022-8-6 13
    0
    沙发我没有,板凳我没有,板也没有,只好站在后面排队支持! 
  • makoudopling
    2022-9-3 14
    0
    好耶
  • 西兰花1
    2022-11-1 15
    0
    楼主,我只是来混个熟的!老板,侬亿雷凑闹嫩了!
  • 2380699980
    2022-11-23 16
    0
    面对如此强贴,论遇到多大阻力,只要我一息上尚存,就绝不会让它沉沦下去,这一点请楼主放心。 
  • weige
    1月前 17
    0
    感谢楼主ing!!!
返回