UBB.Dev
Posted By: JustDave [6.2] Check Post Count utility - 01/07/2003 7:01 AM
This script will allow you to correct your thread and post counts if they are off. Thanks goes to Dave_L and Gardener for helping keep this updated since I first released it.

This should work for 6.2 as well as 6.1 and 6.0

Download, read, install, use.

Attached File
63918-checkpostcount.6.2.zip  (84 downloads)
Posted By: JoshPet Re: [6.2] Check Post Count utility - 01/07/2003 7:08 AM
Go Dave!
Posted By: Astaran Re: [6.2] Check Post Count utility - 01/07/2003 2:16 PM
Thx, Dave. I use it regularly.

Maybe it would be even better to find the reason, why the count get's wrong, but that should be much more time intensive that running your hack.
Posted By: Dave_L_dup1 Re: [6.2] Check Post Count utility - 01/18/2003 4:09 AM
Would it make sense to augment this hack to fix the Last Post column data on the main index page, or would it be better to do that as a separate hack?
Posted By: JustDave Re: [6.2] Check Post Count utility - 01/18/2003 4:25 AM
I'll have to look at things to see what it would take to clean that up. I forget but I think we covered why this was happening once before, didn't we?
Posted By: Dave_L_dup1 Re: [6.2] Check Post Count utility - 01/18/2003 5:10 AM
I've recently noticed that the Last Post info isn't getting updated properly when I move the most recent thread to another forum. I know that's probably a bug, but it would be useful to be able to update that column whenever it gets out of synch.
Posted By: JustDave Re: [6.2] Check Post Count utility - 01/18/2003 5:22 AM
I'll get this changed to update that as well then.
Posted By: Dave_L_dup1 Re: [6.2] Check Post Count utility - 01/18/2003 3:17 PM
Kewl

You probably don't need this, but here's a snippet from one of my import scripts for updating this info. It would have to changed a bit, but the general processing should be the same.

Code
// Get Bo_LastNumber, Bo_Posterid, Bo_Last, Bo_lastMain from latest post in forum<br />list($bo_lastnumber, $bo_posterid, $bo_last, $bo_lastmain) = array(0, 0, 0, 0);<br />if ($bo_total > 0) {<br />   $result = do_query("<br />      SELECT   B_Number, B_Posterid, B_Posted, B_Main<br />      FROM     tmp_posts<br />      WHERE    B_Board = '$keyword'<br />      ORDER BY B_Posted DESC<br />      LIMIT    1<br />   ");<br />   list($bo_lastnumber, $bo_posterid, $bo_last, $bo_lastmain) = mysql_fetch_row($result);<br />   mysql_free_result($result);<br />   if (!$bo_lastnumber) {<br />      ubbimport_log("Warning: board $keyword, unable to determine Bo_LastNumber\n");<br />   }<br />   if (!$bo_posterid) {<br />      ubbimport_log("Warning: board $keyword, unable to determine Bo_Posterid\n");<br />   }<br />   if (!$bo_last) {<br />      ubbimport_log("Warning: board $keyword, unable to determine Bo_Last\n");<br />   }<br />   if (!$bo_lastmain) {<br />      ubbimport_log("Warning: board $keyword, unable to determine Bo_lastMain\n");<br />   }<br />}
Posted By: JoshPet Re: [6.2] Check Post Count utility - 02/15/2003 9:00 PM
This has been tested and true. Moved to finished mods.
© UBB.Developers