[Pmwiki-users] Re: Request for method to let plugins execute code after stdconfig.php

chr@home.se chr
Fri Jul 16 12:51:41 CDT 2004


On Fri, 16 Jul 2004, Patrick R. Michaud wrote:

> On Fri, Jul 16, 2004 at 05:19:14PM +0200, Christian Ridderstr?m wrote:
> > 
> > I guess that's true. Maybe we can look at it differently. In my problem I
> > wanted to make a minor modification to some variable that stdconfig.php
> > created. [...]  Defining this variable yourself isn't a 
> > good solution for various reasons, but is there some way which I could 
> > call stdconfig.php in order to get *only* the default value?
> 
> Unfortunately I haven't come up with a good way to do this without
> adding a *lot* of complexity into the configuration system.

Yeah.. I can see that. Hmm.. hang on... wouldn't it work if early in
pmwiki the code put all default values in an array?

	$DefValues['SomeVariable'] = '...';

and then when it's time to use 'SDV', it looks like this:

	SDV($SomeVariable,$DefValues['SomeVariable']);

A drawback with this is of course that you can't specify the default value
in the file where it fits in a more natural way. That might be a
dealbreaker here.

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list