[Beta] Correct high ID_CAT values

Started by SleePy, June 27, 2008, 02:26:58 PM

Previous topic - Next topic



This little script was wrote to fix high ID_CAT values you may get sometimes when converting some some forum software.

The problem is that some forum software use outrageously high numbers for their category IDs. So inorder for you to be able to convert you have to modify the ID_CAT columns in a couple tables for it to process. The issue may arise when you are upgrading to a newer version of SMF, such as SMF 2.0 where all the column names where brought to lower case.
During this process it may revert from the field type you changed it to, to the default (a tinyint) and could cause the upgrade to fail. This is where this script will come in handy.
It will simply use for the most part the order of the categories to recount all cats to have a smaller value (though the exact work is a little more to prevent errors).

This script should support 1.1 and 2.0 both.


! The script would sometimes fail due to a define.
+ Added login checks to prevent unauthorized use.
! renamed to recount_categories.php
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Cool Surfer

www.xpindia.com ; www.onlinemedicalforum.com/smf 

Be Kind And courteous To People On Your Way Up
For You Might Meet Them On Your Way Down...