With the permission of Jérôme Jaglale over at Maestric.com, I brought over his rendering code and packaged it up for CI. The comments on his code’s release have also been taken into consideration.
It should be compatible on any server hosting both a functioning CI and DW installation, and has been tested on CodeIgniter 1.7.2 + DokuWiki 2009-12-25c “Lemming” and PHP 5.2.
- Obtain the plug-in.
A zip archive with the files in their relative subdirectories is downloadable here.
- Install in CI application.
Simply copy the files in the config/ and libraries/ archive directories to the CI application folder’s.
Edit dokuwiki.php in the config/ directory, modifying parameters as necessary.
Functions exactly like a standard CI library. The library itself can be autoloaded or manually loaded with the library name “dokuwiki” (the config/ file will automatically be loaded as well).
Rendering the XHTML for the DokuWiki start page “doku:start” is then as simple as:
and if a return to an XHTML string is desired instead,
As an interface to Jérôme’s code, this plugin has the same caveats:
- DokuWiki content access is unrestricted
- Uncached wiki pages not accessible (rare concern if editing pages via DW web interface)
Remember that for some links and media to display nicely, you’ll need to apply the DokuWiki CSS stylesheets. Thanks again to Jérôme for making this integration library possible.