1<?php
2/**
3 * DokuWiki Plugin slider (Syntax Component)
4 *
5 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html
6 * @author  Andreas Gohr <gohr@cosmocode.de>
7 * @author Michael Bohn <mjbohn@gmail.com>
8 */
9
10if(!defined('DOKU_INC')) die();  // no Dokuwiki, no go
11
12class action_plugin_slider extends DokuWiki_Action_Plugin
13{
14    /**
15     * Register the handle function in the controller
16     *
17     * @param Doku_event_handler $controller The event controller
18     */
19    function register(Doku_Event_Handler $controller)
20    {
21        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'addconfig2js');
22    }
23
24
25    /**
26     * @param $event
27     * @param $params
28     */
29    function addconfig2js ($event, $params) {
30        global $JSINFO;
31        global $conf;
32        $this->loadConfig();
33        $JSINFO['plugin_slider'] = $conf['plugin']['slider'];
34    }
35}