Monthly Archives: March 2003

Weblogs and Wikis – Blurring the Boundaries

Early this morning Rael‘s Blosxom plugin ‘wikiwordish‘ found its way to the plugin registry. And a very nice plugin it is too. It allows you to use ‘wikiwordish’ notation like [[this]] to point to other weblog entries; the plugin intercepts them and creates a suitable hyperlink to the right place. For example, I can refer to an older entry about the Tiki parser for MoinMoin by just typing the name of the entry (‘tikiparser’) inside double square brackets; in other words, [[tikiparser]] in my weblog item source gets turned into this: [[tikiparser]].

I decided to expand on this lovely idea, by adding some more functionality to the plugin. With my expanded version of ‘wikiwordish’ (diff here) it is now possible to have InterWiki style links automatically recognised and expanded too. (I also made a modification to the regex in story(), as it wasn’t behaving quite right). So I can refer to the, say, StartingPoints page of the MeatBall Wiki by using a link in my weblog entry like this: [[MeatBall:StartingPoints]], which would be turned into a link like this: [[MeatBall:StartingPoints]].

The way it works is simple: you tell the plugin where to find an InterWiki ‘intermap’ file, which contains a list of InterWiki names and URLs. You can probably find this somewhere in your wiki installation. You can also add your own name/URL combinations in the configuration in case you’re not allowed to edit the intermap file; in my setup I’ve added the name ‘PipeSpace’ to refer to my MoinMoin-powered space Wiki (see the ‘Configurable Variables section’ in the code), so I can now create a link such as this: [[PipeSpace:AllConsumingRestIdeas]] which is turned into this: [[PipeSpace:AllConsumingRestIdeas]]. If you don’t want an icon to appear next to the link, you can turn that off in the configuration.

What’s more, some standard InterWiki links are not to wikis, but to other popular sites; for example [[IMDB:0088846 Brazil]] gives [[IMDB:0088846 Brazil]], and [[Dictionary:alliteration]] gives [[Dictionary:alliteration]].

Fun! Here’s to more weblog/wiki fusion.

New Blosxom plugin ‘submission’

I’ve just written a plugin ‘submission‘ which provides Blosxom with a mechanism for accepting content POSTed to it. I wrote it initially as a mechanism for people to submit plugin information to the plugin registry, but made it a bit more generic.

The idea is that you can have Blosxom accept submitted entries and treat them as ‘pending’, using a ‘.txt-‘ file extension, so they’re not immediately viewable in the weblog output. You can then review the entries and publish them by changing the extension to ‘.txt’ (or not, as the case may be).

The mechanism will kick in in one of two modes:

Accepting POSTed HTML form content
Form data is received, formatted by a chosen ‘formatter’ (specify via the ‘-format’ parameter in the form, or allow to fall back to to the default formatter built into the plugin itself), and written as a pending entry in Blosxom’s datadir path. A display of the currently pending entries is then displayed.

Listing pending entries
You can also get to the list of currently pending entries by suffixing the query string ‘?pending’ onto the end of the weblog’s URL.

The plugin uses a special ‘pending’ flavour so you can have the pending entries displayed differently to the regular entries.

There’s also a separate directory where you can add your own formatters; this is the ‘formatlib’ that should be created in the plugin directory itself. I’ve written a simple formatter that lives in this directory, called ‘plugin‘ that accepts a plugin submission (name, category, URL, description, author) and formats it into an entry (body) style similar to those shown in the registry at the moment.

It’s a basic bit of code, works for me. I’ve already got a few mods in mind, such as, perhaps, accepting payloads in other formats such as an RSS item (it could then be parsed and appropriately formatted by an RSS-item-aware formatter). That’s for later, though.