-
Notifications
You must be signed in to change notification settings - Fork 26
dokuwiki redesign adj howto
LarsGit223 edited this page Jun 18, 2016
·
3 revisions
This page gives some hints and tips about how to adjust a plugin to the redesign branch. It is work-in-progress.
To support the current version and the redesign branch/to differ between the versions your plugin can check for the existence of the class ODTDocument:
if (!class_exists('ODTDocument')) {
// Code for old/current release of the ODT plugin (backwards compatible)
...
} else {
// Code for future release/redesign branch
...
}
The renderers variable $doc can not be used to add content to the document any more. So this will change nothing in the ODT document:
$renderer->doc .= 'This text WILL NOT be added to the document!';
Instead call cdata() to add plain text:
$renderer->cdata ('This text WILL be added to the document!');
The function _odtSpanOpenUseCSSStyle() has been replaced by the more general function _odtSpanOpenUseCSS(). So code like the code below:
$renderer->_odtSpanOpenUseCSSStyle ('color:blue;font-weight:bold;');
can simply be replaced with this code:
$renderer->_odtSpanOpenUseCSS (NULL, 'style="color:blue;font-weight:bold;"');