From f65bfee1954d6697e5002f4253d0a7d2d1940eb6 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 14 Apr 2006 21:37:37 +0200 Subject: 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 --- lib/plugins/action.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/plugins/action.php (limited to 'lib/plugins/action.php') 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 @@ + + */ +// 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 -- cgit v1.2.3