<p>Xiuno BBS首页回复列表 30天前的帖子回复不置前设置,找到文件\model\post.func.php<br />找:// todo: 如果是老帖,不更新 lastpid<br />查找以下代码:</p>
<pre class="language-markup"><code>thread__update($tid, array('posts+'=>1, 'lastpid'=>$pid, 'lastuid'=>$uid, 'last_date'=>$time));</code></pre>
<p>修改成以下代码:</p>
<pre class="language-markup"><code>// 增加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</code></pre>
<p>如果想改成其他日期,可以将30 24 60 * 60 的30改成你想要的天数,改成7就是一周时间内的帖子回复会置前。</p>
免责声明:
此内容由本站网友原创或转载自网络公开渠道,仅供学习测试使用,禁止商用,著作权归原作者所有,本站不对此内容担负法律责,请于下载后24小时内删除,如发现内容侵权或违规,请联系本站,我们将在12小时内及时做删除或屏蔽处理!