On Sun, May 17, 2009 at 1:12 PM, A.L.E.C <[email protected]> wrote:
> Roland Liebl wrote:
>
>> I think it might be a good idea to load plugin configurations from the
>> plugin folder instead of the requirement to edit the main configuration.
>> The main configuration file will get crowdy soon if there will
>> be hopefully lots of plugins.
>
> Plugins configuration and localization should be unified in some way.
> This is needed to solve at least three problems:
> 1. described by you, config file size
> 2. plugins configuration in installer
> 3. language change in Settings->Preferences. E.g. password tab isn't
> properly localized after language change (because plugin::init() is
> called before)
>
> About config, Maybe it's time to move config into database?
>
What about autoloading it? E.g., on first hit:
// find all configs
foreach (glob('./roundcube/plugins/*/etc/config.php') as $file)) {
include $file;
}
Each file would be an ini or maybe an array or straight PHP code.
$RCMAIL->config->setNamespace('plugin_name'); // this needs to be added ;-)
$RCMAIL->config->set('foo', 'bar');
etc..
Internally...
$this->prop['plugins']['plugin_name']['foo'] = 'bar';
Then cache it for an hour to avoid re-doing it on each request (or for
a day) and so on.
Till
_______________________________________________
List info: http://lists.roundcube.net/dev/