Dokuwiki notes and tricks

Latest update 2021-04-23.

Automatic UI language switch

  • Installed languages: en, fi
  • The content is divided to two language sections so that all pages url's start with en or fi

Add to conf/local.php:

@include(DOKU_CONF.'local.protected.php');

In conf/local.protected.php:

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

Change password from Linux command line

Upgrading Dokuwiki

Removing visible page info

https://www.dokuwiki.org/config:showuseras

Edit file inc/template.php

Comment out code

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

https://www.dokuwiki.org/template:typowiki

Edit file lib/tpl/typowiki/tpl_functions.php

In function _tpl_discussion comment out most of the code.