[pmwiki-users] Farms: per-wiki config

Peter & Melodye Bowers pbowers at pobox.com
Sun May 11 04:14:40 CDT 2008


> Is it possible for skins and other per-wiki configs to be managed (ie 
> changed) by each wiki's individual admin via a passworded web interface?

It's still more a proof-of-concept and needs more thought/design and lots
more testing, but check out this new recipe:

http://www.pmwiki.org/wiki/Cookbook/PageConfig

As a markup-based method of solving the problem listed above.

Instead of having an administrator use FTP or command line to edit
config.php to place this:

===(snip)===
include_once('cookbook/foo.php');
if ($pagename == 'MyGroup.Xyz') {
   include_once('cookbook/bar.php');
   $Bar_Var = 23;
}
===(snip)===

An author/administrator with edit privileges to SiteAdmin.PageConfig can now
place this markup on that page to do the same thing:

===(snip)===
include(foo.php)
(:if name 'MyGroup.Xyz':)
   include(bar.php)
   set(Bar_Var, 23)
(:ifend:)
===(snip)===

-Peter

FUTURE THOUGHTS -- INPUT WELCOMED...

Eventually I will include a security configuration variable like 

	$PCValidIncludes = array('foo.php', 'bar.php')

As a way to limit what PHP scripts can be included.  (Or maybe use a
"PageCookbook" directory as an alternate to the standard "Cookbook"
directory with links back to Cookbook?)

Maybe something similar for variables:

	$PCValidGlobals = array('foo' => '/[0-9]*/', 'bar' =>
'/"(?:abc|def)"/')




More information about the pmwiki-users mailing list