[pmwiki-users] wikifarm question -- Farm:FieldName markup

John Rankin john.rankin at affinity.co.nz
Sun Aug 27 20:03:20 CDT 2006


First, thanks to Pm for adding a $LocalDir variable.

If we introduce a local customisation to add 
    Farm:Field1(/GroupA(/PageB)?)? markup 
is that likely to conflict with anything?

The intention is to streamline the process of adding new 
fields to a wikifarm, when all fields are part of the same 
url, such as www.mydomain.net/Field1/GroupA/PageB

a. a Site.WikiFarm page will list fields (using
   Farm:Field markup) and behave like ApprovedUrls and
   InterMap -- if the field is on the page, any field
   on the farm can use Farm:FieldName to refer to it

b. adding a new field consists of:
-- Site.WikiFarm has a one field form (password protected)
   Add field: [                ] ( OK )
-- adding a field adds a link to [[(Farm:)Field Name]] and
   a custom $LinkFunctions['Farm:'] renders it, in much the
   same way as $LinkFunctions['Attach:']
-- following the link from Site.WikiFarm takes you to the
   default page of the new field and creates Field.wiki.d
   and Field.local directories

c. Farm:Field/Group/Page behaves like Group/Page -- if
   Group/Page exists, you get a view link; if it doesn't,
   you get an edit link; if the field is undefined, you get
   the bare link text (perhaps with an 'add field' link)

d. the url includes a <prefix>FieldName, such as
   http://www.example.com/~FieldA/Group/Page
     (prefix='~')
   http://www.example.com/wikifarm/FieldA/index.php?n=Group.Page
     (prefix='wikifarm/')

As far as I can see, this should all be fairly straightforward.
The likely directory structure is:
wikifarm/
    index.php
    local/
        FieldA.local/
        ...
    FieldA.wiki.d/
    FieldA.uploads/
    ...
wiki/
    pmwiki.php
    ...

Comments and suggestions welcome.
-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list