[Pmwiki-users] How best to develop a wiki farm

Donald Gordon donald
Thu Mar 18 22:09:09 CST 2004


On 17 Mar 2004 13:08:42 +1300 John Rankin <john.rankin at affinity.co.nz> wrote:

> On Wednesday, 17 March 2004 6:21 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> >(snip)
> >My thinking on this is that there may not be a lot of need for separate
> >field.a/ directories in pub/ and local/, and we probably don't want a
> >field's pub and local directories automatically created or owned by the
> >webserver process anyway.  Plus in this approach we don't have to keep 
> >global write permissions on the pmwiki/ directory to be able to 
> >create the field/ subdirectories.
> 
> The reason we initially didn't go this route (which is certainly a
> reasonable one) is that it makes it slightly tricky to remove a
> field at a later date. The other option we more recently thought 
> about is
> 
>(snip)
> 
> and so on. This removes the need for global write permissions
> on pmwiki/ and wikifarm.d/ gets created in the same way as
> wiki.d/ and uploads/.

But we'd still end up giving the web server write access to
wikifarm.d/field.a/pub/ and wikifarm.d/field.a/local/ (I think).

I personally like the idea of keeping all the data for a field in a
single directory, with subdirectories for wiki.d and uploads, as this
makes it easy to turn an existing Wiki into a field in the farm, or
convert a field into a standalone Wiki, should the need arise.  It also
makes removing or renaming fields easier.

However, there's the problem of having the webserver user own
wikifarm.d/field.a, and having pub/ and local/ inside it.  One option
for this (the easiest way, IMHO) is to simply say "handle per-field
customisations however you see fit" to users of WikiFarm: for the use
we're looking at, for example, it's quite probable that most or all of
the customisations for individual fields will be handled by
local/config.php or something it includes looking at key/value pairs in
the field definitions on Main.WikiFarm to determine which stylesheets to
use, and the stylesheets and templates would come from the main wiki's
pub directory.  This would allow users to customise individual farms via
a web interface.

> We are thinking of a Main.WikiFarm (and a $WikiFarm variable to set
> the page to use) that lists the available fields -- to create a new
> field, add it to the list and the local customisation takes over.
> 
> This also allows the fields' home pages to form a ring or trail,
> using the list on Main.WikiFarm to determine next and previous.
> Since there is only one farm trail, a [[$Farmtrail]] variable
> is probalby the way to go, I think -- this looks for Main.WikiFarm
> in the home field and builds a trail from it.

The current code always parses the page with the list of fields on it,
so producing a $FarmTrail variable wouldn't be too difficult.

donald



More information about the pmwiki-users mailing list