This simple library for CodeIgniter makes rendering a page from a local DokuWiki installation as simple as loading a CI view.
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. - Configuration.
Edit dokuwiki.php in the config/ directory, modifying parameters as necessary. - Usage.
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:
$this->dokuwiki->render(‘doku:start’);and if a return to an XHTML string is desired instead,
$this->dokuwiki->render(‘doku:start’, TRUE);
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.
Hi, Im not quite following what your doing here. Do you have any fuller instructions anywhere?
I have my CI install in the root directory.
My Dokuwiki is installed in /infopages
Could you please do me a massive favor and explain what I need to do to get this to work?
I have installed the required libries in the libries folder. and copied the config file into the application folder. What do I now need to do to edit the dokuwiki folder in the /infopages area?
Cheers
Chris
By: Chris Headleand on June 11, 2011
at 11:09 am
could you please update the link to the zip archive with relative directories? And also perhaps elaborate a little? Would be great!
By: Victoria Wagman on June 12, 2013
at 1:41 am
my dokuwiki at another server.i using above code it showing Doku_Renderer_xhtml class not found
By: satish on May 25, 2015
at 8:16 pm
Outra opção é você terceirizar todo processo de distribuição e ficar por conta somente pela divulgação de sua loja na internet, uma muito conhecida é Magazine você
da Magazine Luíza, você ganha uma comissão sobre a venda do produto.
By: Vivian on February 11, 2017
at 10:34 pm