DokuWiki plugins

Turbocharged


DokuWiki is a useful wiki system already, but you can take its functionality to a whole new level using some of the available plugins.

By Dmitri Popov

DokuWiki is an easy-to-use, open source wiki with an impressive feature set [1]. In this article, I will show you how to turbo-charge DokuWiki with a few useful plugins, including gCalendar, Task, DataBase, and Blog.

Of the two ways to install plugins in DokuWiki, the easiest is to use DokuWiki's plugin manager in the Administration section. First, log in to DokuWiki as administrator, click the Admin button at the bottom of the page, and click on the Manage Plugins link. Enter the link to a plugin package in the URL field and press the Download button to install the specified plugin. The plugin manager requires write access to DokuWiki's lib/plugins directory, so it might not work on your particular DokuWiki installation.

To install the plugins manually, simply download the plugin package in zip format, unzip it, and upload the resulting folder to DokuWiki's lib/plugins directory. DokuWiki's plugin manager can check to see whether the plugin has been installed properly; the plugin should appear on the list of installed plugins.

Manage Calendars with gCalendar

The gCalendar plugin [2] turns DokuWiki into a flexible calendaring tool. To make gCalendar work, you need to create at least two wiki pages: one for the calendar data and one for the calendar itself. It's also a good idea to put the wiki pages into a separate namespace (e.g., calendar) to keep things tidy, and you can restrict access to the namespace to make your calendar private. The page that contains your calendar data looks something like this:

==== Travel ====
  * 11.07.2007 Berlin
==== Vacations ====
  * 19.07.2007 - 21.07.2007 Paris
==== Birthdays ====
  * 12.02.2007 My birthday
==== Miscellaneous ====
  * 05.07.2007 - 09.07.2007 The Tall Ships' Races

The headers in the calendar data represent the categories specified in the style.css file, whereas the list items are used to specify calendar events. Both European (DD.MM.YYYY) and US (MM/DD/YYYY) date formats are supported, and you can define date ranges for the calendar events.

The second page acts as the calendar that pulls the data from the page with the calendar data (Figure 1) with just a single line of code:

<gcal pages=(:calendar:mycal)>

In this example, the calendar fetches data from the mycal page in the calendar namespace. The clever part is that gCalendar can pull calendar data from several pages and display them as one calendar. Moreover, the gcal command accepts a wide range of options, which allows you to display the calendar in many different ways. For example, the following code displays a monthly calendar containing calendaring data from all the pages in the calendar namespace:

<gcal pages=(:calendar:*) mode=ahmet_month>

By modifying the style.css file, you can customize virtually any aspect of the calendar. For example, to add the "Vacations" category, open the style.css file in a text editor, scroll to the bottom, add the code,

.gCal_cat_VACATIONS{
       color: Gray;
       font-weight: bold;
       background-image: url(images/vacations.png);
}

then upload the vacations.png image to lib/plugins/gcalendar/images and you are done.

Although gCalendar doesn't support more advanced features, such as notifications and recurring events, it can come in rather handy when you need a simple, effective calendaring tool for your DokuWiki users.

Figure 1: gCalendar adds a flexible multi-user calendar to DokuWiki.

Track To-Dos with Task

Not only can you use DokuWiki as a calendar, but you can use it as a task manager courtesy of the Task plugin [3]. Task relies on two other plugins: Feed [4] and Pagelist [5]. Use of the Task plugin is rather straightforward: Create a new page and add the following code to it:

{{tasks>tasks?all}}

This adds a simple task manager to the page that displays all the tasks in the namespace. The New Task form lets you add tasks to the task list easily (Figure 2). When you add a new task, the plugin creates a separate page for it in the specified namespace and conveniently inserts a template task in it. However, you can embed a task into any DokuWiki page as long as the page itself is in the specified namespace.

Figure 2: The Task plugin turns DokuWiki into a useful task manager.

To add a task, place the ~~TASK~~ command somewhere in the page, and use the H1 header to specify the task's summary. The ~~TASK~~ tag accepts several parameters, such as user name, due date, and priority. Here is an example of a task assigned to Dmitri Popov, due June 3, 2007, with a high priority:

== Buy milk ==
~~TASK:DmitriPopov?2007-07-03!!~~

