2011-07-15, 01:14:11
Carlos Wrote:Some plugins allow inserting constant definitions (define('WHATEVER','something');) to set custom values, usually near the beginning of the plugin file.
IMO the problem with this is, if the developer releases a new version, you have to remember to edit those lines in the new file before updating.
A simple alternative could be telling the user to insert those definitions in the root gsconfig.php
Another could be that e.g. MyPlugin did what GetSimple does: check if a myplugin/mypluginconfig.php file exists, if not it renames the (bundled) myplugin/temp.mypluginconfig.php. However I don't like this for small plugins...
What do you think about this? Other ideas?
Another idea is: use only constants for default settings and every setting is changeable using an administration page for the plugin and the settings are stored in a file in data/other. If there is no settings file, the defaults are used.