Xiuno让主页显示指定板块的“板块置顶帖子”

2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
在你当前启用的主题里的hook文件夹创建一个文件,文件名为“index_threadlist_before.htm”,内容任选其一:
<?php 
/* 指定板块帖子 + 置顶帖子 + 普通帖子 */
if($page === 1) {
    $threadlist = thread_find_by_fids(array(1), 1, $pagesize, $order, $threads) + $threadlist; //把array(1)中的1换成要显示的板块ID(可在后台看到)
    thread_list_access_filter($threadlist, $gid); //过滤帖子列表,必须要做
}
?>
<?php 
/* 置顶帖子 + 指定板块帖子 + 普通帖子 */
if($page === 1) {
    $threadlist = $toplist3 + thread_find_by_fids(array(1), 1, $pagesize, $order, $threads) + thread_find_by_fids($fids, $page, $pagesize, $order, $threads); //把array(1)中的1换成要显示的板块ID(可在后台看到)
    thread_list_access_filter($threadlist, $gid); //过滤没有权限访问的帖子,必须要做
}
?>
<?php 
/* 指定板块置顶帖子 + 全站置顶帖子 + 普通帖子 */
if($page === 1) {
    $threadlist = thread_top_find(1) + $threadlist;
    thread_list_access_filter($threadlist, $gid); //过滤没有权限访问的帖子,必须要做
}
?>
<?php 
/* 全站置顶帖子 + 指定板块置顶帖子 + 普通帖子 */
if($page === 1) {
    $threadlist = $toplist3 + thread_top_find(1) + thread_find_by_fids($fids, $page, $pagesize, $order, $threads); //把1换成要显示的板块ID(可在后台看到)
    thread_list_access_filter($threadlist, $gid); //过滤没有权限访问的帖子,必须要做
}
?>
<?php
/* 所有板块置顶帖子 + 全站置顶帖子 + 普通帖子 */
if ($page === 1) {
    $threadlist_alltop = array();
    foreach (arrlist_values($forumlist, 'fid') as $key => $value) {
        $r = thread_top_find( $value );
        $threadlist_alltop = array_merge($threadlist_alltop , $r );
    }
    $threadlist = $threadlist_alltop + $threadlist;
    thread_list_access_filter($threadlist, $gid);
}
?>
<?php
/* 全站置顶帖子 + 所有板块置顶帖子 + 普通帖子 */
if ($page === 1) {
    $threadlist_alltop = array();
    foreach (arrlist_values($forumlist, 'fid') as $key => $value) {
        $r = thread_top_find( $value );
        $threadlist_alltop = array_merge($threadlist_alltop , $r );
    }
    $threadlist = $toplist3 + $threadlist_alltop + thread_find_by_fids($fids, $page, $pagesize, $order, $threads);
    thread_list_access_filter($threadlist, $gid);
}
?>
© 版权声明
1:本网站名称:源码库
2:本站永久网址:www.ymkuz.com
3:本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
4:分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
5:本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
6:本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7:如有链接无法下载、失效或广告,请联系管理员处理!
8:文章投稿-投诉建议E-mail:yunduanw@qq.com 站长QQ:99767152
THE END
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容