Table of Contents
Frequently Asked Questions
Q. How do you enable login to wiki using Greenstone registration?
The code changes to allow for Greenstone registration integration should already be present in the dokuwiki retrieved from Greenstone's SVN. To configure the dokuwiki for login follow these instructions:
- Edit the
mysql.conf.phpfile to have the correct details:
$conf['auth']['mysql']['server'] = 'localhost'; $conf['auth']['mysql']['user'] = 'greenstonewiki'; $conf['auth']['mysql']['password'] = '********'; $conf['auth']['mysql']['database'] = 'gs_services';
- While still in the conf directory, create a file
local.protected.phpwith the content:
<?php require_once('mysql.conf.php'); ?>
- Edit the file
local.phpand ammend/add the line:
... $conf['authtype'] = 'mysql'; ...
- Ensure the permissions for all three files you've edited are correct as to be readble by the nzdl group
- Disable Dokuwiki's built-in register and email new password abilities by editing
<dokuwiki>/conf/local.phpand adding (or updating):
$conf['disableactions'] = 'register,resendpwd';
Alternatively, you can set these in the "Configuration Settings" page within the "Admin" page. Note a later customization step will add back in links to the global Greenstone registration system.
Q. How do I create a page?
The easiest way is to use the search box in the left navigation to search for a page that isn't already created. Include in the search any path/namespace as required. For instance, we (originally) created this page by searching for:
but we could have included a path like so:
which would create a
Manuals folder, with a
User folder within it, and finally the
Section1 page within that.
When you search for a page that isn't there, the result page will helpfully suggest "If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate button." However, instead of a button, in this page template you'll need to click the tab at the top of the search results page labelled
create this page. If it all works you should find yourself in a textarea editor entering content for the page. Click
Preview to review your content for formatting etc, and
Save to commit changes to the page.
- Checkout the
gsdl-docspackage out of SVN
- Go back up to
<gsdl-docs>/and create a symlink to the folder you just unpacked called just
ln -s ./lib/dokuwiki/dokuwiki-<version> ./dokuwiki
- Copy all of the archive files in
<gsdl-docs>/dokuwiki/lib/plugins/, then unpack
- note you may need to rename the plugin folders—you'll find Dokuwiki will complain about incorrectly named folders at startup
- Similarly, copy the
monobooktemplate archive from
- Setup your webserver (as needed) so you can access this dokuwiki directory and run the PHP scripts therein
- Visit the dokuwiki installer page in a web browser. For example, if you're webserver is running on
localhost, at port
8080, and the path to
/gsdl-docs, then visit:
- Follow the setup instructions, and then follow the recommended security settings for Dokuwiki, including renaming the
- Overwrite the default configuration by copying the file
<gsdl-docs>/dokuwiki/conf/overwriting the existing file
- Recursively copy the starting pages file into place, overwriting existing files if prompted
cp -r <gsdl-docs>/lib/dokuwiki/pages/ <gsdl-docs>/dokuwiki/data/pages/
- note there is a copy of these instructions in the starting files, located at development
- Run each of these commands in order to transform the manual's XML files into Dokuwiki pages:
php gs-manuals-import.php -m user php gs-manuals-import.php -m install php gs-manuals-import.php -m develop php gs-manuals-import.php -m paper
- note these require a command line version of PHP to be available on the path
- Enter the wiki again, log in using the administrator account you created when installing, and then visit each manual wiki page, 'edit' it and click approve
Captcha - Use a CAPTCHA challenge to protect DokuWiki against automated spam
- Code2 by Matthias Watermann - Enhanced code syntax highlighting with line numbering
- HTMLComment by Christopher Arndt - allows HTML comments to be retained in the output
- IFAuth by Otto Vainio - so content only for specific groups and/or users
- ImageReference by Gerrit Uitslag - create image references like latex is doing with figures
- OrphansWanted by Doug Edmunds et al - provide macros to list orphan pages and wanted pages
- Publish by Jarrod Lowe et al - integrate a publishing process into DokuWiki (differentiating between draft and approved copies of pages)
- TableWidth by Mykola Ostrovskyy - allows the width of tables and table cells to be defined
- SimpleTabs - as explained below.
Note: The diffs regarding the main Dokuwiki code are against the stable release 2011-05-25a "Rincewind".
|inc/common.php||Allow for 'no change' submissions as long as the Approve flag is ticked (see documentation for plugin:publish)|
|inc/html.php||Add id attributes to the table of contents list items so we can hide the ones on currently hidden tabs. Allow for a 'reset' header to be specified by the user in order to 'break out of' the current TOC nesting (for instance, at the end of a tabbed area to prevent following headings being grouped under Tab area headings).|
|inc/lang/en/login.txt||Add a link to the global Greenstone registration / password reset page (because we have disabled Dokuwiki's built-in user stuff at the top of this page).|
|inc/parserutils.php|| Add a check to an introspective call to ensure that the function called exists in the class before calling it - otherwise the logs fill up with warnings from classes that don't (i.e.
|inc/parser/handler.php||Hide HTML comments (namely text ids) in headings|
|inc/parser/xhtml.php||Hide the reset header (whose content is simply "#"). Heavily altered _highlight() in order to allow the id specifying HTML comments to remain hidden. Added macro to external urls to allow for links to pages on the same host.|
OUT OF DATE as of March 2023. Now using tabbox.
Support for simple tabbed areas (as compared to the existing complicated tabbed area plugins ala TabInclude) is provided through a custom-built plugin. To reinstall:
- download SimpleTabs (5.5K)
- extract to
The syntax looks like this:
<TABAREA tabs="comma,separated,list"> <TAB>content for 'comma' //including// wiki <del>magic</del> formatting</TAB><TAB>content for 'separated' and a [[:playground|link]]</TAB><TAB>content for 'list'</TAB></TABAREA>
Diff against code2 plugin dated 2008-07-22.
|syntax.php||Restore the HTML comments containing text fragment ids to be proper hidden comments.|
Diff against htmlcomment plugin dated 2005-10-08.
|syntax.php||Added code to allow the use of an alternate HTML comment block (prefix %!–, suffix –%) that is automagically rendered using entities to appear verbatim in text (so appears as rather than being hidden).|
Diff against imagereference plugin dated 2008-05-30.
|script.js||More tests to prevent trying to access null objects|
|style.css||Altering colours to make caption bars fit in better with Monobook template|
|syntax.php||Rewrote large chunks of this code to; a) allow for table captions too, b) preserve formatting (italics) in the captions, c) allow specially formatted 'HTML comments' to be inserted but not display (to allow capture and retention of explicit text ids) and d) fix minor bugs (looks like some things were in a state of change from strings to arrays - some bits of the code were expecting the other)|
|lang/en/lang.php||Changed the strings|
Diff against publish plugin dated 2011-10-02.
|action.php||Never display "previous version" span - you can always look under old revisions anyway. In fact, try to hide the 'publish state' message unless the user is looking at a draft or if they are an editor (whereupon they may be interested in when a page was last approved etc)|
|style.css||Making the message bubbles at the top of pages a little smaller (it was taking up about 2 inches of vertical real-estate, which was expensive even on my wide screen—small screen users would have suffered greatly)|
Diff against monobook template dated 2011-12-10.
|main.php||Removed positioning test so that the hierarchy navigation appears at both the top and bottom of pages (rather than one or the other)|
|static/css/screen.css||Restrict the width of code blocks - otherwise they'll push out past the 1000px limit anyway - and set them to use scrollbars for any overflow. Making h5 different (I can't remember why). Two little fixes for the new simple tabbed area where there are extra pixels sneaking in between the tabs and the tab content areas.|
|static/3rd/dokuwiki/_tabs.css||Remove the override of foreground and background colours.|
|static/3rd/monobook/main.css||Reduce the text area to around 1000px by centring main div and other absolute divs (logo and top navigation). Rename the style "preferences" to "preftitle" to prevent CSS being randomly injected where-ever you end up with an anchor tag that just happens to have the word preferences in it (happens surprisingly often in instruction manuals). I can't actually find where this style is used anyway.|