Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : The Site : Post count drop?
New Topic New Poll Post Reply
Poster Message
eytanz
Level: Smitemaster
Avatar
Rank Points: 2708
Registered: 02-05-2003
IP: Logged
icon Post count drop? (0)  
My post count just dropped by about 20 posts from the 1040s to the 1020s. Erik, who was over a 1000, is now at 970-something. Has some thread been deleted, or has something else happened?

I don't really care about the post count, I'm just puzzled :huh

(I also noticed that DiMono, who just had a thread about reaching 499 posts, is at 497. I'm guessing Oneiromancer really should be somewhere around 4352, but he's down to the mid-1350's at the moment :P)

[Edited by eytanz on 12-22-2003 at 04:13 PM GMT]

____________________________
I got my avatar back! Yay!
12-22-2003 at 04:11 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5416
Registered: 02-04-2003
IP: Logged
icon Re: Post count drop? (0)  
Wow, you're quick! I *just* uploaded a new script that counts the number of actual posts each person has and fixes their post count. It does the same for each Topic - we've seen the Num Replies field be incorrect as well.

This doesn't fix the bugs that caused these numbers to be wrong in the first place, but it at least synchs everything up to be correct for now.

Admins - this tool is in the admin area, under User Management - as I said, it will fix users post counts and thread reply counts - feel free to use it any time you notice any errors like this.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
12-22-2003 at 04:14 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
The_Red_Hawk
Level: Smitemaster
Rank Points: 783
Registered: 09-02-2003
IP: Logged
icon Re: Post count drop? (0)  
How does it "fix" the post count?

____________________________
Slashing, whirling, diving, twirling,
Snapping, turning, rising, swirling,
Screeching, flipping, gliding, sliding,
The red hawk's dance of death.

.....the king of the skies.....
12-22-2003 at 04:54 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Schik
Level: Legendary Smitemaster
Avatar
Rank Points: 5416
Registered: 02-04-2003
IP: Logged
icon Re: Post count drop? (0)  
When a user creates a new post, the code basically says "user.NumPosts = user.NumPosts + 1". Likewise, if you delete a post, it subtracts one from your count. It keeps track of posts this way so it doesn't need to count them every time they're required - that would put a lot more strain on the database.

There are various ways that it screws up - for instance, if you double post, it might post it twice but count it once. Or if you're deleting a post and just keep banging on the "Edit Message" button, it might decrement your count several times while only deleting one message.

So the new code counts, for each user, how many messages exist with that user as the author and sets the NumPosts field accordingly.

____________________________
The greatness of a nation and its moral progress can be judged by the way it treats its animals.
--Mahatma Gandhi
12-22-2003 at 05:00 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : The Site : Post count drop?
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.