未解决 xiuno让30天前的帖子回复不置前?

若如初 3月前 1163

悬赏¥1金币

打开文件\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 * 6030改成你想要的天数。

──── 0人觉得很赞 ────
最新回复 (0)
    暂无回复,快来抢沙发吧

    暂无回复,快来抢沙发吧

返回