My Projects

This is an old revision of the document!




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: 80%;
    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>
<center><div class="shadows">
  <center>
</HTML>
{{wiki:NAMESPACE:IMAGE.JPG?WIDTH|ALT-DESCRIPTION}} (can have multiple images here)
<HTML>
  </center>
  <div class="container">
    <p>LONG-CAPTION-TO-DISPLAY-BELOW-IMAGE(S)</p>
  </div>
</div></center>
</HTML>

or

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

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

Old Revisions

When you edit a page, DokuWiki creates a revision with the old document. The old versions can be viewed by clicking the Old Revisions button. On the page shown, revisions can be compared with the diff tool.

Configuration

Disabling button

Displaying the Old Revisions button can be disabled in the disableactions config option.

Storage

Revisions are stored within the attic directory, within the configured savedir.

The compression configuration option specifies if the pages will be saved as compressed files or not.

The default system path is <dokuwiki>/data/attic/<namespace>/<attic file>.

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





   Home Page   About this Site   Copyright Questions   Contact Us