Someone mentioned this in the other forum (I think it was Castel). It's hardly a hack, as it consists of commenting out 3 lines, but here's how to do it:
In functions.php (in the /admin directory) find
It should be around line 1450, somewhere in there. Now, a few lines below that, findCode:// ###################### Start delete thread #######################
and replace it withCode:if ($countposts) { $DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$post[userid]'"); }
Then, a few lines below that, findCode:// if ($countposts) { // $DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$post[userid]'"); // }
A few lines below that, findCode:// ###################### Start delete post #######################
and replace it withCode:if ($countposts) { $DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'"); }
Now when you prune (or a post is deleted) the users' post count won't decrease.Code:// if ($countposts) { // $DB_site->query("UPDATE user SET posts=posts-1 WHERE userid='$postinfo[userid]'"); // }





Bookmarks