1<?php 2/** 3 * Plugin barcode: 2D-Barcode Implementation 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_barcode 10 */ 11if (!defined('DOKU_INC')) die(); 12if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); 13if (!defined('DOKU_PLUGIN_BARCODE')) define('DOKU_PLUGIN_BARCODE', DOKU_PLUGIN . 'barcode/'); 14require_once (DOKU_PLUGIN . 'action.php'); 15 16class action_plugin_barcode extends DokuWiki_Action_Plugin { 17 18 function register(Doku_Event_Handler $controller) { 19 $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'toolbar_add_button_barcode', array ()); 20 } 21 22 function toolbar_add_button_barcode(&$event, $param) { 23 $event->data[] = array ( 24 'type' => 'format', 'title' => $this->getLang('barcode_editor'), 'icon' => '../../plugins/barcode/editor/barcode.png', 'open' => '~~BARCODE', 'sample' => @file_get_contents(DOKU_PLUGIN_BARCODE . 'editor/sample.txt'), 'close' => '~~' 25 ); 26 } 27 28} 29?>