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

Revision 3764, 2.4 KB checked in by nikrou, 11 years ago (diff)

Reorganize files (template, css, js, ...)
wip : plugin management

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_CSS', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/css');
32define('AK_PLUGIN_JS', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/js');
33define('AK_PLUGIN_IMGS', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)). '/imgs');
34
35include_once "include/akConfig.class.php";
36
37load_language('plugin.lang', AK_PLUGIN_LANG);
38
39$plugin_config = new akConfig(AK_PLUGIN_ROOT, AK_PLUGIN_NAME);
40$plugin_config->load_config();
41
42if (defined('IN_ADMIN')) { 
43  add_event_handler('get_admin_plugin_menu_links', array($plugin_config, 'plugin_admin_menu')); 
44} else {
45  include_once AK_PLUGIN_ROOT . '/public.php';
46}
47
48set_plugin_data($plugin['id'], $plugin_config);
49?>
Note: See TracBrowser for help on using the repository browser.