Dokuwiki notes and tricks

Latest update 2021-08-05.

Automatic UI language switch

  • Installed languages: en, fi
  • The content is divided into two language branches so that all URL's start with en or fi

Add to conf/local.php:


In conf/local.protected.php:

$conf['lang'] = 'en';
$detected_lang = preg_replace('/^(..).*/i','$1',$_REQUEST['id']);
if (strcmp($detected_lang, 'fi') == 0) { $conf['lang'] = 'fi'; }

What this effectively does: Sets language to English. Then scans the requested path and if it begins with “fi”, sets language to Finnish.

Change password from Linux command line

Upgrading Dokuwiki

Removing visible page info

Edit file inc/template.php

Comment out code

     $out .= '<bdi>'.$fn.'</bdi>';
     $out .= ' · ';
     $out .= $lang['lastmod'];
     $out .= ' ';
     $out .= $date;
     $out .= ' '.$lang['by'].' ';
     $out .= editorinfo($INFO['editor']);
     $out .= ' ('.$lang['external_edit'].')';

Edit file lib/tpl/typowiki/tpl_functions.php

In function _tpl_discussion comment out most of the code.