I need a sample and the only mod I can remember that does this is image handler - way to much code! What mod is a good example or can someone post some guidelines / bits of code?
I need a sample and the only mod I can remember that does this is image handler - way to much code! What mod is a good example or can someone post some guidelines / bits of code?
There are two approaches to the admin auto-install
- Use a file in /includes/functions/extra_functions if you don't need to create a message to the user.
- Use an auto_loader and an init_include if you do need to "message" the user.
The Super Globals plugin uses method #1 and shows the insertion of a new configuration group and the associated admin-pages settings.
Perfect and it looks like I need that super globals plugin. It really would be nice to have the helpful mods for development grouped together.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Well, that brought up a few more questions. I'm creating a table in this mod so I need to check to see if the table exists first. Is there a zc function for that?
Secondly, in creating a table - I assume I have to worry about whether there's db prefix. syntax hint?
Thanks to both of you for responding so quickly today.
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Take a look at the init_referrers.php (init_include) used by SNAP Affiliates. It uses the sniffer class to see if a table exists (or on an upgrade if a field within a table exists).
Last edited by lat9; 10 Jul 2014 at 03:36 PM. Reason: Correct file name
Oh, good! Digging in now.
Thanks, I did it!!!
Bookmarks