MyBB Community Forums

Full Version: Post Count handling
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I would like to know if a mod can be made where the post count of a user remains the same after the deletion of a post.

i.e. a user "test" has 10 posts. If you delete a post/thread of his his post count will go to 9. What I would like to happen is for the post count to stay the same after the deletion.

It would be nice if a kind of counter could be made that would keep the original number of posts and display that instead of the real number of posts.

How difficult is that to do? thank you in advance
open .inc/class_moderations

find and remove
if($post['usepostcounts'] != "no" && $post['visible'] != 0)
		{
			$db->query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum-1 WHERE uid='".$post['uid']."'");
		}

also find and remove

// Remove post count from users
		if($usepostcounts != "no")
		{
			if(is_array($userposts))
			{
				foreach($userposts as $uid => $subtract)
				{
					$db->query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum$subtract WHERE uid='$uid'");
				}
			}
		}