diff options
author | chris <chris@jalakai.co.uk> | 2006-04-14 21:37:37 +0200 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2006-04-14 21:37:37 +0200 |
commit | f65bfee1954d6697e5002f4253d0a7d2d1940eb6 (patch) | |
tree | 9dcac5e578987a6aea9a4ea043f25a9b0fabaaa3 /lib/plugins/action.php | |
parent | c4e0e4a153fee5f985668670a91b2cd94a17dd75 (diff) | |
download | rpg-f65bfee1954d6697e5002f4253d0a7d2d1940eb6.tar.gz rpg-f65bfee1954d6697e5002f4253d0a7d2d1940eb6.tar.bz2 |
action plugins
This patch adds events and a third plugin type, "action" plugins, to DokuWiki.
The patch doesn't include any event signalling, that will be added in later patches.
Action plugins are loaded before most Dokuwiki processing takes place and at the
same time are given the opportunity to register handlers (or hooks) to receive
specific dokuwiki events.
Other parts of Dokuwiki (e.g. templates and syntax plugins) can also register
handlers to receive events.
Any part of Dokuwiki can create and signal events, including templates and plugins.
This patch also revises the admin plugin class by making it an extension of a
new class, DokuWiki_Plugin. The DokuWiki_Plugin_Action class also extends this
new class.
Further details of events, their signalling and handling, and of action plugins will
be added to wiki.splitbrain.org in due course :-)
darcs-hash:20060414193737-9b6ab-f23d3d9b93e4c50a3ad97ced03eabc6c0363650b.gz
Diffstat (limited to 'lib/plugins/action.php')
-rw-r--r-- | lib/plugins/action.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/plugins/action.php b/lib/plugins/action.php new file mode 100644 index 000000000..05d8735b9 --- /dev/null +++ b/lib/plugins/action.php @@ -0,0 +1,24 @@ +<?php +/** + * Admin Plugin Prototype + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Christopher Smith <chris@jalakai.co.uk> + */ +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'base.php'); + +/** + * All DokuWiki plugins to extend the admin function + * need to inherit from this class + */ +class DokuWiki_Action_Plugin extends DokuWiki_Plugin { + + function register($controller) { + trigger_error('register() not implemented in '.get_class($this), E_USER_WARNING); + } + +}
\ No newline at end of file |