[pmwiki-users] Per-field cookbook/ directories? Cascading wikifarm pub/ directories?

Patrick R. Michaud pmichaud at pobox.com
Wed Jul 20 21:32:14 CDT 2005


On Wed, Jul 20, 2005 at 08:07:45PM -0500, Jeremy Sproat wrote:
> I had someone ask me via the wiki how a wikifarm could handle
> per-field cookbook/ directories.  I have no idea if or how this could
> be done.  Would it require changes to the PmWiki engine?

Others have already answered these questions, but here's my versions
of the answers for whatever they're worth:

To load something from the field's cookbook/ directory, use

    include_once("cookbook/recipe.php");

and to load something from the farm's cookbook directory, use

    include_once("$FarmD/cookbook/recipe.php");


> Another question he asked me regarded how the pub/ directory was
> handled - if the wiki could handle serving files from the farm's pub/
> if the field's pub/ didn't have them.  

PmWiki defines a $PubDirUrl variable that is the url of the field's
pub/ directory, and it defines a $FarmPubDirUrl directory that is
the url of the farm's pub/ directory.  

Skins are handled specially, by setting $Skin='someskin'; PmWiki
first looks for a skin in the field's pub/skins/ directory, if it
doesn't find it there it looks in the farm's pub/skins/ directory.
Either way it sets the value of $SkinDirUrl depending on where
it finds the skin.

> In other words, provide a
> farm-wide pub/ to start from, and users can customize it by adding
> files to the field's pub/ without having to copy they whole farm-level
> pub/ over first.

For skins this can be easily done, for other things in pub/ this
is a bit trickier.

Pm




More information about the pmwiki-users mailing list