Learn about DokuWiki
Learn about DokuWiki
(This is a part of the plugin survey 2011)
The 802 downloaded plugins could be analysed and commented in a number of ways, here are a few. Metrics were done by CLOC and comparisons were done with DokuWiki 2011-05-25a (bundled plugins included). This is also an attempt to determine which common_plugin_functions and other features are used by the plugin authors.
<plugin>/conf/default.phpwhich will hold the default settings and
<plugin>/conf/metadata.phpwhich holds the describing configuration metadata.
During the survey 271 plugins (34%) were found compatible with the configuration manager. 10 plugins are missing the metadata file, unknown whether this is intentional or not.
Since the 2009-12-25c “Lemming” release DokuWiki requires PHP version 5.1.2 which supports object oriented concepts like visibility (public, private, inherit) etc. Technically plugins now could be written in this style but only 41 plugins (5%) is found by looking for 'private function'. But in the population of new plugins there are more than 11% written in PHP 5.
DokuWiki release 2010-11-07a “Anteater” changed the behavior on page save. Functions handle() and render() are in most cases no longer
called during save. The change means that relying on
$ACT == 'save' doesn't work anymore. 5 plugins are still found using this technique.
The best fix is to save the data during metadata rendering because metadata is only rendered for current and saved pages. Metadata rendering will happen also for unchanged pages, if this is an issue for you you could add a check for the last modification time of the page, it should be available in the metadata you can access via the renderer (and e.g. store in the persistent metadata when you last saved your data).
The toolbar makes DokuWiki easy to use even for novice users. Sometimes plugins need to extend the toolbar with another button or interact in other ways. There are more than one way to achieve this, 40 plugins are using PHP and the TOOLBAR DEFINE event to add toolbar buttons. See the survey event list for a detailed list.
15 plugins are using the static data method accessing
6 plugins are using dynamic method based on
DokuWiki handles plugins without any PHP code but the plugin manager is not able to display information about the plugin. enforcesummary, ipa and lightboxv2 do not have an accompanying PHP plugin class.
The jQuery library was introduced with DokuWiki release 2011-11-10 “Angua”. This enables plugin and template developers to more stuff with fewer lines of Java. jQuery code is found in 6 plugins.
By using the event AJAX_CALL_UNKNOWN that is signalled from lib/exe/ajax.php if the AJAX call is not recognized action_plugins can create interactive web applications. SurveyBot tried three ways to identify plugins using AJAX.
21 plugins contains a AJAX_CALL_UNKNOWN
At last 9 more plugins are tagged ajax
Presentation can be controlled by CSS stylesheets. The downloaded plugins contain a total of 38,787 lines of CSS divided among 320 plugins (i.e. 39% uses CSS). syntaxhighlighter3 has one of the largest files with 3,600 lines but the median is only 34 lines of CSS. There are 15 plugins with more than 500 lines of CSS:
DokuWiki knows three types of stylesheet modes. Most plugins just use the screen mode by adding
styles.css, Plugins styles hints about the possibility to support other modes, SurveyBot found some examples:
40 plugins with
6 plugins with
DokuWiki's CSS dispatcher is able to replace place holders in the loaded stylesheets. From 2006-08-05 on they have been renamed to be more semantically correct. SurveyBot found 16 plugins that still uses now obsolete css replacements.
|__medium__||bookcreator, box, boxwh, folded, google_adsense2, permissioninfo|
|__lightgray__||bookcreator, layeranimation, wikicalendar|
|__dark__||bookmarkme, box, boxwh, google_adsense2, livepreview, multipoll, permissioninfo, poll, tools, userpoll|
|__light__||box, boxwh, explain, google_adsense2, livepreview, multipoll, permissioninfo, poll, userpoll, wikicalendar|
|__lighter__||box, boxwh, google_adsense2|
Continue to ⇒ events