[Pmwiki-users] Re: Re: Part II: Notes while setting up the beta site

Christian Ridderström chr
Tue Feb 17 06:39:10 CST 2004


On Mon, 16 Feb 2004, Patrick R. Michaud wrote:

> Great idea.  How about a "debug-layout.php" script to make these settings?  
> Could go in the cookbook.  :-)
> 
> One could also do it as a page customization, i.e., create
> local/Main.DebugLayout.php that makes these settings.  This would
> make it easy to switch between debug mode and actual text--simply
> go to the DebugLayout page for the debg mode.  I'm about to do this 
> at http://www.pmichaud.com/wiki/Main/DebugLayout.

I also did it for a page here:

   http://wiki.lyx.org/beta/pmwiki.php/SiteTest/DebugLayoutWithSidebar

and here

   http://wiki.lyx.org/beta/pmwiki.php/SiteTest/DebugLayoutWithoutSidebar

While doing it I (again) realized a need for a way to insert a hook that's 
executed at the end of the configuration phase. The problem here was that 
the page-specific code was run during stdconfig.php and their changes was 
overwritten by code that was executed later in config.php. Sigh... that's 
probably difficult to understand, so here's a diagram:

	config.php
		stdconfig.php
			SiteTest.DebugLayoutWithSidebar.php
			    :Doing some page-specific stuff.
	config.php
	    :Accidentally overwriting things from DebugLayout...

The solution I ended up using was setting a variable in 
SiteTest.DebugLayoutWithSidebar.php and doing different things at the end 
of config.php depending on the value of that variable.

This was a bit complicated, so I'm going to try and implement an array 
where you can add 'hook:s'.

/Christian

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





More information about the pmwiki-users mailing list