source: extensions/akBookStyle/trunk/init.php @ 3787

Last change on this file since 3787 was 3787, checked in by nikrou, 15 years ago

fonctionnement sans javascript

File size: 2.4 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | akBookStyle  - a plugin for Piwigo                                    |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2009      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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
20// | USA.                                                                  |
21// +-----------------------------------------------------------------------+
22
23if (!defined('PHPWG_ROOT_PATH')) {
24  die('Hacking attempt!');
25}
26
27define('AK_PLUGIN_NAME', 'ak Book Style');
28define('AK_PLUGIN_ROOT', dirname(__FILE__));
29define('AK_PLUGIN_LANG', AK_PLUGIN_ROOT . '/');
30define('AK_PLUGIN_TEMPLATE', AK_PLUGIN_ROOT . '/template');
31define('AK_PLUGIN_BASE_URL', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)));
32define('AK_PLUGIN_CSS', AK_PLUGIN_BASE_URL . '/css');
33define('AK_PLUGIN_JS', AK_PLUGIN_BASE_URL . '/js');
34define('AK_PLUGIN_IMGS', AK_PLUGIN_BASE_URL . '/imgs');
35
36
37include_once "include/akConfig.class.php";
38
39load_language('plugin.lang', AK_PLUGIN_LANG);
40
41$plugin_config = new akConfig(AK_PLUGIN_ROOT, AK_PLUGIN_NAME);
42$plugin_config->load_config();
43
44if (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
50set_plugin_data($plugin['id'], $plugin_config);
51?>
Note: See TracBrowser for help on using the repository browser.