1<?php
2/**
3 * JCapture plugin
4 *
5 * @author Pavel Vlasov
6 */
7
8if (!defined('DOKU_INC')) die();
9if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
10require_once (DOKU_PLUGIN . 'action.php');
11
12class action_plugin_jcapture extends DokuWiki_Action_Plugin {
13
14  /**
15   * return some info
16   */
17  function getInfo(){
18    return array(
19                 'author' => 'Pavel Vlasov',
20                 'email'  => 'Pavel.Vlasov@hammurapi.com',
21                 'name'   => 'JCapture',
22                 'desc'   => 'Plugin for making screen captures.',
23                 'url'    => 'http://www.hammurapi.com/dokuwiki/doku.php/products:jcapture:start',
24                 );
25  }
26
27    /**
28     * Register the eventhandlers
29     */
30    function register(&$controller) {
31        $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
32    }
33
34    /**
35     * Inserts the toolbar button
36     */
37    function insert_button(& $event, $param) {
38        $event->data[] = array (
39            'type' => 'JCapture',
40            'title' => 'Screen capture',
41            'icon' => '../../plugins/jcapture/camera.png',
42            'open' => '<abutton>',
43            'close' => '</abutton>',
44        );
45    }
46
47}
48
49