There are many plugins already distributed with PhpWiki. Simply look in the lib/plugin
directory or see the PluginManager list.

To write your own, look at the HelloWorldPlugin (HelloWorld.php in that directory),
which is a minimal example of a plugin.
Publish your self-written plugin at a new PhpWiki page with PluginName + Plugin appended
and add a link to CategoryContributedPlugin.

A WikiPlugin allows one to easily add new types of dynamic content
(as well as other functionality) to wiki pages within PhpWiki.
In this very wiki all actions which are not entirely lowercased
are implemented using plugins, and some lowercased convenience actions also. (rename, revert, setacl, diff, ...)

exclude and pages accept a list of pages. Either as comma-seperated list,
supporting glob-style wildcards, or via the <!plugin-list pluginname [args] !>
invocation syntax, where pluginname might be any plugin returning a pagelist.
See PhpWiki:PluginList.

Basic Plugin Types

All these plugins derive from the WikiPlugin class extending the run method,
which returns a object tree of HTML objects, and may react on any
provided arguments from the WikiPage (see the args below) or
optionally overridden by arguments from the url (GET or POST args),
if defined via '||='.

A basic plugin just needs the run() method, and optionally getName,
getDescription, getVersion, getDefaultArguments. See the HelloWorldPlugin for a short introduction.

plugin reacts on its arguments and the request and displays arbitrary HTML.

plugin-form is used to display a input type=text box for the default argument s.

plugin-list is used as argument to provide a dynamic list of pagenames.

<?plugin PluginName [args...] ?>

<?plugin-form PluginName [args...] ?>

<?plugin PluginName args=<!plugin-list pluginname [args] !> ?>

The box Method

Themes based on the "sidebar" theme may use the box method of any plugin, which displays a title
and a condensed content in a box.

WikiPluginCached

Plugins deriving from the class WikiPluginCached must also define the methods getPluginType(),
optionally getExpire(), managesValidators(), and dependent of the getPluginType the methods
to display the possibly cached result.

Action Pages

The term ActionPage refers to a page containing a plugin invocation.
An action is together with the pagename argument the a basic PhpWiki argument.
It can both be GET or POST actions. Actions are untranslated, always english.
Basic (and old) actions are all lowercase, like edit, browse, remove, ...
Newer actions in PhpWiki:CamelCase are invoked via plugins on their specific action page.

We decoupled actions from plugins via action pages for the following reasons: