1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | akBookStyle - a plugin for Piwigo | |
---|
4 | // +-----------------------------------------------------------------------+ |
---|
5 | // | Copyright(C) 2009-2010 Nicolas Roudaire http://www.nikrou.net | |
---|
6 | // | Copyright(C) 2009 vdigital | |
---|
7 | // +-----------------------------------------------------------------------+ |
---|
8 | // | This program is free software; you can redistribute it and/or modify | |
---|
9 | // | it under the terms of the GNU General Public License as published by | |
---|
10 | // | the Free Software Foundation | |
---|
11 | // | | |
---|
12 | // | This program is distributed in the hope that it will be useful, but | |
---|
13 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
14 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
15 | // | General Public License for more details. | |
---|
16 | // | | |
---|
17 | // | You should have received a copy of the GNU General Public License | |
---|
18 | // | along with this program; if not, write to the Free Software | |
---|
19 | // | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | |
---|
20 | // | MA 02110-1301 USA | |
---|
21 | // +-----------------------------------------------------------------------+ |
---|
22 | |
---|
23 | if (!defined('PHPWG_ROOT_PATH')) { |
---|
24 | die('Hacking attempt!'); |
---|
25 | } |
---|
26 | |
---|
27 | define('AK_PLUGIN_NAME', 'ak Book Style'); |
---|
28 | define('AK_PLUGIN_ROOT', dirname(__FILE__)); |
---|
29 | define('AK_PLUGIN_LANG', AK_PLUGIN_ROOT . '/'); |
---|
30 | define('AK_PLUGIN_TEMPLATE', AK_PLUGIN_ROOT . '/template'); |
---|
31 | define('AK_PLUGIN_BASE_URL', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__))); |
---|
32 | define('AK_PLUGIN_CSS', AK_PLUGIN_BASE_URL . '/css'); |
---|
33 | define('AK_PLUGIN_JS', AK_PLUGIN_BASE_URL . '/js'); |
---|
34 | define('AK_PLUGIN_IMGS', AK_PLUGIN_BASE_URL . '/imgs'); |
---|
35 | |
---|
36 | |
---|
37 | include_once "include/akConfig.class.php"; |
---|
38 | |
---|
39 | load_language('plugin.lang', AK_PLUGIN_LANG); |
---|
40 | |
---|
41 | $plugin_config = new akConfig(AK_PLUGIN_ROOT, AK_PLUGIN_NAME); |
---|
42 | $plugin_config->load_config(); |
---|
43 | |
---|
44 | if (defined('IN_ADMIN')) { |
---|
45 | add_event_handler('get_admin_plugin_menu_links', array($plugin_config, 'plugin_admin_menu')); |
---|
46 | } else { |
---|
47 | include_once AK_PLUGIN_ROOT . '/public.php'; |
---|
48 | } |
---|
49 | |
---|
50 | set_plugin_data($plugin['id'], $plugin_config); |
---|
51 | ?> |
---|