之前有网友提出这样的问题,我也同样遇到了。
https://discuz.dismall.com/forum.php?mod=viewthread&tid=1909026
现解决如下:
1. 在 function_post.php 添加
- function updateforumcounttodaypost($fid) {
- extract(DB::fetch_first("SELECT COUNT(*) AS threadcount, SUM(t.replies)+COUNT(*) AS replycount
- FROM ".DB::table('forum_thread')." t, ".DB::table('forum_forum')." f
- WHERE f.fid='$fid' AND t.fid=f.fid AND t.displayorder>='0'"));
- $thread = DB::fetch_first("SELECT tid, subject, author, lastpost, lastposter FROM ".DB::table('forum_thread')."
- WHERE fid='$fid' AND displayorder='0' ORDER BY lastpost DESC LIMIT 1");
- $thread['subject'] = addslashes($thread['subject']);
- $thread['lastposter'] = $thread['author'] ? addslashes($thread['lastposter']) : lang('forum/misc', 'anonymous');
-
- $today=getdate();
- $day_this=mktime(0,0,0,$today['mon'],$today['mday'],$today['year']);
-
- $postcount = DB::fetch_first("SELECT COUNT(*) AS postcounts FROM ".DB::table('forum_post')." WHERE fid='$fid' ");
-
- DB::query("UPDATE ".DB::table('forum_forum')." SET posts='$replycount', threads='$threadcount', lastpost='$thread[tid]\t$thread[subject]\t$thread[lastpost]\t$thread[lastposter]' , todayposts=$postcount[postcounts] WHERE fid='$fid'", 'UNBUFFERED');
- }
复制代码
2. 修改: topicadmin_moderate.php
- $modaction = 'MOV';
- //updateforumcount($moveto);
- //updateforumcount($_G['fid']);
- updateforumcounttodaypost($moveto);
- updateforumcounttodaypost($_G['fid']);
复制代码
测试通过,可以看一下 www.toohoo.com
|