Changeset 16241 for extensions/theme_switch/trunk/main.inc.php
- Timestamp:
- Jul 1, 2012, 2:29:15 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/theme_switch/trunk/main.inc.php
r7173 r16241 4 4 // | Theme switch plugin | 5 5 // +-----------------------------------------------------------------------+ 6 // | Copyright(C) 2012 Piwigo Team http://piwigo.org | 6 7 // | Copyright(C) 2010 Pavel Budka http://budkovi.ic.cz | 7 8 // +-----------------------------------------------------------------------+ … … 23 24 /* 24 25 Plugin Name: Theme Switch 25 Version: 2.1.a26 Description: 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.26 Version: auto 27 Description: Lets users change the theme of the gallery via menu on home page. The switch can show theme names or theme icons, depends on configuration. 27 28 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=257 28 Author: Pavel Budka 29 Author: Pavel Budka & Mistic 29 30 Author URI: http://budkovi.ic.cz 30 31 */ 31 32 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 ); 33 // in order to use select box instead of thumbnail view, add 34 // $conf['theme_switch_mode'] = 'select'; 35 // in your local configuration 35 36 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. 37 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 38 38 39 add_event_handler('loc_end_index', array(&$theme_controler, '_flags'), 85);39 define('THEME_SWITCH_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 40 40 41 // If you want user to choose using select control then use following handler. 42 // All available themes will be provided to users. 41 include_once(THEME_SWITCH_PATH.'theme_switch.inc.php'); 43 42 44 add_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')); 43 add_event_handler('user_init', 'theme_controler_switch'); 44 add_event_handler('loc_end_index', 'theme_controler_init'); 48 45 49 46 ?>
Note: See TracChangeset
for help on using the changeset viewer.