[2.0.6] Resync User Post Counts

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
18
72%
Very Good
3
12%
Good
2
8%
Fair
0
No votes
Poor
2
8%
 
Total votes: 25

asinshesq
Registered User
Posts: 6266
Joined: Sun Feb 22, 2004 9:34 pm
Location: NYC
Name: Alan

Re: [2.0.6] Resync User Post Counts

Post by asinshesq »

I just posted a faster version of the code I posted earlier. Note that the code assumes that all of the forum databases on your server that you include in the resync have the same host, username and password. If that's not true, you need to tweak the code a bit to treat those entries the same way as $mysqldb[] is treated. Specifically, you would:

- include a separate line beginning with $host[] for each database, a separate line beginning with for $dbuser[] for each database and a separate line beginning with $dbpswd[]

- move the definition of $link down so that it appears after the $database_list definition and in that definition refer to $host[$i], $dbuser[$i] and $dbpswed[$i] rather than $host, $dbuser and $dbpswd.
User avatar
ferra1980
Registered User
Posts: 48
Joined: Tue Nov 07, 2006 10:18 am

Re: [2.0.6] Resync User Post Counts

Post by ferra1980 »

Link in the first page doesn't works...
R45
Registered User
Posts: 2830
Joined: Tue Nov 27, 2001 10:42 pm

Re: [2.0.6] Resync User Post Counts

Post by R45 »

Eisenbart
Registered User
Posts: 25
Joined: Fri Jun 22, 2007 1:43 pm

Re: [2.0.6] Resync User Post Counts

Post by Eisenbart »

There's a bug in "admin_post_count_resync.php" which causes the first N users to be skipped in batch mode, where N is the value specified for the resyncs per batch. Here's how to fix it:

Find:

Code: Select all

// calculate the point for the first value of the limit
$batch_point = $batch_number * $batch_amount;
Replace with:

Code: Select all

// calculate the point for the first value of the limit
$batch_point = ( $batch_number - 1 ) * $batch_amount;
Eisenbart
Registered User
Posts: 25
Joined: Fri Jun 22, 2007 1:43 pm

Re: [2.0.6] Resync User Post Counts

Post by Eisenbart »

I wrote a new version of this mod, here's the relevant part I added to the changelog:

Code: Select all

2007-6-25 - Version 1.2.2
- Fixed a bug which caused the first N users to be skipped in batch mode,
  where N is the value specified for the resyncs per batch
- Improved language file compatibility to be able to provide translations
  for the name displayed for this module under the User Admin Section
- Rewrote language file for "English" and added two new ones for "German"
  and "German formal"
You can get the new version here.
trv
Registered User
Posts: 64
Joined: Sun Nov 07, 2004 4:39 pm

Re: [2.0.6] Resync User Post Counts

Post by trv »

Could you please re-upload the file? thx!
User avatar
Raimon
Former Team Member
Posts: 12088
Joined: Tue May 30, 2006 5:31 pm
Location: Netherlands
Name: Raimon Meuldijk
Contact:

Re: [2.0.6] Resync User Post Counts

Post by Raimon »

Need phpBB installation, extenstions, Styles or integrate phpBB with you website?
Contact me for fair prices and good service!
Post Reply

Return to “[2.0.x] MOD Database Cleanup”