Changeset 15432 for extensions/Psli_BingMaps/main.inc.php
- Timestamp:
- May 30, 2012, 7:57:34 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Psli_BingMaps/main.inc.php
r14913 r15432 6 6 Author: psli 7 7 Description: Extension to piwigo for use of bing maps to navigate in geolocalized album 8 9 -----------------------------------------------------------------------------------------10 1.1 2012-05-08 Ajout de l'internationalisation et de l'anglais11 -----------------------------------------------------------------------------------------12 1.0 2012-05-07 Verison initiale13 -----------------------------------------------------------------------------------------14 8 */ 15 9 // Chech whether we are indeed included by Piwigo. 16 10 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 17 11 18 // define Path for PHP and JS file12 // define generic Path 19 13 define ('PSLI_BINGMAPS_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 20 //define ('PSLI_BINGMAPS_JS', PSLI_BINGMAPS_PATH.'JS/Psli-BingMaps.js');14 define('PSLI_BINGMAPS_TEMPLATE_PATH', dirname(__FILE__).'/'); 21 15 define ('PSLI_BINGMAPS_VERSION_INC_PHP', PSLI_BINGMAPS_PATH.'include/version.inc.php'); 22 define ('PSLI_BINGMAPS_ADMIN_INC_PHP', PSLI_BINGMAPS_PATH.'include/admin.inc.php');23 define ('PSLI_BINGMAPS_GUEST_INC_PHP', PSLI_BINGMAPS_PATH.'include/guest.inc.php');24 define ('PSLI_BINGMAPS_ADMIN_PHP', PSLI_BINGMAPS_PATH.'include/admin.php');25 16 26 // define Path for template file 27 define('PSLI_BINGMAPS_TEMPLATE_PATH', dirname(__FILE__).'/'); 28 define ('PSLI_BINGMAPS_ADMIN_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'template/admin.tpl'); 29 30 // Include define data 17 // Include define data and global function 31 18 include_once(dirname(__FILE__).'/include/const.inc.php'); 19 include_once(dirname(__FILE__).'/include/function.inc.php'); 32 20 33 21 // Check plugin update 34 22 include_once(PSLI_BINGMAPS_VERSION_INC_PHP); 23 24 //******* Language data ******* 25 load_language('plugin.lang', PSLI_BINGMAPS_TEMPLATE_PATH); 35 26 36 27 // Plugin for admin … … 55 46 $root = $row['value']; 56 47 } 57 define ('PSLI_BINGMAPS_JS', $root.'plugins/Psli-BingMaps/JS/Psli-BingMaps.js'); 58 include_once(PSLI_BINGMAPS_ADMIN_INC_PHP); 48 49 // define Path for admin file 50 define ('PSLI_BINGMAPS_ADMIN_PHP', PSLI_BINGMAPS_PATH.'admin/admin.php'); 51 define ('PSLI_BINGMAPS_CLASS_ENTITY_PHP', PSLI_BINGMAPS_PATH.'admin/class/psli_entity.class.php'); 52 53 // Define path for configuration tab 54 define ('PSLI_BINGMAPS_ADMIN_CONF_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_conf.inc.php'); 55 define ('PSLI_BINGMAPS_ADMIN_CONF_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_conf.tpl'); 56 57 // Define path for map tab 58 define ('PSLI_BINGMAPS_ADMIN_MAP_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_map.inc.php'); 59 define ('PSLI_BINGMAPS_CLASS_MAP_PHP', PSLI_BINGMAPS_PATH.'admin/class/psli_map.class.php'); 60 define ('PSLI_BINGMAPS_ADMIN_MAP_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_map.tpl'); 61 define ('PSLI_BINGMAPS_JS_MAP', $root.'plugins/Psli-BingMaps/admin/JS/Psli-BingMaps-Map.js'); 62 63 // Define path for pin tab 64 define ('PSLI_BINGMAPS_ADMIN_PIN_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_pin.inc.php'); 65 define ('PSLI_BINGMAPS_CLASS_PIN_PHP', PSLI_BINGMAPS_PATH.'admin/class/psli_pin.class.php'); 66 define ('PSLI_BINGMAPS_ADMIN_PIN_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_pin.tpl'); 67 define ('PSLI_BINGMAPS_JS_PIN', $root.'plugins/Psli-BingMaps/admin/JS/Psli-BingMaps-Pin.js'); 68 69 // Define path for zone tab 70 define ('PSLI_BINGMAPS_ADMIN_ZONE_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_zone.inc.php'); 71 define ('PSLI_BINGMAPS_CLASS_ZONE_PHP', PSLI_BINGMAPS_PATH.'admin/class/psli_zone.class.php'); 72 define ('PSLI_BINGMAPS_ADMIN_ZONE_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_zone.tpl'); 73 define ('PSLI_BINGMAPS_JS_ZONE', $root.'plugins/Psli-BingMaps/admin/JS/Psli-BingMaps-Zone.js'); 74 75 // Define path for picture tab 76 define ('PSLI_BINGMAPS_ADMIN_PICTURE_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_picture.inc.php'); 77 define ('PSLI_BINGMAPS_CLASS_PICTURE_PHP', PSLI_BINGMAPS_PATH.'admin/class/psli_picture.class.php'); 78 define ('PSLI_BINGMAPS_ADMIN_PICTURE_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_picture.tpl'); 79 80 // Define path for exif tab 81 define ('PSLI_BINGMAPS_ADMIN_EXIF_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_exif.inc.php'); 82 define ('PSLI_BINGMAPS_ADMIN_EXIF_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_exif.tpl'); 83 84 // Define path for batch tab 85 define ('PSLI_BINGMAPS_ADMIN_BATCH_PHP', PSLI_BINGMAPS_PATH.'admin/include/admin_batch.inc.php'); 86 define ('PSLI_BINGMAPS_ADMIN_BATCH_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'admin/template/admin_batch.tpl'); 87 define ('PSLI_BINGMAPS_ADMIN_BATCH_CSS', PSLI_BINGMAPS_PATH.'admin/css/admin_batch.css'); 88 89 90 // Hook on to event on administration page. 91 add_event_handler('get_admin_plugin_menu_links', 'PSLIBINGMAPS_admin_menu'); 59 92 } 60 93 else … … 67 100 $result = pwg_query($query); 68 101 $row = pwg_db_fetch_assoc($result); 102 103 define ('PSLI_BINGMAPS_GUEST_INC_PHP', PSLI_BINGMAPS_PATH.'include/guest.inc.php'); 69 104 define ('PSLI_BINGMAPS_JS', $row['value'].'plugins/Psli-BingMaps/JS/Psli-BingMaps.js'); 70 105 … … 72 107 } 73 108 109 /********************************************************************************************/ 110 // Add an entry to the 'Plugins' menu. 111 /********************************************************************************************/ 112 function PSLIBINGMAPS_admin_menu($menu) { 113 array_push( 114 $menu, 115 array( 116 'NAME' => 'PSLI-BingMaps', 117 'URL' => get_admin_plugin_menu_link(PSLI_BINGMAPS_ADMIN_PHP) 118 ) 119 ); 120 return $menu; 121 } 122 74 123 ?>
Note: See TracChangeset
for help on using the changeset viewer.