Last week, I described why and how to set up your own wiki with Dokuwiki,
a simple open source wiki package that works without any relational
database. Now, as promised, I’ll dig further into DokuWiki, offering some extra tips and an introduction to a few of DokuWiki’s most useful plugins.

First, let’s take a look at how to handle the main DokuWiki management tasks from the
Administration interface (Figure A):

Figure A

The DokuWiki Administration interface.

User management and Access Control Lists

You should configure, according to your actual
needs, the access controls of your wiki — that is, who can do what and
where. Collaborative publishing is one of the main reasons to use this
kind of software, but you don’t want trolls and spammers messing up your
pages or creating their own pages.

If wiki contributors join only by invitation, block online
registration for web visitors. Go to the Configuration Settings page,
scroll down until you reach the section titled Disable DokuWiki
actions (Figure B), check Register, and click Save.

Figure B

Disable DokuWiki actions.

This will stop both spambots and real, but unknown visitors from getting
an account. However, you’ll still be able to add as many users you want with the Add user form (Figure C).

Figure C

The Add user form.

The next step, which may be completely unnecessary for some wikis, is to
set up groups for current and future users. By default, DokuWiki
creates the @user group for actual users who can upload content and the
@ALL group for visitors who can only read it. If that’s not flexible
enough, you can (and should) create extra groups. This will make your
life much easier if, for example, you want to let only certain users add
pages or read only certain sections of the wiki.

DokuWiki has five levels of access control or permissions: None, Read,
Edit, Create, Upload, and Delete. I say levels here, because that’s what
they actually are. You cannot activate more than one of them at the same
time for each page or namespace. Each choice includes all the others
before it in the list above: Edit includes Read, Create includes Edit,  and so on.

The ACL Management page of DokuWiki (Figure D) has a sidebar that lists all of the existing pages and namespaces. You can select any of
them, and then set as you wish the corresponding access rights for any
user or group of users.

Figure D

The ACL Management page of DokuWiki.

Namespaces in DokuWiki

The term “namespaces” in DokuWiki may confuse novice administrators,  because its purpose is not immediately evident. According to the documentation, “a namespace is similar to a directory or folder, while pagenames are similar to files.”

In practice, you should think of namespaces as boxes that partition your
content in several categories. This is useful both conceptually and if
you need different access controls for each “box,” since you can apply
ACL rules to whole namespaces. The namespace to which each page belongs
is the part of its name before the colon. In a wiki devoted to
backpacking, for example, Gear:Backpacks would indicate the page describing backpacks in the “Gear” category, and TripReports:Tuscany would be the right name for the listing of all trekkings in Tuscany that are placed in the “Trip Reports” section.

The namespace approach applies also to non-textual content, like images
and generic attachments. The only caveat here is that the upper limit
for the maximum file size (6 MB in my installation) may not depend on
DokuWiki but on the general PHP configuration of your Web server. Check
those settings with your web administrator if you have problems uploading big files.

Plugins

DokuWiki has many plugins that extend its functionality. Installing a plugin is as simple as downloading its compressed archive in the lib/plugins
subfolder of your installation, unpacking it, and then settings all its
parameters from the Manage Plugin page. A serious presentation
of DokuWiki plugins would require another full post, so I’ll just
recommend the Discussion Plugin and the CAPTCHA plugin for wikis where frequent reader feedback is necessary.

Help with configuration difficulties

Here’s my final DokuWiki tip: if, for whatever reason, you were unable
to set up permissions as I explained in my previous post, you may also
be unable to change and save Configuration Settings from the web
interface. This is due, almost surely, to the fact that the Web server software can only read your DokuWiki files, not change
them. If you can’t change that (it may happen with some web hosting
accounts), you’ll have to edit the configuration files manually. To
prevent visitors from registering from the web site, for example, you
would have to add this line:

r‰ßv+nWšrبž

to the local.php file in the conf subfolder of your DokuWiki installation.