[dokuwiki] Re: 2 Questions
- From: Gerry Weißbach <gerry.w@xxxxxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 21 Oct 2006 23:25:55 +0200
Chris Smith wrote:
Gerry Weißbach wrote:
Hello everybody,
I've got a question about the configuration of a plugin. I'd like to
create a plugin that can itself change/create some configuration items.
I thought about a solution using the config plugin to save this data.
I could recreate the conf/*.php files, but that is not the option I'd
prefer. Is there something else I did not find, that can be done?
Plugin and template can have their own configuration settings. If set
up correctly, the config plugin will automatically generate
appropriate fields for them on the settings page. The plugin:tutorial
has information on doing this. You'll find several plugins and
templates which implement it, e.g. blog (new version),
loginredirector, googlemaps, folded & linebreak + sidebar template.
Well, I know that. The problem is that my changes are required prior to
most other operations. So they have to take place during or instantly
after loading the configuration out of dokuwiki and local.php. Thats why
I looked for a way to e.g use the config plugin (trigger some kind of
'save now') in order to change the local.php without needing the
local.protected.php (this goes with both, first and 2nd question).
If there is no way, I'll have to invent one ...
Second Question: my tplSwitcher Plugin creates some data within the
local.protected.php if possible. If not it uses the local.php. If
then, after writing this data, the config plugin recreates the
local.php it does not reqrite it completely, but leaves some of my
data (the problem is, that it does not leave all the data). Does
anyone know what that is about and what could be done?
The config plugin will create a local.php with all non-default $conf
array values. If you attempt to set another variable, it'll be lost
next time the config plugin changes the wiki settings. If you need to
set values, either use a file over which the plugin has complete
control (locate it in the wiki's data section if necessary) or use the
plugins configuration settings (as per above).
thanks in advance ...
Gerry
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: 2 Questions
- From: Chris Smith
- References:
- [dokuwiki] darcs changes 2006-10-21
- From: Andreas Gohr
- [dokuwiki] 2 Questions
- From: Gerry Weißbach
- [dokuwiki] Re: 2 Questions
- From: Chris Smith
Other related posts:
- » [dokuwiki] 2 Questions
- » [dokuwiki] Re: 2 Questions
- » [dokuwiki] Re: 2 Questions
- » [dokuwiki] Re: 2 Questions
- » [dokuwiki] Re: 2 Questions
Plugin and template can have their own configuration settings. If set up correctly, the config plugin will automatically generate appropriate fields for them on the settings page. The plugin:tutorial has information on doing this. You'll find several plugins and templates which implement it, e.g. blog (new version), loginredirector, googlemaps, folded & linebreak + sidebar template.Hello everybody,
I've got a question about the configuration of a plugin. I'd like to create a plugin that can itself change/create some configuration items.
I thought about a solution using the config plugin to save this data. I could recreate the conf/*.php files, but that is not the option I'd prefer. Is there something else I did not find, that can be done?
The config plugin will create a local.php with all non-default $conf array values. If you attempt to set another variable, it'll be lost next time the config plugin changes the wiki settings. If you need to set values, either use a file over which the plugin has complete control (locate it in the wiki's data section if necessary) or use the plugins configuration settings (as per above).
Second Question: my tplSwitcher Plugin creates some data within the local.protected.php if possible. If not it uses the local.php. If then, after writing this data, the config plugin recreates the local.php it does not reqrite it completely, but leaves some of my data (the problem is, that it does not leave all the data). Does anyone know what that is about and what could be done?
thanks in advance ...
Gerry
- [dokuwiki] Re: 2 Questions
- From: Chris Smith
- [dokuwiki] darcs changes 2006-10-21
- From: Andreas Gohr
- [dokuwiki] 2 Questions
- From: Gerry Weißbach
- [dokuwiki] Re: 2 Questions
- From: Chris Smith