DokuWiki Help Server with 2 templates

The help server is built with DokuWiki. At the moment, all admin help views are served from this server. At a later date, I plan to migrate all site help views to the help server as well.

Installation

  1. Download DokuWiki and install
  2. Install the Bootie Template (might replace with my own template later)

Settings

  • Set “Renderer to use for main (xhtml) wiki output” to Renderer Plus (plugin) under Advanced in DokuWiki's Configuration Settings. This will enable toc in Bootie Template.
  • Add “admin” group for every administrator of the help server in User Manager.
  • Create the language namespaces (e.g. en, fr, de, ko, th) and set permissions to Read only for @ALL in Access Control List Management
  • Set “Use first heading for pagenames” to Always under Display in DokuWiki's Configuration Settings.

Customization

There are a few core hacks required to make this work as a help server, but they are simple and thus easy to maintain, even after an update of DokuWiki or any of the extensions.

  • Remove header and footer from the Bootie template by comenting the following lines in /lib/tpl/bootie/main.php. This leaves only the page content to be visible.
    // include('tpl_header.php');
    // include('tpl_footer.php');
  • Make sure your admin users always get the default template, through which they can modify pages, and all other users always get the bootie template. This requires to comment out line #160 (function _getTplPerUser) and to add an additional line at line #184 (function _getTplPerNamespace) in file /lib/plugins/loadskin/action.php
    // return $tplCookie;
    if ($_SERVER['REMOTE_USER'] == 'admin-user') return 'default-template';
  • Create the language fallback to English for non-existent translation pages by adding 3 lines to /doku.php at line #41, just below '$ID = getID();'. Remember to update after you add or remove languages.
    // get requested language and set language fallback
    require_once(template('dispatcher.php'));
    $langcode = help_language();

Joomla Access

  • Set the Help URL in the component configuration of com_bethico to
    'https://your.wiki.server/doku.php?id={langcode}:{keyref}'
  • Add a help button to view 'view' to open the help page
    JToolbarHelper::help('view', true);
  • With English as the active language it will invoke
    https://your.wiki.server/doku.php?id=en:view