Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖

X3 首页四格的最新主题包含回复的bug的解决办法

[复制链接]
 楼主| bluegem 发表于 2013-5-21 23:16:25 | 显示全部楼层
爱闲云 发表于 2013-5-21 19:06
请教楼主,如何将X3 首页四格中热帖的统计周期改长?谢谢了

source/module/forum/forum_index.php

$hotdl = TIMESTAMP-604800;

把后面的数字改大,这个是统计热帖的过去的时间的秒数。604800是一周。
回复

使用道具 举报

 楼主| bluegem 发表于 2013-5-22 00:24:30 | 显示全部楼层
热帖问题:

module/forum/forum_index.php

                $hotdl = TIMESTAMP - 604800;
                $grids['hot'] = C::t('forum_thread')->fetch_all_for_guide('hot', 0, array(), 0, $hotdl, 0, 10, $_G['setting']['grid']['fids']);  //把原来的第四个参数3改成0


class/table/table_forum_thread.php

。。。

                        }
                        if($type == 'thread') {
                                $orderby = 'tid';
                        } elseif($type == 'reply') {
                                $orderby = 'lastpost';
                                $addsql .= ' AND replies > 0';
                        } elseif($type == 'hot') {  
                                $orderby = 'heats,replies';
                        } else {

增加hot的排序,优先点击数(heats)还是回复数(replies)大家自己调。
回复

使用道具 举报

爱闲云 发表于 2013-5-26 12:28:30 | 显示全部楼层
bluegem 发表于 2013-5-22 00:24
热帖问题:

module/forum/forum_index.php

请教楼主,第四个参数3改成0后是优先显示点击数(heats)还是回复数(replies)啊?
回复

使用道具 举报

爱闲云 发表于 2013-5-26 12:29:31 | 显示全部楼层
bluegem 发表于 2013-5-21 23:16
source/module/forum/forum_index.php

$hotdl = TIMESTAMP-604800;

谢谢楼主,我将604800调成60480000后,热帖终于显示了,多谢了!!
回复

使用道具 举报

178good 发表于 2013-5-27 02:16:35 | 显示全部楼层
bluegem 发表于 2013-5-21 23:16
source/module/forum/forum_index.php

$hotdl = TIMESTAMP-604800;

5月24日更新版的,我怎么搜索不到 本帖关于热帖的代码啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-3-6 17:10 , Processed in 0.020096 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表