[Pmwiki-users] Request for a callback once stdconfig.php has been included

Patrick R. Michaud pmichaud
Fri Feb 13 08:25:47 CST 2004


On Fri, Feb 13, 2004 at 02:44:46PM +0100, Christian Ridderstr?m wrote:
> In the beta version, if $PageHeaderFmt is set to a default value in 
> stdlayout.php, which is included *after* local.php is executed. 
> Furthermore, it is only set if it didn't exist before stdlayout.php is 
> included.
> [...]
> With the current structure that's not possible, so I would like to be able 
> to define a callback function that's invoked *after* stdconfig.php has 
> been included.

False!  If you want to do things after stdconfig.php, then just do the
following in local.php:

    <?php
      # stuff you want done before stdconfig

      include_once("scripts/stdconfig.php");

      # stuff you want done after stdconfig

    ?>

There's no reason to complicate the PmWiki code for this.  :-)

And if you really want your config file to be called "config.php", 
then just create the following local.php:

    <?php
      include_once("local/config.php");
    ?>

I'm willing to change the name of local.php to config.php for 0.6, but 
only if I get lots of comments in favor of it and few in disfavor.

Pm



More information about the pmwiki-users mailing list