1<?php 2/** 3 * Blockquote Plugin 4 * 5 * Allows correctly formatted blockquotes. Action component provides toolbar 6 * button. 7 * 8 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 9 * @author Tobias Deutsch <tobias@strix.at> 10 * @author Gina Haeussge <osd@foosel.net> 11 */ 12 13// must be run within Dokuwiki 14if (!defined('DOKU_INC')) 15 die(); 16 17if (!defined('DOKU_PLUGIN')) 18 define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); 19 20require_once (DOKU_PLUGIN . 'action.php'); 21 22class action_plugin_blockquote extends DokuWiki_Action_Plugin { 23 24 /** 25 * register the eventhandlers 26 */ 27 function register(Doku_Event_Handler $controller) { 28 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'blockquote_button', array ()); 29 } 30 31 /** 32 * Inserts a toolbar button 33 */ 34 function blockquote_button(Doku_Event $event, $param) { 35 $event->data[] = array ( 36 'type' => 'format', 37 'title' => $this->getLang('qb_blockquote'), 38 'icon' => '../../plugins/blockquote/images/blockquote-icon.png', 39 'open' => '<blockquote>', 40 'close' => '</blockquote>', 41 42 ); 43 44 return true; 45 } 46}