0 0 0

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

5 哆哆 UID:1 管理员
3月前 197 商家 创始人

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

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

查找以下代码:

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

修改成以下代码:

// 增加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
PHP

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

  •  
最新回复 (0)
查看全部
全部楼主
    暂无回复,快来抢沙发吧

    暂无回复,快来抢沙发吧

请先登录后发表评论!

广告推荐
返回
广告推荐
请先登录后发表评论!