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
13class action_plugin_blockquote extends DokuWiki_Action_Plugin {
14
15    /**
16     * register the eventhandlers
17     */
18    function register(Doku_Event_Handler $controller) {
19        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'blockquote_button', array ());
20    }
21
22    /**
23     * Inserts a toolbar button
24     */
25    function blockquote_button(Doku_Event $event, $param) {
26        $event->data[] = array (
27            'type' => 'format',
28            'title' => $this->getLang('qb_blockquote'),
29            'icon' => '../../plugins/blockquote/images/blockquote-icon.png',
30            'open' => '<blockquote>',
31            'close' => '</blockquote>',
32
33        );
34
35        return true;
36    }
37}