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

Christian Ridderström chr
Fri Jul 16 08:55:11 CDT 2004


On Fri, 16 Jul 2004, Jonathan Scott Duff wrote:

> On Fri, Jul 16, 2004 at 11:48:39AM +0200, Christian Ridderstr??m wrote:
> > I'm helping John with his work on page drafts, and he's got some
> > difficulties in making the plugin do all that he wants. Basically I think
> > he needs to let the code modify some variables after stdconfig.php, or
> > possibly after other plugins, have done their job.
> 
> Doesn't that imply that he should just execute stdconfig.php and/or
> the other plugins as part of his plugin?

I'm not sure it's a good idea to let a plugin include 'stdconfig.php'.

John, could you perhaps expand a bit on your problem?

I've previously had the problem that what I really want to do is a
search-and-replace in a variable defined by stdconfig.php. The quick hack
is to define the variable myself (before stdconfig.php is invoked), and
set it accordingly. The drawback with this is that you may have to update
your plugin when stdconfig.php makes a tiny change to that variable. Not
to mention that I usually just want to change a small bit, and it's often
a variable with a long string.

/Christian

-- 
Christian Ridderstr?m                           http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list