This script will display the thread and post count of your boards along with the actual thread and post count at the time of loading. Stored values that do not match the actual values will be highlighted. If there are discrepencies you will have an option to "UPDATE" the information.
The instructions are in the script for installation. Basicly add a new link to your menu.php script in your admin directory and upload both scripts to your admin directory.
Hope someone finds this usefull. I made it because I wanted to try and count posts for each board with one query and then it evolved. LoL <img src="/threads/php/images/icons/crazy.gif" alt="" />
Edit: The latest version of this script is attached to this post.
mine was off a bit in both threads and posts - what happened to the posts that were stored and not counted when I clicked on "update" It showed ~18044 listed and 18060 stored... When I updated, both numbers dropped to 18044 )
The stored number was off then. The "actual" number list is what the script counted for each board when it loaded. When you cliked "update" it loads the page again but adjusts the stored count to what it actually counted while loading.
1) $error should be set if the thread or post counts differ for any of the individual boards, rather than by comparing the total counts. It's possible, although unlikely, that discrepancies in two boards could cancel out.
2) To make this function more user-friendly, add the following text (or something similar) to the top of the display.
If all counts agree: "Stored and actual counts agree - no corrections required."
If there are discrepancies: "Stored and actual counts differ - use the Update button to correct the stored counts."
I have updated the script to make it work with 6.0.x as well as 6.1+ as was mentioned in this thread. I also added the more detailed error check and added the extra information to make it more user friendly as was suggested as well. Some cosmetic changes were made as well.
It is still the same script that JustDave wrote though, so all credit should go to him.
A small fix to this hack will make it compatible with 6.2. If no one else adds this fix, please remind me about this after 6.2 goes into public beta, and I'll post it here.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.