Dokuwiki

This page is manly for the maintainer of this wiki, but can overall contain some useful informations.

Miscellaneous

Purging

To purge the cache version of a page, add &purge=true to the URL.

Excluded directory presentation

Excluded directories from a Dokuwiki arborescence (as q37.info/download) are represented as missing pages. To fix these, simply create a (even empty, because this page will never be displayed) <missing directory>.txt page in the data/page/<subdirectories>/ directory of the Dokuwiki installation (for example blog.txt, for the q37.info/blog/ page). Unfortunately, this works only for the directory page itself, not for the subdirectories/subpages.

Macros

Some rules I follow about writing content for this Wiki, and which give indications on some DokuWiki behaviors :

  • Write a link to a sub-page this manner : [[.:<sub-page_name>:]]
  • when following this link, the URL is <parent_page>/<sub-page_name>/home :
    • when this page doesn't contain a link to a sub-page, create the page without the ending /home,
    • when this page contains a link to a sub-page, keep the ending /home,
  • when referring externally to a page of this wiki :
    • always remove then ending home ; DokuWiki will append it if needed,
    • but always let an ending / ; DokuWiki will remove it if needed,
  • when you add a link to a sub-page in a page which doesn't contain one (i.e. a page without an ending home) :
    • move the content of this page to the same URL, but with an ending /home,
    • put [[.:<page_name>:|Moved]] to the page without a ending /.

:!: An internal link may be point incorrectly to a page (i.e. adding a tailing /home when the effective link has not this tailing /home). This occurs when the page containing the link is created before the pointed page. Once this latter page is created, you have to modify the page with the link. And this means really modifying the page ; inserting a character and then removing it, for example, isn't enough, even if the link seems to be correct in the preview.

Icons

There are some file icons missing for <code>/<file> tags, for example, for the XSL files. The missing icons had to be put at /usr/share/dokuwiki/lib/images/fileicons. For XSL files, you can simply launch (in the given directory) ln -s xml.png xsl.png, so code identified as XSL will have an XML icon. You have to touch a configuration file in order for the new icon to be taken account (https://www.dokuwiki.org/mime#default_mime_types).
File extensions defined as XML : xprj, xcfg, xlcl.

Installation

Some plug-ins assumes that the dokuwiki data directory is placed under /usr/share/dokuwiki, but, at least when installed using the Debian packages, this directory is under /var/lib/dokuwiki, so this plug-ins could not work properly.
To solve this issue, make a link (ln -s …) from the data directory in /var/lib/dokuwiki to /usr/share/dokuwiki seems to work.

Upgrading to PHP7

When upgrading to PHP v7, the RSS feeds may not work anymore. This could be fixed by modifying line 136 of file feed.php from:

$opt[$name] = $INPUT->$val[0]($val[1], $val[2], true);

to:

$opt[$name] = $INPUT->{$val[0]}($val[1], $val[2], true);

(adding {…}).