This depends on the type of add-on. Some allow saving custom settings very easily. There are some examples in the user docs, but you may find better examples by downloading a couple add-ons (of the same type you are trying to create) from devot-ee, and see how they handle it (there are a couple approaches).
Thanks hd. As I mentioned the type of add-on is a ‘module’, although it seems pointless how EE differentiates between different types of addons.
I see that extensions have a nice automatic way to store settings, so I was wondering whether I was missing something with modules, as I have resorted to creating a separate database table.
I believe it is DevDemon’s “Tagger” module that creates a column in the exp_modules table for settings (if it doesn’t already exist) with a comment in the code to the effect of “why isn’t this already here?”. If many add-on developers decide to create and use the same column in that table maybe we can get ellislab to include it in a future EE2 release. Might have a look at what they do since it’s a free module.
Thanks ender, that sounds like a smart idea. It seems like something fairly obvious was overlooked not allowing modules to store settings. I’ll go with modifying the exp_modules table, and hopefully ellislab test for an existing column before trying to add it in any schema updates they do in future!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.