Once the task is assigned to a user, the user can change its status (e.g., accepted, started, done), which helps to track tasks more efficiently. The Task plugin page provides an overview of other parameters you can use.

DataBase

As the name suggests, the DataBase plugin [6] adds some database functionality to DokuWiki by turning a wiki page into a simple database table. Unlike other DokuWiki plugins, installing DataBase is a three-step process.

First, download the latest version of the plugin and unzip it. The resulting folder contains two directories: data and lib. Then, copy the database folder in /data/pages to the /data/pages directory and copy the database folder in /lib/plugins to the /lib/plugins directory of your DokuWiki installation.

Next, go to your DokuWiki, press the Index button, and navigate to the database namespace that should contain the Create Table link. to create a new database table, click on the link, give your database a name, and press the Create New Table button. The Create Column page allows you to add fields to the table.

The DataBase plugin supports several basic field types, including string (text), date, and number. Also, you can specify whether the field value should be unique and mandatory.

To add as many fields as you need at any time, use the Create New Column button (within Admin table structure). To populate your database with data, use the Create New Record button. The Radio buttons next to the field labels allow you to sort the records quickly (Figure 3), and you can search for a specific record by typing the search string into the appropriate field and pressing the Search icon.

Figure 3: With DataBase, you can embed a simple database into DokuWiki.

Blogging with DokuWiki

If you like DokuWiki for its convenience but you prefer to manage the published content as a blog, you might want to try the Blog plugin [7]. When installing Blog, make sure you also download and install other required plugins. To turn a page into a blog, simply add the following code to the page:

{{blog>[blog]?[5]&[firstseconly]}}

This code will display the five most recent pages from the blog namespace, showing only the first section of each page and adding a New blog entry form to the page (Figure 4). The latter allows you to create a new page (a blog entry) quickly. More information about the Blog plugin is available on its official page.

Figure 4: Manage your wiki as a blog with the Blog plugin.

Presentations

If you use the S5 slideshow system for your presentations, you will find the S5 plugin [8] particularly useful. This plugin lets you turn a DokuWiki page into an S5-based presentation, and you can create a presentation with the familiar wiki markup instead of hand coding each and every slide (Figure 5).

Figure 5: With the S5 plugin, you can turn any DokuWiki page into a presentation.

To turn your wiki page into an S5 presentation, simply insert the ~~SLIDESHOW~~ command into the page. Use the H1 header to mark the initial slide and H2 headers for all additional slides. To run the presentation, click on the Slideshow icon in the upper-right corner of the page.

The plugin also supports different themes, and you can choose the theme you like in the Configuration section (press the Admin button and click on the Configuration Settings link).

Other Useful Plugins

The plugins covered here are only a few that can significantly extend DokuWiki's functionality. The official plugin page [9] contains additional nifty tools, including:

INFO
[1] DokuWiki: http://wiki.splitbrain.org/wiki:dokuwiki
[2] gCalendar plugin: http://www.ceng.metu.edu.tr/~ahmet/Wiki/software/dokuwiki/gcalendar/home
[3] Task plugin: http://wiki.splitbrain.org/plugin:task
[4] Feed plugin: http://wiki.splitbrain.org/plugin:feed
[5] Pagelist plugin: http://wiki.splitbrain.org/plugin:pagelist
[6] Database plugin: http://wiki.splitbrain.org/plugin:database
[7] Blog plugin: http://wiki.splitbrain.org/plugin:blog
[8] S5 plugin: http://wiki.splitbrain.org/plugin:s5
[9] DokuWiki plugins: http://wiki.splitbrain.org/wiki%3Aplugins
[10] Google Maps plugin: http://wiki.splitbrain.org/plugin:google_maps
[11] YouTube plugin: http://wiki.symplus.co.jp/computer/en/youtube_plugin
[12] del.icio.us plugin http://wiki.splitbrain.org/plugin:delicious
[13] Note plugin: http://wiki.splitbrain.org/plugin:note
[14] Keyboard plugin: http://wiki.foosel.net/snippets/dokuwiki/keyboard
[15] Highlight plugin: http://www.staddle.net/dokuwiki/plugins/highlight
THE AUTHOR

Dmitri Popov holds a degree in Russian language and computer linguistics. He has been working as a technical translator and freelancer contributor for several years. He has published over 500 articles in Danish, British, US, and Russian magazines and websites.