*/ if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); class action_plugin_example extends DokuWiki_Action_Plugin { /** * Initialisierung (optional nur wenn Bedarf) */ var $config = array(); var $BV_Flag = false; var $BP_Message = ''; function action_plugin_example(){ global $conf; $this->config = $conf; // $this->setupLocale(); // enable direct access to language strings } /** * Registrierung eigener handlers mit dem DokuWiki Event Controller */ function register(&$controller) { $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, 'example_handle'); $controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, '_example_output'); } function example_handle (&$event, $param) { global $ID; global $INFO; if (($event->data == 'show' || $event->data == 'edit') && (!$INFO['isadmin'] && !$INFO['ismanager'])) { $this->BV_Flag = true; // $this->BP_Message = $this->lang['msg_exampleMessage']; $this->BP_Message = $this->getLang('msg_exampleMessage'); } } function _example_output (&$event, $param) { if ($this->BV_Flag && $this->BP_Message <> '') { ptln('