[11072] | 1 | <?php |
---|
| 2 | /* |
---|
[11276] | 3 | Version: auto |
---|
[11073] | 4 | Plugin Name: set_plugins |
---|
| 5 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=550 |
---|
[11072] | 6 | Author: cljosse |
---|
[12058] | 7 | Description: Active/déactive tous les plugins installés. |
---|
[11072] | 8 | */ |
---|
| 9 | |
---|
| 10 | // Chech whether we are indeed included by Piwigo. |
---|
| 11 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 12 | |
---|
| 13 | // Define the path to our plugin. |
---|
| 14 | define('SET_PLUGINS_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); |
---|
[11462] | 15 | |
---|
[11499] | 16 | $SET_PLUGINS_PATH_ABS = str_replace('\\','/', realpath(SET_PLUGINS_PATH)."\\" ); |
---|
[11462] | 17 | if (!defined('SET_PLUGINS_PATH_ABS')) |
---|
| 18 | define( |
---|
[11499] | 19 | 'SET_PLUGINS_PATH_ABS', $SET_PLUGINS_PATH_ABS |
---|
[11462] | 20 | ); |
---|
| 21 | |
---|
[11072] | 22 | load_language('plugin.lang', SET_PLUGINS_PATH); |
---|
| 23 | // Hook on to an event to show the administration page. |
---|
[11385] | 24 | global $infos_message,$erreur_message,$infos_warning; |
---|
[11093] | 25 | |
---|
[11072] | 26 | |
---|
| 27 | |
---|
[11385] | 28 | include_once(SET_PLUGINS_PATH.'set_plugins_class.php'); |
---|
[11462] | 29 | $set_plugins = new set_plugins(); |
---|
[11385] | 30 | $infos_message = ""; |
---|
| 31 | $erreur_message = ""; |
---|
| 32 | $infos_warning = ""; |
---|
[11484] | 33 | $liste_active_plugins; |
---|
[11385] | 34 | // Add an entry to the 'Plugins' menu. |
---|
[11462] | 35 | add_event_handler('get_admin_plugin_menu_links', array(&$set_plugins,'set_plugins_admin_menu') ); |
---|
[11484] | 36 | add_event_handler('loc_end_admin', array(&$set_plugins,'messages_admin'),50); // affichege infos |
---|
| 37 | |
---|
| 38 | add_event_handler('loc_end_page_header', array(&$set_plugins,'begin_admin'),EVENT_HANDLER_PRIORITY_NEUTRAL ); |
---|
| 39 | add_event_handler('loc_end_page_header',array(&$set_plugins,'set_plugins_add'),EVENT_HANDLER_PRIORITY_NEUTRAL+1 ); |
---|
[11249] | 40 | |
---|
[11385] | 41 | //======================================================= |
---|
[11484] | 42 | |
---|
[11072] | 43 | ?> |
---|