1<?php
2/**
3 * JAlbum Action Plugin:   Register JAlbum to the toolbar
4 *
5 * @author     Jürgen A.Lamers <jaloma.ac@googlemail.com>
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_jalbum extends DokuWiki_Action_Plugin {
13
14  /**
15   * return some info
16   */
17  function getInfo(){
18    return array(
19      'author' => 'Jürgen A.Lamers',
20      'email'  => 'jaloma.ac@googlemail.com',
21      'date'   => '2009-01-14',
22      'name'   => 'JAlbum (toolbar action plugin component)',
23      'desc'   => 'JAlbum toolbar action functions.',
24      'url'    => 'http://www.dokuwiki.org/plugin:jalbum',
25    );
26  }
27
28  function register(&$controller) {
29    $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
30  }
31
32/**
33 * Inserts a toolbar button
34 */
35function insert_button(& $event, $param) {
36    $event->data[] = array (
37        'type' => 'format',
38        'title' => $this->getLang('jalbum'),
39        'icon' => '../../plugins/jalbum/toolbar/JAlbum.png',
40		'open' =>'<jalbum albumdir="off" albumtitle="off" width="400" height="400" align="top" quality="off" albumid="off" albumshow="off" jpgtohtml="on">',
41        'close' => '</jalbum>',
42    );
43}
44} // class