Author Topic: [Beta] Correct high ID_CAT values  (Read 11299 times)

Offline SleePy

  • Let there be light!
  • Site Team Lead
  • SMF Master
  • *
  • Posts: 30,896
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
[Beta] Correct high ID_CAT values
« on: June 27, 2008, 02:26:58 PM »

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
« Last Edit: August 28, 2008, 02:26:24 PM by SleePy »
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Join us on IRC

Offline Cool Surfer

  • Semi-Newbie
  • *
  • Posts: 96
  • Gender: Male
  • Never Give Up...
    • XpIndia.Com
Re: [Beta] Correct high ID_CAT values
« Reply #1 on: August 27, 2008, 02:03:36 PM »
thanks ; 

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