4 1 0

Xiuno BBS首页回复列表 30天前的帖子回复不置前设置

V Jack UID:3 管理员
2月前 384

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就是一周时间内的帖子回复会置前。


最新回复 (4)
  • V Jack UID:3 管理员 2月前 @Ta 楼主
    2

    菜鸟守护者 必须支持老Jack
    叫义父!

    0
  • 真心会变 UID:4212 2月前 @Ta
    3

    Jack 叫义父!
    过分了嗷

    0
  • 白竹 UID:304 2月前 @Ta
    4

    看看

    0
  • V 老猫 UID:36 2月前 @Ta
    5

    0

请先登录后发表评论!

返回
请先登录后发表评论!
4