1 | <?php |
---|
2 | // +-----------------------------------------------------------------------+ |
---|
3 | // | Piwigo - a PHP based picture gallery | |
---|
4 | // | Theme switch plugin | |
---|
5 | // +-----------------------------------------------------------------------+ |
---|
6 | // | Copyright(C) 2008 Pavel Budka http://pbudka.co.cc | |
---|
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 | |
---|
23 | /* |
---|
24 | Plugin Name: Theme Switch |
---|
25 | Version: 2.0.a |
---|
26 | Description: Switch to another template/theme from flags on your gallery home page. Edit file main.inc.php for configuration. Based on Language switch |
---|
27 | Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=257 |
---|
28 | Author: Pavel Budka |
---|
29 | Author URI: http://pbudka.co.cc |
---|
30 | */ |
---|
31 | |
---|
32 | include_once(PHPWG_PLUGINS_PATH.'theme_switch/theme_switch.inc.php'); |
---|
33 | $theme_controler = new theme_controler(); |
---|
34 | add_event_handler('loading_lang', array(&$theme_controler, '_switch'), 5 ); |
---|
35 | |
---|
36 | // If you want user to choose from icons then use following handler. |
---|
37 | // Only themes which have gif icon provided in icons plugin directory will be provided to users. |
---|
38 | // Gif file name must be the same as theme's name and must be stored in sub directory named according to template's name. |
---|
39 | |
---|
40 | add_event_handler('loc_end_index', array(&$theme_controler, '_flags'), 95 ); |
---|
41 | |
---|
42 | // If you want user to choose using select control then use following handler. |
---|
43 | // All available themes will be provided to users. |
---|
44 | |
---|
45 | // add_event_handler('loc_end_index', array(&$theme_controler, '_select'), 95 ); |
---|
46 | |
---|
47 | ?> |
---|