[pmwiki-users] wikifarm question: autoconfigure a new wiki

Patrick R. Michaud pmichaud at pobox.com
Fri Aug 25 17:14:25 CDT 2006

On Fri, Aug 25, 2006 at 11:55:55PM +0200, Jean-Fabrice [gmail] wrote:
> 2006/8/25, Patrick R. Michaud <pmichaud at pobox.com>:
> >Now available in 2.1.15 (just released).
> I have a setup quite similar to JR one's.
> a central wiki : /soft/pmwiki
> some wikifields : /soft/wikifarms/field1, /soft/wikifarms/field2
> Each fields has it's own local/config.php (for $ScriptUrl,
> $CookiePrefix, etc. definition), local/.htpassword and the same
> local/pergroup customization files (which are very simple since they
> only include the central wiki pergroup customization file)
> I would have like to take advantages of 2.1.15 $LocalDir to use the
> central pergroup/perpage customisation file (withou having to creat
> one in each fields) but I don't see how I can have different
> config.php for each fields this way.

Easy...near the end of farmconfig.php:

    ## use the wikifield's local/config.php

    ## change $LocalDir for the per-group/per-page customizations
    ## (they will appear in /soft/pmwiki/local/Group.PageName.php)
    $LocalDir = '/soft/pmwiki/local';

In fact, it's even possible to get PmWiki to load per-group
and per-page customizations from multiple directories:

    ## use the wikifield's local/config.php

    $pagename = ResolvePageName($pagename);

    ## load the wikifield's per-page customizations
    $LocalDir = 'local';

    ## load shared per-page customizations for the entire farm
    $LocalDir = '/soft/pmwiki/local';

(Note the use of "include" here instead of "include_once".)


More information about the pmwiki-users mailing list