• Welcome to Simple Machines Community Forum. Please login or sign up.
October 16, 2021, 06:05:45 PM


Want to get involved in developing SMF, then why not lend a hand on our github!

[Beta] Correct high ID_CAT values

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

Previous topic - Next topic


June 27, 2008, 02:26:58 PM Last Edit: August 28, 2008, 02:26:24 PM by SleePy

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
Support the SMF Support team!
Join us on IRC Libera.chat/#smf

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...