DokuWiki works like that: the wiki markup is read by the parser which returns instructions. These instructions are used by the renderer to produce the html code.
How an instruction looks like:
Array
(
[0] => internallink
[1] => Array
(
[0] => java:spring:hello_world
[1] => Hello World
)
[2] => 150
)
Instead of redoing the same process at each user request, DokuWiki has a powerful multi-level caching system. By using it, we can directly get the cached instructions, and use them with a custom renderer to generate our own HTML!
Download it here.
File hierarchy
The index page contains links to different wiki pages actually displayed by doc.php, which directly uses data files from the dokuwiki folder (a standard dokuwiki installation). DokuWikiRendererXHTML.php just overrides some methods of DokuWiki's html renderer.
doc.php: update the three variables in the configuration section to match your own configuration.
view index.php in your browser (with the same base url that you've put in doc.php). Click on 'DokuWiki standard interface' link. Make a small modification to the two listed wiki pages.
go back to index.php and view the examples.
DokuWiki use the base url to generate the cache file name, that's why you need to edit the wiki pages on your own machine first.
We overrided DokuWiki renderer just to make internal links go to our website pages, not to the corresponding dokuwiki installation pages.
Created: February 29, 2008
Last modified: March 21, 2008
Tony
March 14, 2008
Another COOL stuff, something I was looking for a long time. I would suggest two more tutorials when you have free time again ;)
A) Customized your Dokuwiki instance to your site theme or template (like in Kohanaphp, where you have green theme all around the site)
B) How about Trac integration to your site? Just like in kohanaphp again.
I know there are lot of tutorials for above around. But I do not think they will explain things as simple as do.:)
Anyway, thank you very much again!