*/ // must be run within Dokuwiki if(!defined('DOKU_INC')) die(); if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/'); if(!defined('DOKU_LF')) define('DOKU_LF', "\n"); require_once(DOKU_PLUGIN.'action.php'); /** * All DokuWiki plugins to extend the admin function * need to inherit from this class */ class action_plugin_sidebarng extends DokuWiki_Action_Plugin { // register hook function register(&$controller) { $controller->register_hook('TPL_CONTENT_DISPLAY', 'BEFORE', $this, '_before'); $controller->register_hook('TPL_CONTENT_DISPLAY', 'AFTER', $this, '_after'); } function _before(&$event, $param) { $pos = $this->getConf('pos'); ob_start(); $this->p_sidebar($pos); $this->sidebar = ob_get_contents(); ob_end_clean(); if(empty($this->sidebar) && !$this->getConf('main_always')) { print '