Saving wiki pages as drafts
The previous version of PmWiki had rudimentary support for this but it's been improved in the current production version.
If I implement this feature, it would change the editor such that the original Save button becomes Publish, the Save and Edit button becomes Save Draft and Edit and a new Save Draft button is added.
If I access a page called Main.Test and load it into the editor, make some changes and then Save Draft, it would actually save that page as Main.Test-Draft. The original page is still there and visitors who accessed Main.Test just to read would still see the original without my changes. Once I load it back into the editor and Publish, then the modified page replaces the original and Main.Test-Draft is deleted.
The obvious advantage to this is that if you have a complex change to make, you wouldn't have to do it all in one session. You can do part of it, save it as a draft and come back to it the next day or the next week.
The disadvantage is that if someone else came along and wanted to make a change to that page, when she clicks on the edit link she gets Main.Test-Draft. What's loaded into the editor is the most recent draft and not the original page. People who weren't completely up to date on PmWiki's features would doubtless be quite confused to find material in the editor that hadn't been in evidence when they were reading. It can be even more confusing since that second user would be unsure of whether to publish when she had finished her edit. And that's not to mention the possibility that her revisions might conflict with the first user's or even mess them up entirely.
It's easy to see why it works this way. The alternative would create the possibility of several different draft versions of the page which could create even more confusion. But given the way this works, I'd be inclined to approach it carefully. I think it would be quite useful for a site with a registration system and a small number of editors who were in constant communication with each other. But Flu Wiki is open to the public at large. For the moment I haven't even enabled the feature.
I should add that along with this feature there's another level of password protection enabled. I can put a password on the Publication of all pages in the wiki, all pages in a category or individual pages. But that doesn't really solve the complications I can see. Authors might still get confused and frustrated which is the last thing we want.
Can anybody see a flaw in my reasoning?
Page text variables
The simplest way to explain this feature is probably to give a couple of examples where it might be useful.
- Let's say there's a word or phrase that repeats a number of times in a page and that might change in the future. If you assign that word or phrase — that text — to a variable at the top of the page (in a variable declaration that wouldn't appear in normal viewing mode) and then use the variable throughout the document, the software would substitute the current value of the variable when displaying the text to a reader. If the text did change at some point, simply change the assignment at the top of the page and the change would be reflected throughout.
- If you wanted to get a list of the pages in a category in a sequence other than the order determined by the names or titles of the pages, you could use a page text variable as a kind of index key. Use the same variable in all the pages but assign it a different value in each page — a value that would force the pages to sort the way you want them to.
For example, in another installation I'm experimenting with I want to get a list of pages sorted according to the name of the person who's most prominently discussed in the page's text. So I've used a variable called Key and on the page about John Smith I'm assigning "Smith, John" to Key because I want the pages to sort by surname and then given name. On the page where I have my pagelist directive (which is how you get a list of pages in the first place) I add "order=Key" to the directive and I get the list in the order I want.
Clear as mud?
I've glossed over the specific syntax involved in declaring variables and invoking them but if anyone is excited enough by the possibilities to want to know more, you know where to find me.
Implementing tags in PmWiki
This capability was added with the last major revision of the software. I'm just getting around to suggesting it now though I've implemented it on another project that also uses PmWiki. If you want to see the documentation on this you can look under Categories. But it makes more sense to me to implement this as tags and since it only requires adding one line to the site's configuration file to change the terminology, why not? (If you have a reason why not, you're welcome to explain in comments.)
A tag is created with the following markup: [[!tag]]
That creates a link that looks like any other on the wiki. As an example of how tags might be applied, consider the pages in the Consequences group that contain recipes. Obviously we could add a [[!recipes]] tag to each. There are at least two of those pages that are specifically about breakfasts. So we could also add a [[!breakfast]] tag to those. If we were going to implement this, I would suggest adding a horizontal rule at the bottom of the page text followed by a line listing the tags, like so:
Tags: [[!recipes]], [[!breakfast]]
And with the help of one additional change to the configuration, the first time someone clicked on one of those tags, she would be taken to a page in the Tags group that's automatically created and lists all of the pages containing that tag.
That's all there is to it. What do you think?