xiuno指定天数回复后不自动顶帖

V 满总  (UID: 1) 站长 2024-12-27 [复制链接]
帖子链接已复制到剪贴板

450 2

Xiuno BBS首页回复列表 30天前的帖子回复不置前设置,找到文件\model\post.func.php

找:// todo: 如果是老帖,不更新 lastpid

查找以下代码:

thread__update($tid, array('posts+'=>1, 'lastpid'=>$pid, 'lastuid'=>$uid, 'last_date'=>$time));

修改成以下代码:

// 增加30天后的主题 不更新 lastpid
$create = db_find_one('thread', array('tid'=>$tid));
$create_date = $create['create_date'] + (30 * 24 * 60 * 60);
if($create_date > $time){
thread__update($tid, array('posts+'=>1, 'lastpid'=>$pid, 'lastuid'=>$uid, 'last_date'=>$time));
}else{
thread__update($tid, array('posts+'=>1, 'lastuid'=>$uid, 'last_date'=>$time));
}
// 增加30天后的主题 不更新 lastpid

如果想改成其他日期,可以将30 * 24 * 60 * 60 的30改成你想要的天数,改成7就是一周时间内的帖子回复会置前。

「BSAY论坛」运营团队官方账号。
已有回复 (2)
  • 喵小呜  (UID: 53) @Ta
    1月前
    沙发
    楼主发贴辛苦了,谢谢楼主分享!
  • 彩虹小牛马  (UID: 77) @Ta
    5天前
    椅子
    • Xiuno BBS
      3
发新帖
推广 (站长QQ:837054936)