Table of Contents

DokuWiki Server

This guide is for installation instructions of a DokuWiki private site, or a DokuWiki help server for a Joomla 3.9 website installation and help pages served by DokuWiki. This is specific for my personal needs, but might help you in setting up a highly customized dokuwiki server instance.

Installation

  1. Go to Download DokuWiki and configure your download to include:
    • Version: stable
    • Languages: en, de, fr, ko, th
    • Popular Plugins: CAPTCHA, Upgrade, Wrap, Translation.
    • For a general purpose server, add Popular Plugins: Video Share, Gallery.
  2. Unzip the download to your web server directory, then run /path/to/wiki/install.php
  3. Install bethico template for DokuWiki
  4. Install the Icons Plugin for FontAwesome icons
  5. Install the condition Plugin
  6. Install the Include Plugin
  7. Install the date Plugin
  8. Install the TocTweak Plugin

General Purpose Server

  1. Install sqlite Plugin (required for Calendar Plugin)
  2. Install davcal Plugin (Calendar Plugin with CalDAV sharing support)
  3. FIXME hover css and icon links to websites

FIXME

  1. Google Maps Plugingrep -r “<html” and remove all <html> tags, disable html
  2. color Plugingrep -r “<color” and replace with wrap plugin

Settings

Customization

There are a few core hacks required to make my template work properly, both for a regular wiki as well as for a help server. Additionally, there is a bug fix required to display table of contents if you utilize the plugin:condition and plugin:toctweak.
Note: you need to verify below modifications after every DokuWiki upgrade.

Concept

Core hacks

  1. Install my Bethico Template into /lib/tpl/. Current version is v55.1 / 2024-06-09 suitable for DokuWiki “Kaos”.
  2. Add the following lines in doku.php in DokuWiki's root after line $ID = getID(); at the beginning…
    require_once(template('dispatcher.php'));
    $langcode = bethico_language();
    bethico_init_toc();
  3. …and replace at the end line act_dispatch(); with
    init_lang($langcode);
    bethico_dispatch(basename(__FILE__));
  4. Add a line to file /lib/scripts/page.js in function makeToggle to allow the template to set the table of contents to open or closed
    $handle[0].setState = function(state){
                var hidden;
            --> if(!state && JSINFO.toc) state = JSINFO.toc.initial_state;
                if(!state) state = 1;

Fix toc handling in core

  1. Modify /inc/template.php in function tpl_toc add before line Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);:
    if (@include_once(template('dispatcher.php'))) bethico_update_toc($toc, $TOC);

    This is a non-destructive change which fixes an issue in the table of contents if plugin:condition is installed.

Fix toc handling in plugin:toctweak

  1. Make elements of items array unique at the end of function _toc in file lib/plugins/toctweak/helper.php
    $items = array_unique($items, SORT_REGULAR);

Install

  1. Copies of the modified files for “Kaos” are in folder /lib/tpl/bethico/core/v551/, copy them with
    cp -R /lib/tpl/bethico/core/v551/* /

    then check file permissions

  2. After a DokuWiki upgrade check and change if necessary
    1. Check /inc/actions.php and change /lib/tpl/bethico/dispatcher.php
    2. Check /inc/template.php and change
    3. Check /doku.php and change then copy to /help.php
  3. Optional: replace favicon and logo in '/lib/tpl/bethico/images/'.
  4. Add the following line in /lib/scripts/page.js (v55.1-line 170) right before if(!state) state = 1;
    if(!state && JSINFO.toc) state = JSINFO.toc.initial_state;

Joomla Access

Help system

Joomla's default help url:

url example: https://help.joomla.org/proxy?keyref=Help{major}{minor}:{keyref}&lang={langcode}

Substitute tags:

Tag Name Example
{app} Application name 'Administrator'
{component} Component name 'com_content'
{keyref} Help screen key reference JToolbarHelper::help('{keyref}', true)
{language} Full language code 'en-GB'
{langcode} Short language code 'en'
{langregion} Region code 'GB'
{major} Joomla major version number
{minor} Joomla minor version number
{maintenance} Joomla maintenance version number

Backup with zip

Upgrade to Version 2020-07-29 "Hogfather"

Plugin whoisonline

  1. Replace function handle($match, $state, $pos, &$handler) definition with function handle($match, $state, $pos, Doku_Handler $handler) in file lib/plugins/whoisonline/syntax.php
  2. Replace function render($mode, &$renderer, $data) definition with function render($mode, Doku_Renderer $renderer, $data) in file lib/plugins/whoisonline/syntax.php
  3. Set $conf['defer_js']=0; in file conf/dokuwiki.php

Todo: change menu system

PHP 8.1 issues

Plugin condition

Plugin html5video

davcal

Check when a date entry was made

  1. Copy /data/meta/davcal.sqlite3 to D:\
  2. Open sqlite3.exe command line tool from D:\PortableCustom\sqlite3, then enter the following commands to see entries made after 2023-01-01:
    .open /davcal.sqlite3
    SELECT calendardata FROM calendarobjects WHERE datetime(lastoccurence, 'unixepoch') > '2023-01-01 00:00:00';
    .quit