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

Greg Morgan Cybie
Fri Feb 13 18:04:43 CST 2004


 
Honestly it's 6 of one, half a dozen of the other to me.
But as a compromise/transitional bit of code to allow local.php to be phased
out, could code be added loads config.php and only loads local.php if
config.php doesn't exist.  This way admins are encouraged to use one file
name or the other, but not both.  Would that be a benefit? Too complex?

Which brings up a question I've had floating around: what kind of a
performace hit does include_once entail?  If someone has a bunch of cookbook
add-ons installed, would that slow down performance noticably.

> -----Original Message-----
> From: Pmwiki-users-bounces at pmichaud.com 
> [mailto:Pmwiki-users-bounces at pmichaud.com] On Behalf Of 
> Patrick R. Michaud
> Sent: Friday, February 13, 2004 7:26 AM
> To: Christian Ridderstr?m
> Cc: pmwiki-users at pmichaud.com
> Subject: Re: [Pmwiki-users] Request for a callback once 
> stdconfig.php has beenincluded
> 
> 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