Recent Changes · Search:
 

Should there be a requirement for a field name to match the $GroupNamePattern? So AField is allowed but another isn’t. This would be more consistent with how the rest of PmWiki works. So by default,

   $FieldNamePattern = $GroupNamePattern;

but an administrator could over-ride this as a local customisation.

The farm will use Inter Map references to refer to pages in another field. This (as always) raises questions. With suggested answers… {;-) The following diagram illustrates the farm concept.

Q§What is the way to refer from a field back to the home location?

Define a new Inter Map reference called ThisFarm: (cf ThisWiki: ThisGroup: ThisPage:) Thus:

   Group/Page is in the current field
   Field/Group/Page (create field Field) is in Field
   `This Farm/Group/Page (create field ThisFarm) is in the ‘home’ field

We need to decide whether Field: and ThisFarm: require a “/” following, ie Field/Group (create field Field) or Field:Group. We could also use the existing ThisSite: reference instead of introducing a new one. {*} Decision needed.

Top

Q§How do we control creation of new fields?

There will be a page in the home field called Main.WikiFarm that lists the fields available on the farm. The administrator will be able to choose the page name to use with a $WikiFarm variable. This is the approach used to run Wiki Trails (the code for traversing a page and extracting a list of links can be used as a starting point; see scripts/trails.php). Entries will be of the form:

   * Field1/Main/HomePage the tertiary education strategy
   * Field2/Main/HomePage the education sector architectural 
           framework
   * Field3/Main/`Home Page Le Roi n’est pas un subjet
   * Field4:/Group/EntryPoint

This defines the list of Inter Map entries to generate. The farm manager may choose to place an edit password on the page, to prevent people from adding new fields. Or it may be left open. Clicking on one of these links takes you to the field’s specified page.

A new directive [[$Farmtrail]], if placed on one of the field home pages, will display next and previous field links.

Top

Q§How does one create a new field?

The same way one refers to any other page. That is, the author writes:

   Field/Group/Page (create field Field)

A valid entry is $Group Name Pattern$Group Name Pattern/$Page Title Pattern — we require a fully qualified page for it to work. In the first instance, we can treat this as a standard Inter Map reference — if the page doesn’t exist, a visitor will arrive at a page showing the $DefaultText. In a future release, we may get smarter. If the page exists, it displays as a link; otherwise it displays the PmWiki ‘?’. Clicking the ? takes you to the edit page view.

A new field only gets created when it’s accessed, not when it’s referenced.

Maybe later we will add support for Field/Group (create field Field) — there are a few issues to sort out to get this right.

Top

Q§What happens behind the scenes to create a field?

Here is a straw man proposal for how this will work:

  • we generate a list of allowed fields from the Main.WikiFarm page

  • we put all the field data inside a wikifarm/ directory (there may be a better way)

  • when PmWiki runs, we check to see if wikifarm/ exists and if not we attempt to create it (assuming we have enough rights) — this only happens once

  • when PmWiki accesses an address like

   http://wiki.cyg.net.nz/MyField/Main/HomePage

it sets a $Field variable, and sets $WikiDir to wikifarm/$Field.wiki.d and $UploadDirFmt to wikifarm/$Field.uploads — then PmWiki does the rest

It’s not clear what it does about uploads/
Option 1
it uses the value in local/wikifarm/$Field.config.php and if this doesn’t exist, $EnableUploads is null, so uploads are disabled

Option 2
it uses the value of $EnableUploads in local/config.php, if set

Option 3
it uses the value of $EnableUploads in local/config.php, if set, and this can be overriden by a value set in local/wikifarm/$Field.config.php

I think I prefer option 1, ie make people explicitly enable uploads on a per field basis. OTOH, option 3 is perhaps more consistent with how PmWiki works. {*} Decision needed.

Since the web process creates and owns wikifarm/ it should be allowed to create sub-directories, so this approach should work …

Thus once the wikifarm script has created the wikifarm/ directory (only happens once), PmWiki should be able to carry on as normal.

Top

Q§How do we deal with naming ambiguities?

For example, how do we tell whether

    http://wiki.hero.co.nz/Fred

is an instruction to go to the home page of the Fred group in the default field, or an instruction to go to the default page of the Fred field? There is a similar ambiguity with:

    http://wiki.hero.co.nz/Fred/Dagg

Requiring authors to write full page names means this will only happen if somebody types the address into the browser address bar.

What we do depends on whether a field called Fred is on the Main.WikiFarm list. If it is, assume this is a reference to the field; if it isn’t, assume it’s an instruction to go to the home page of the Fred group in the default field. This will be easier to understand if you to make sure you don’t have any group/field name conflicts, and having them would probably produce too much confusion anyway.

Thus:

  • Fred is a field if it’s on the list, so go to its $DefaultPage; otherwise (it’s not on the list) it’s a home field Group and go to Group.$DefaultTitle

  • Fred/Dagg … to be consistent, Fred is a field if it’s on the list, so it’s a reference to $DefaultTitle in the Dagg group of Fred field; otherwise (it’s not on the list) it’s a reference to Fred/Dagg in the home field

  • Fred/Dagg/Poetry is a reference to Dagg/Poetry in field Fred; if Fred doesn’t exist, create it if it’s on the list, otherwise it’s an invalid URL

So an author can’t create a field by acccident; you have to spell out a full name that is unambiguously a reference to a page in a new field, and the field must be on the Main.WikiFarm list.

Will people find this confusing? For example:

In the home field, I write Fred/Dagg (create field Fred) and think I have made an Inter Map reference to the $DefaultTitle page of the Dagg group in the Fred field. But wikifarm.php discovers that field Fred doesn’t exist, so may assume I meant Fred/Dagg in the home field.

The Main.WikiFarm page resolves this. If Fred: is an entry, then this appears as a reference to a non-existent page. If clicked, this will cause creation of the Fred field.

If Fred: is not an entry, there is no Inter Map entry for Fred: and the text will simply display as typed.

And initially, we won’t support Fred/Dagg (create field Fred) — but if we add it later, it will work.

Top

Q§What is the exact Field: markup syntax?

Depending on the syntax we choose, the author might have written Fred/Dagg (create field Fred) or Fred:Dagg. We might prefer to require a “/” to make it less likely for the pattern to occur by accident in normal markup text, eg

   :A Word:Followed by its definition.

I’m pretty sure that it’s ThisWiki:/Group/Page not ThisWiki:Group/Page and we should be consistent (whichever way it is…). {*} Decision needed.

Top

Q§How does a visitor know which field she is in?

In the home field, the page name in the header displays as Group Title, as before. In another field, the page name displays Field: Group Title, where Field is a link to the home page of the current field. The logo continues to point to the main site home page, as before.

Local configuration settings are held in a local/wikifarm/ directory (structure still to be finalised) and apply to the field ($Field.config.php), group ($Field.$Group.php) or page ($Field.$Group.$Title.php).

Top

Back to Upgrade Action Plan

All Recent Changes

Edit SideBar

Note style of sidebar (eg right justify) overrides formatting such as bullets and small specifed here, this could be considered buggy

ShareAlike Licence

Edit · History · Print · Recent Changes · Search · Links
Page last modified on 01 November 2006, at 04:07 PM