This is an old revision of the document!


Table of Contents

DokuWiki Help Server

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. Choose requested languages, the current guide assumes languages en, de, fr, ko, and th.
  2. Install bethico template for DokuWiki
  3. Install the Icons Plugin for FontAwesome icons.

Settings

  • 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.
  • Set “Top level for table of contents=2”, “Minimum amount of headlines that determines whether the TOC is built=1”, “Maximum level for table of contents=4”, and “Maximum section edit level=4” 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.

  • Copy 'doku.php' to 'help.php' in the DokuWiki root folder
  • Create the language fallback to English for non-existent translation pages by adding 3 lines to /help.php at line #41, just below '$ID = getID();'. Remember to update after you add or remove languages.
    // bco: 20181114. Get requested language and set language fallback
    require_once(template('dispatcher.php'));
    $langcode = help_language();
  • Modify 'help.php' and replace line #119+4 and #120+4
    //do the work (picks up what to do from global env)
    act_dispatch();

    with

    // bco: 20181114. Set language and load act_dispatch override
    init_lang($langcode);
    help_dispatch();
  • Change 3rd parameter of 'dw_page.makeToggle' call in file '/lib/scripts/page.js' from null or 1 to -1 to initialize 'closed' instead of 'opened'.
  • After a DokuWiki upgrade make sure that
    • If '/inc/actions.php' has been upgraded, reflect the changes in '/lib/tpl/bethico/dispatcher.php'
    • If '/doku.php' has been upgraded, reflect the changes in '/help.php'

Joomla Access

  • Set the Help URL in the component configuration of com_bethico to
    'https://your.wiki.server/help.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/help.php?id=en:view