|
Should there be a requirement for a field name to match the $GroupNamePattern? So $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.
On this page… (hide)
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. Q§How do we control creation of new fields? There will be a page in the home field called * 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 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. Q§What happens behind the scenes to create a field? Here is a straw man proposal for how this will work:
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/
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. 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:
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.
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 Q§How does a visitor know which field she is in? In the home field, the page name in the header displays as 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). Back to Upgrade Action Plan |
|