Building a new module for D6 (then we'll go into D7 with it, but for now D6) and looking at adding into the DB a few things. Okay, 7 New Tables, 2 Admin Menu Items, 1 G1Params & 96 friggin' Language Keys.
I know for this I need a new Localization Category for the strings, then I need to drop the LocalizationKeys & finally LocalizationStrings to get all of this go smoothly. Thanks to Deano in a previous post I know that I can do the following as an example of how to input in the AdminMenu:
SET @iOrder = (SELECT MAX(`order`) FROM `AdminMenu` WHERE `Categ` = '5');
INSERT INTO `AdminMenu` (`ID`, `Title`, `Url`, `Desc`, `Check`, `Order`, `Categ`, `Icon`) VALUES(NULL, 'Mod Name Settings', 'global_settings.php?cat=24', 'mod name feature management: notification emails, the thumbs size, etc.', '', @iOrder, 5, 'modname_settings.gif');
What we don't want is for the:
'global_settings.php?cat=24'
To start with. That is the cat for Groups, and while this is similiar we need a whole new one for this module that will allow it to be administered correctly from the Admin Panels Settings Page. So, do I first need to copy cat=24 from AdminMenuCategories and set it into the DB with the new settings and if so how do I get it's cat=# to go to the string that is above this?
2nd question of the day, this should be fun also. Since we're adding in 96 LKeys, I know the traditional way of doing this is to create the Language Categorization (which raises the question from above) of gaining the CAT# and then using that in the LKey & Strings.
So, how do we get all of this run to smoothly in an SQL file? I know that I can just do it by hand in the DB (gawd would that take forever) or I can go in and create the necessary categories by hand and then input them real quick into a long SQL for the Keys & Strings. But I'm looking for the super easy way that makes the whole thing automated. This is for a really large free module (don't see a ton wanting it, but many may want it) and it is a freebie like all the stuff for those who can use it.
So, how about a little hand here please.