1<?php 2/** 3 * nosidebar action plugin 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author Matthias Schulte <dokuwiki@lupo49.de> 7 * @version 2013-07-14 8 */ 9 10if(!defined('DOKU_INC')) die(); 11if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); 12 13require_once(DOKU_PLUGIN.'action.php'); 14 15class action_plugin_nosidebar extends DokuWiki_Action_Plugin { 16 17 function register(Doku_Event_Handler $controller) { 18 $controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'nosidebar', array()); 19 } 20 21 function nosidebar(&$event, $param) { 22 global $INFO; 23 global $conf; 24 if(empty($INFO['meta']['nosidebar'])) return; 25 26 if($INFO['meta']['nosidebar']) { 27 $conf['sidebar'] = ''; 28 } 29 } 30} 31