Table of Contents

Plugin Development

It is very easy to write a DokuWiki plugin. Before writing your own, remember to search for similar plugins among plugins already written and read through security guidelines for plugin authors.

DokuWiki has a flexible plugin API which allows to extend its functionality, be it additional syntax modes, custom action modes, new export formats and a lot more. Depending on the plugin's purpose, a plugin can either consist of one, or more, components of following plugin types.

Plugin Types

At the moment DokuWiki features five different plugin types.

A simple plugin like color plugin may only consist of a single file, syntax.php. More advanced plugins consist of several components, for example the structured data plugin have the syntax handling split in “data entry” and “table view” components, an action component for the special edit button attached to every data entry and an admin interface for database maintenance.

JavaScript and CSS stylesheets can be added to all plugin types, see plugin file structure for more information.

Plugin Name

A valid plugin name should only contain the characters a-z and 0-9. Underscore is NOT allowed as this is used to separate plugin name for component name. Using underscore will also give a popularity rating of zero. If same name are used by two different plugins they are mutually excluding and inherent incompatible, furthermore only one of them can have a plugin homepage on dokuwiki.org.

Plugin Wizard

A Wizard to create the basic skeleton for a DokuWiki plugin can be found at http://pluginwizard.dokuwiki.org/ and is recommended to be used for starting the development.

If you later need to extend your plugin refer to the plugin file structure on how files are arranged in a plugin.

Publishing a Plugin on dokuwiki.org

If you created a plugin, please share it with the community. Just create a page named after your plugin in the plugin namespace. E.g. if your pluginfolder is named sample create a page plugin:sample here in the wiki.

The page should contain all needed documentation on how to install and use the plugin and give users a pretty good idea what it does before installing the plugin. Adding screenshots might be a good idea as well1). Plugin homepage template contains more tips on how to make an user friendly page.

At the top of the plugin page a few metadata fields have to be filled. A description of each field can be found here.

Uploads are not allowed on dokuwiki.org, so you need to host your plugin files somewhere else. We recommend to manage your source with a Revision Control System like git. If you do, it's easiest to use a public repository host like Github which offers also a bug tracker for your repository.

Plugin Overview

Plugin Survey is a developers overview of all plugins present in the plugin namespace of www.dokuwiki.org. Data was collected by an automated script 2010-09-05 with some additional manual data download and mining. A total of 697 plugin pages containing 672 plugins was examined and source code for 647 plugins (96%) downloaded and parsed.

1) You can use the imageshack plugin to add images here