DokuWiki Code Hacking

As you can see, I am using DokuWiki. It is a fabulous tool in the sense that everything is in a file, and no dependence on MySQL et al.

But it is quite big now and no big code is easy to learn — which means I have to spend time to understand it! So my journey starts here.

Directory layout

Copied from http://wiki.splitbrain.org/wiki:devel:dirlayout

  • dokuwiki – DokuWiki root directory - maybe you named it differently
    • _darcs – darcs metadata, you have this only if you’re using a darcs checkout
    • _test – contains the Unit Test Suite
    • conf – Configuration data is stored here
    • data – All data that is written by DokuWiki is stored here, the changelog is placed here, too
      • attic – old page revisions are stored here, it contains namespace directories
      • cache – DokuWiki creates cachefiles to speed things up - cachefiles have md5 filenames and are stored inside 16 directories here, sorted by their first letter (0-f)
      • locks – This directory is used to create temporary locks (not pagelocks)
      • media – here are all image files stored, it contains namespace directories
      • meta – not used yet but will store meta data for pages, it contains namespace directories
      • pages – here are the raw pages stored, it contains namespace directories
    • inc – contains PHP libs – the core of DokuWiki
      • auth – authentication backends
      • geshi – The GeShi syntax highlighting language definitions
      • lang – DokuWiki’s translation files
      • magpie – The magpie RSS parser
      • parser – DokuWiki’s wiki:parser system
    • lib – Files that get called externally (from your browser)
      • exe – externally access PHP files (for AJAX)
      • images – Images files
        • interwiki – wiki:interwiki icons
        • smileys – wiki:smiley icons
        • toolbar – quickbutton icons
      • plugins – Plugins are stored here
        • acl – The ACL plugin
        • info – The Info plugin
        • config – The Configuration Settings plugin
        • plugin – The Plugin Manager
        • user – The User Manager
      • scripts – Javascript files
      • stylesCSS style files
      • tpl – Templates
        • default – The default template