[DEVELOPMENT] syncronice post count

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

[DEVELOPMENT] syncronice post count

Post by Niels Chr. Denmark »

I have on request made a drop-in file, witch will update the users post count, so this reflects the real number of posts the users have

In the file it is posible to "hard code" a EXCLUDE or a INCLUDE list of users, so you as admin can diside if all or only specific users shall be updated,
e.g. if you have some users witch you have given a higer post count that they actual have, then you can specify there user ID in the exclude list, so they are not updated by this script


download here

mods.db9.dk/contrib/sync_postcount.zip

since onlyADMIN can run this script, there is not download availbe - sorry

Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

for the information, if a moderator/admin uses the "moderate forum panel" and from there delete some posts, the users post count are not updated, if you instead delete the posts directly from the view topic page, then the counter are updated correctly.

So basically this mod, will correct the post count if you have used the moderator panel

this problem can best be viewet in a users profile, where the number of posts not always reflect the number of posts found if using the "find this users posts"

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 »

and can i update topic post counts? so if the db gets corrupted you can fix it so the topic page count isn't short?

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 »

and can it update topic, post counts? so if the db gets corrupted you can fix it so the topic page count isn't off a few pages?

futurebird
Registered User
Posts: 36
Joined: Wed Jun 19, 2002 11:57 pm
Contact:

Post by futurebird »

I'd sell my soul for a script I could run to get the forum/topic post counts right.... the "go to page..." thing is broken on my forum....

It'd be extra nice as a drop-in for the admin file with a number of "update count" type options...

I could help make the interface... that is unless you've started already...

-Susan

sprinttotal
Registered User
Posts: 51
Joined: Wed Jul 18, 2001 4:35 pm
Location: Portugal
Contact:

Post by sprinttotal »

I found a little 'bug' on the script...

If the user have 0 posts the post count dont update...
Do you like Tuning? If you have a portuguese website you can submit it to Directory PT wich is free and spiderable!

futurebird
Registered User
Posts: 36
Joined: Wed Jun 19, 2002 11:57 pm
Contact:

Post by futurebird »

The script is set up to run from the phpbb root now. I think it should be set up to run in the admin folder.

:)

Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

sprinttotal wrote: I found a little 'bug' on the script...

If the user have 0 posts the post count dont update...

you are rigth, I will try fix it

Niels Chr. Denmark
Registered User
Posts: 1320
Joined: Thu Jan 10, 2002 1:00 pm
Contact:

Post by Niels Chr. Denmark »

futurebird wrote: The script is set up to run from the phpbb root now. I think it should be set up to run in the admin folder.

:)

it shoulden't really matter where the file is located, if however the file was located in the admin folder, it whould be posible to have a link automaticly added to the admin panel, but then again admin panel would take longer to load, it is more a matter of "style" where the file is located.

I guess this file will not be used so offen (maybe only once a year), I have choisen to place it in the root, and not include it in the admin panel - therby sloving the load of this page...simply call the URL instead it is simple and fast

btw. try and explain the problem with the topic/posts count, I haven't notised any problems...

sprinttotal
Registered User
Posts: 51
Joined: Wed Jul 18, 2001 4:35 pm
Location: Portugal
Contact:

Post by sprinttotal »

put sync_postcount.php on the admin panel is just to look better, because if you try to acess to the sync file when you are not logged in, the db wont update, so, you will not have any problem at all :)
Do you like Tuning? If you have a portuguese website you can submit it to Directory PT wich is free and spiderable!

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

Post by DoubleDoom »

Post sync works fine on mine. However, if you have forums with no post count (using the no post count hack), if you resync, the actual total post count will be resync'd overiding the no post count forums.

sprinttotal
Registered User
Posts: 51
Joined: Wed Jul 18, 2001 4:35 pm
Location: Portugal
Contact:

Post by sprinttotal »

Niels Chr. Denmark wrote:
sprinttotal wrote:I found a little 'bug' on the script...

If the user have 0 posts the post count dont update...

you are rigth, I will try fix it


So, any news about this?
Do you like Tuning? If you have a portuguese website you can submit it to Directory PT wich is free and spiderable!

R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Post by R45 »

I did a MOD a while back to do exactly this, blah, if only the MOD database could be up to date.

Post Reply

Return to “[2.0.x] MODs in Development”