Post Count Reduces

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Stylewriter
Registered User
Posts: 25
Joined: Sat Sep 14, 2002 11:53 am
Location: Los Angeles, CA

Post Count Reduces

Post by Stylewriter » Sun Sep 15, 2002 11:52 am

I am using phpBB2.0.2 and when i delete some old topics to free up some DB space the post count for the users goes down.

Anyway to keep the post count up?
If there are any code hacks to do this, please email me...
or if somebody can write a mod - i can't - it would be very nice!
thanx a lot!!!

User avatar
smithy_dll
Former Team Member
Posts: 7630
Joined: Tue Jan 08, 2002 6:27 am
Location: Australia
Name: Lachlan Smith
Contact:

Post by smithy_dll » Sun Sep 15, 2002 12:09 pm

in modcp.php

try finding

Code: Select all

			while ( $row = $db->sql_fetchrow($result) )
			{
				$count_sql[] = "UPDATE " . USERS_TABLE . " 
					SET user_posts = user_posts - " . $row['posts'] . " 
					WHERE user_id = " . $row['poster_id'];
			}
and removing it

it should theoretically work, haven't tested it tho

Stylewriter
Registered User
Posts: 25
Joined: Sat Sep 14, 2002 11:53 am
Location: Los Angeles, CA

Post by Stylewriter » Sun Sep 15, 2002 12:53 pm

yeah! that's it! thanks a lot!!!

User avatar
Sledgstone
Registered User
Posts: 9
Joined: Mon Dec 03, 2001 3:20 pm
Location: New York
Contact:

Post by Sledgstone » Sun Sep 15, 2002 2:56 pm

That does work good! But what about when auto-prune kicks in? Is there any way I can keep it from decreasing member's post counts?

DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom » Mon Sep 16, 2002 8:47 am

auto-prune doesnt reduce post count.

Only manually deleting threads or posts will reduce the post count.

User avatar
Sledgstone
Registered User
Posts: 9
Joined: Mon Dec 03, 2001 3:20 pm
Location: New York
Contact:

Post by Sledgstone » Mon Sep 16, 2002 10:55 am

Really? I had some members tell me it was taking posts away from there count. They could have easily mistaken it for a mod pruning though. Thanks for the help!

teamtwin
Registered User
Posts: 13
Joined: Fri Feb 28, 2003 2:59 am

Post by teamtwin » Wed Mar 12, 2003 10:17 pm

-edit - this works for me when i delete topics, but what about individual posts?

MrStormyNights
Registered User
Posts: 94
Joined: Mon Mar 25, 2002 5:52 pm

Really

Post by MrStormyNights » Sat Jun 14, 2003 11:31 pm

The modcp.php code deletion above works great, but...

I want to know the same thing, how do I keep deleting individual posts from affecting post count?

Nautilus_Xtrem!!
Registered User
Posts: 15
Joined: Tue Mar 02, 2004 4:27 am

Post by Nautilus_Xtrem!! » Thu Mar 04, 2004 5:33 am

I too am in need of a fix for the same situation.

Taajuus
Registered User
Posts: 20
Joined: Fri Mar 05, 2004 12:58 pm

Re: Really

Post by Taajuus » Fri Mar 05, 2004 12:59 pm

MrStormyNights wrote: The modcp.php code deletion above works great, but...


Did not work for me, Im using version 2.0.6. Still reduces count when I remove some topics.

Any solution for this?

Taajuus
Registered User
Posts: 20
Joined: Fri Mar 05, 2004 12:58 pm

Post by Taajuus » Fri Mar 05, 2004 1:04 pm

Oh crap, my bad. Didnt read first post good enough...

It might work, but I would also need a trick to prevent whole forum post count from decreasing, when I remove topics. Is this possible?

Taajuus
Registered User
Posts: 20
Joined: Fri Mar 05, 2004 12:58 pm

Post by Taajuus » Fri Mar 05, 2004 3:48 pm

Problem solved, never mind. This works:
http://www.phpbb.com/phpBB/viewtopic.ph ... post+count

Post Reply

Return to “[2.0.x] MOD Requests”