'MyPiwiShop')) . '/'); define('MPS_DIR', PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'MyPiwiShop/'); define('MPS_VERSION', 'auto'); // init the plugin add_event_handler('init', 'mps_init'); if (defined('IN_ADMIN')) { include_once(MPS_PATH . 'include/admin_events.inc.php'); // admin plugins menu link add_event_handler('get_admin_plugin_menu_links', 'mps_admin_plugin_menu_links'); // new action in Batch Manager add_event_handler('loc_end_element_set_global', 'mps_loc_end_element_set_global'); add_event_handler('element_set_global_action', 'mps_element_set_global_action', EVENT_HANDLER_PRIORITY_NEUTRAL, 2); add_event_handler('loc_end_element_set_unit', 'mps_loc_end_element_set_unit'); } else { // file containing all public handlers functions include_once(MPS_PATH . 'include/public_events.inc.php'); // add button on album and photos pages add_event_handler('loc_end_index', 'mps_add_button'); add_event_handler('loc_end_picture', 'mps_add_button'); // form on photo page add_event_handler('loc_end_picture', 'mps_prepar_tpl'); add_event_handler('loc_end_picture', 'mps_loc_end_picture'); } // files containing specific plugin functions include_once(MPS_PATH . 'include/functions.inc.php'); /** * plugin initialization */ function mps_init() { global $conf, $template; // apply upgrade if needed include_once(MPS_PATH . 'maintain.inc.php'); $maintain = new mps_maintain(MPS_ID); $maintain->autoUpdate(MPS_VERSION, 'install'); // load plugin language file load_language('plugin.lang', MPS_PATH); }