source: extensions/theme_switch/trunk/main.inc.php @ 7072

Last change on this file since 7072 was 7072, checked in by pab, 14 years ago
File size: 2.6 KB
Line 
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/*
24Plugin Name: Theme Switch
25Version: 2.0.a
26Description: Switch to another template/theme from flags on your gallery home page. Edit file main.inc.php for configuration. Based on Language switch
27Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=257
28Author: Pavel Budka
29Author URI: http://pbudka.co.cc
30*/
31
32include_once(PHPWG_PLUGINS_PATH.'theme_switch/theme_switch.inc.php');
33$theme_controler = new theme_controler();
34add_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
40add_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?>
Note: See TracBrowser for help on using the repository browser.