
|
[dokuwiki]
||
[Date Prev]
[02-2006 Date Index]
[Date Next]
||
[Thread Prev]
[02-2006 Thread Index]
[Thread Next]
[dokuwiki] Re: Plugin Config
- From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Fri, 3 Feb 2006 13:07:22 +0100
On Thu, 02 Feb 2006 18:49:25 +0000
Chris Smith <chris@xxxxxxxxxxxxx> wrote:
> Esther Brunner wrote:
> > Hi Andi and Chris
> >
> > I've got a patch ready for a consistent method for accessing plugin
> > config variables in plugins. It uses $plugin->conf and does
> > therefore not interfere with DokuWiki's global $conf. In analogy to
> > the way language strings are retrieved in plugins, you access the
> > config settings with a function $this->getConf($id).
> >
> > All plugins can have these files which will be handled automatically
> >
> > by the parent class:
> > lib/plugins/<plugin>/conf/default.php // default settings
> > lib/plugins/<plugin>/conf/local.php // optional file for
> > local settings
> > lib/plugins/<plugin>/conf/metadata.php // for the config manager
> > plugin
> >
> > I've not yet figured out a good way for how to use it in the config
> > manager plugin. The config manager no longer has to save plugin
> > settings in DokuWiki's local.php. In the meantime I commented out
> > all calls for plugin handling in the config manager.
> >
> > Cheers
> >
> > -- esther
> >
> Could we do this but with a slight modification, predicated on it not
> being a bad idea to keep plugin settings in local.php. If it is a bad
> idea ignore me.
No I think it's a good idea.
> plugin settings are stored in local.php as $conf[<plugin>][<setting>]
> = <value>;
hmm problem with this is, that we have some non plugin configs in this
format. Eg. for the proxy or target settings. Should we live with it or
use something like
$conf['plugin'][<plugin>][<setting>] = <value>;
?
> getConfig, merges settings read from
> lib/plugins/<plugin>/conf/default.php with settings acquired from
> $conf[<plugin>].
>
> This would cut down on potential file access and keep all the local
> settings in one place.
> It would mean removing a plugin doesn't remove its installation
> settings - which could be a bad thing, but would remember settings if
> an upgrade occurred as a delete/add (I need to check how plugin
> manager handles updates).
>
> Just an idea. Should we move this discussion to the mailing list?
Yes definitively. I just changed the TO: address. Esther I set you on CC
to make sure you are aware of this. Please answer to the list.
Andi
|

|