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

Last change on this file since 11529 was 7173, checked in by pab, 14 years ago
File size: 2.7 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based picture gallery                                  |
4// | Theme switch plugin                                                   |
5// +-----------------------------------------------------------------------+
6// | Copyright(C) 2010      Pavel Budka               http://budkovi.ic.cz |
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.1.a
26Description: Lets logged or unlogged user change appearance of gallery (via switching to different theme) on gallery home page. Based on Language switch. The switch can show theme names or theme icons, depends on configuration. See details in a file main.inc.php.
27Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=257
28Author: Pavel Budka
29Author URI: http://budkovi.ic.cz
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 screenshot.png icon provided will be provided to users.
38
39add_event_handler('loc_end_index', array(&$theme_controler, '_flags'), 85 );
40
41// If you want user to choose using select control then use following handler.
42// All available themes will be provided to users.
43
44add_event_handler('loc_end_index', array(&$theme_controler, '_select'), 15 );
45
46// this is preparation for future version with configuration
47// add_event_handler('get_admin_plugin_menu_links', array(&$theme_controler,'_theme_admin'));
48
49?>
Note: See TracBrowser for help on using the repository browser.