My Projects



Customizations to dokuwiki for this site



Allow Upper/lowercase pagenames

Needed to allow upper/lowercase pagenames:
Commented out one line in the /var/lib/dokuwiki/inc/pageutils.php about line 109:
$id = utf8_strtolower($id);

Also similar line in /usr/share/dokuwiki/HTTPClient.php
commented out strtolower() function calls.

But may have side effects with filename matching when other bits of code assume lowercase.

Allow upload of specific text file filetypes

Edited /etc/dokuwiki/mime.local.conf and added:

cpp      text/plain
h        text/plain

Allow images with uppercase filename extension

Edited /etc/dokuwiki/mime.local.conf and added:

JPG      image/jpeg

(doesn't work 100%, eg doesn't show image preview in media manager)

Add symbol for degrees

Edited /etc/entities.local.conf and added:

(deg)    °

Background wallpaper

Copied wallpaper background image to:
/usr/share/dokuwiki/lib/images/paper.gif

Inserted ito /etc/dokuwiki/userstyle.css

  body {background-image:url(/dokuwiki/lib/images/paper.gif) !important;}

see https://www.dokuwiki.org/devel:css

Embedded HTML

Edited /etc/dokuwiki/local.php to allow embedded HTML code within wiki pages:

$conf['htmlok']      = 1;

To insert HTML code in wiki pages surround blocks of code with:

<HTML>
(your code)
</HTML>

or inline

<html>(your code)</html>

see https://www.dokuwiki.org/faq:html

Nice URLs

Edited /etc/dokuwiki/local.php to allow url paths without doku.php?id= type code:

$conf['userewrite']      = 1;
$conf['useslash']        = 1;

CSS dropshadow code

Inserted into /etc/dokuwiki/userstyle.css

  body {margin:25px;}

  div.shadows {
    width: 90%;
    background-color: white;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    margin-bottom: 25px;
  }

  div.container {
    text-align: center;
    padding: 10px 5px;
  }

Invoke this with:

<HTML>
<div class="shadows" style="text-align:center">
</HTML>
{{wiki:NAMESPACE:IMAGE.JPG?WIDTH|ALT-DESCRIPTION}} (can have multiple images here)
<HTML>
  <div class="container">
    LONG-CAPTION-TO-DISPLAY-BELOW-IMAGE(S)
  </div>
</div>
</HTML>

or

<HTML>
<div class="shadows" style="text-align:center">
  <a href="/dokuwiki/_detail/PATH-TO-IMAGE.jpg" class="media"><img width="45%" src="/dokuwiki/_media/PATH-TO-IMAGE.jpg" class="media" title="IMAGE-TITLE" alt="IMAGE-TITLE" /></a>
  <div class="container">
    LONG-CAPTION-TO-DISPLAY-BELOW-IMAGE(S)
  </div>
</div>
</HTML>

see https://www.dokuwiki.org/devel:css

Old Revisions : Removing old documents

To remove any of the contents of the attic you can manually remove the corresponding files and sub-directories from the system.

To also remove the list from DokuWiki, edit the metafile ./data/meta/<namespace>.changes

Installation customizations

Installed the Debian distribution default dokuwiki package Downloaded dokuwiki-2012-10-13.tgz (“Adora Belle”), unpacked manually copied across files to debian structure. logged in and opened the configure page and checked all working ok. Downloaded dokuwiki-2013-05-10.tgz (“Weatherwax”), unpacked manually copied across files to debian structure. logged in and opened the configure page and checked all working ok.

Files were manually copied as per:

bin -> /usr/share/dokuwiki/bin
conf -> /etc/dokuwiki (excluding acronyms.conf as don't want all those abbreviations highlighted)
data -> /var/lib/dokuwiki/data
inc -> /usr/share/dokuwiki/inc
lib/plugins -> /var/lib/dokuwiki/lib/plugins
lib/tpl -> /var/lib/dokuwiki/lib/tpl
lib/exe, images, scripts, styles, index.html -> /usr/share/dokuwiki/lib
* -> /usr/share/dokuwiki/

Downloaded and unpacked zenlike template into /var/lib/dokuwiki/lib/tpl/zenlike. Edited colour of : zenlike/images/buttonbg.gif zenlike/images/db1.gif zenlike/images/db2.gif zenlike/images/menubg.gif

Replaced : zenlike/images/hdrpic.jpg

Edited : zenlike/css/zenlike.css zenlike/lang/en/lang.php and changed

  ⇐ $lang['discussion']        = 'Discussion';
  ⇒ $lang['discussion']        = 'Feedback';

zenlike/style.ini