1<?php
2/**
3 * Plugin orgapp: OrgApp applet integration - GPL>=3 - See licence COPYING file
4 *
5 * @author Enrico Croce & Simona Burzio (staff@eiroca.net)
6 * @copyright Copyright (C) 2009-2019 eIrOcA - Enrico Croce & Simona Burzio
7 * @license GPL >=3 (http://www.gnu.org/licenses/)
8 * @version 19.02
9 * @link http://www.eiroca.net/doku_orgapp
10 */
11if (!defined('DOKU_INC')) die();
12if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
13if (!defined('DOKU_PLUGIN_ORGAPP')) define('DOKU_PLUGIN_ORGAPP', DOKU_PLUGIN . 'orgapp/');
14require_once (DOKU_PLUGIN . 'action.php');
15
16class action_plugin_orgapp extends DokuWiki_Action_Plugin {
17
18  function register(Doku_Event_Handler $controller) {
19    $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'toolbar_add_button_orgapp', array ());
20  }
21
22  function toolbar_add_button_orgapp(&$event, $param) {
23    $event->data[] = array (
24        'type' => 'format', 'title' => $this->getLang('orgapp_editor'), 'icon' => '../../plugins/orgapp/editor/orgapp.png', 'open' => '<orgapp', 'sample' => @file_get_contents(DOKU_PLUGIN_ORGAPP . 'editor/sample.txt'), 'close' => '</orgapp>'
25    );
26  }
27
28}
29?>