Index: /extensions/Psli_BingMaps/JS/Psli-BingMaps.js
===================================================================
--- /extensions/Psli_BingMaps/JS/Psli-BingMaps.js	(revision 14890)
+++ /extensions/Psli_BingMaps/JS/Psli-BingMaps.js	(revision 14891)
@@ -21,4 +21,53 @@
 	psli_g_ZoomEntity.push(new Microsoft.Maps.EntityCollection());
 
+/**************************************************************************/
+// JS Function used by admin script while setting up plugin
+function psli_AdminUpdateMap() {
+	psli_g_MapCenter = new Microsoft.Maps.Location(document.getElementById("lat").value, document.getElementById("lon").value);
+	psli_g_zoomInitial = document.getElementById("zoom").value
+	var pin = new Microsoft.Maps.Pushpin(psli_g_MapCenter);
+	psli_g_Map.entities.clear();
+	psli_g_Map.entities.push(pin);
+	
+	psli_g_Map.setView({center: psli_g_MapCenter, zoom: psli_g_zoomInitial});	
+}
+
+function psli_AdminMapClick(e) {
+	if (e.targetType == "map") {
+		var psli_l_Point = new Microsoft.Maps.Point(e.getX(), e.getY());
+		psli_g_MapCenter = e.target.tryPixelToLocation(psli_l_Point);
+		psli_g_zoomInitial = Math.round(psli_g_Map.getZoom());
+		
+		document.getElementById("lat").value = psli_g_MapCenter.latitude;
+		document.getElementById("lon").value = psli_g_MapCenter.longitude;
+		document.getElementById("zoom").value = psli_g_zoomInitial;
+				
+		var pin = new Microsoft.Maps.Pushpin(psli_g_MapCenter);
+		psli_g_Map.entities.clear();
+		psli_g_Map.entities.push(pin);
+		
+		psli_g_Map.setView({center: psli_g_MapCenter, zoom: psli_g_zoomInitial});
+	}
+}
+
+function psli_InitAdminSetup () {
+	psli_g_MapOptions = { 
+		credentials: psli_g_BingKey, 
+		showDashboard:false,
+		showMapTypeSelector:false,
+		showScalebar:false,
+		mapTypeId: Microsoft.Maps.MapTypeId.road,
+		center: psli_g_MapCenter,
+		zoom: psli_g_zoomInitial
+	};
+	
+	psli_g_Map = new Microsoft.Maps.Map(document.getElementById("myMap"), psli_g_MapOptions);
+	Microsoft.Maps.Events.addHandler(psli_g_Map, "click", psli_AdminMapClick);
+	var pin = new Microsoft.Maps.Pushpin(psli_g_MapCenter);
+	psli_g_Map.entities.clear();
+	psli_g_Map.entities.push(pin);
+	psli_g_Map.setView({center: psli_g_MapCenter, zoom: psli_g_zoomInitial});
+}
+	
 /**************************************************************************/
 // JS Function used by admin script while editing category location	
Index: /extensions/Psli_BingMaps/include/admin.inc.php
===================================================================
--- /extensions/Psli_BingMaps/include/admin.inc.php	(revision 14890)
+++ /extensions/Psli_BingMaps/include/admin.inc.php	(revision 14891)
@@ -186,8 +186,9 @@
 			'PSLIBINGMAPSKEY' => $row['value'],
 			'PSLIBINGMAPSVIEW' => $initialView,
+			'JSPATH' => PSLI_BINGMAPS_JS
 		));
 		
 	// Language data
-	load_language('plugin.lang', PSLI_BINGMAPS_DIRECTORY);
+	load_language('plugin.lang', PSLI_BINGMAPS_TEMPLATE_PATH);
 }
 
@@ -198,5 +199,5 @@
  {
 	global $template;
-	$template->set_prefilter('categories', 'PSLIBINGMAPS_Category_Prefilter_1_1');
+	$template->set_prefilter('categories', 'PSLIBINGMAPS_Category_Prefilter_1_1a');
  }
 
@@ -205,5 +206,5 @@
 // Add fieldset with data for Psli-BingMaps plugin
 /********************************************************************************************/
-function PSLIBINGMAPS_Category_Prefilter_1_1($content, &$smarty)
+function PSLIBINGMAPS_Category_Prefilter_1_1a($content, &$smarty)
 {	
 	$search = '#name="reset">
@@ -319,5 +320,5 @@
 				</div>
 				<script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>			   		   
-				<script charset="UTF-8" type="text/javascript" src="./plugins/Psli-BingMaps/JS/Psli-BingMaps.js"></script>			   
+				<script charset="UTF-8" type="text/javascript" src="{$JSPATH}"></script>			   
 				<script>		
 				psli_g_BingKey = "{$PSLIBINGMAPSKEY}";
@@ -341,5 +342,5 @@
    array(
      'NAME'  => 'PSLI-BingMaps',
-     'URL'   => get_admin_plugin_menu_link(PSLI_BINGMAPS_DIRECTORY.'include/admin.php')
+     'URL'   => get_admin_plugin_menu_link(PSLI_BINGMAPS_ADMIN_PHP)
    )
  );
Index: /extensions/Psli_BingMaps/include/admin.php
===================================================================
--- /extensions/Psli_BingMaps/include/admin.php	(revision 14890)
+++ /extensions/Psli_BingMaps/include/admin.php	(revision 14891)
@@ -135,13 +135,14 @@
 	'LAT'          => $lat,
 	'LON'          => $lon,
-	'ZOOM'         => $zoom
+	'ZOOM'         => $zoom,
+	'JSPATH'	   => PSLI_BINGMAPS_JS
   )
 );
 
 // Language data
-load_language('plugin.lang', PSLI_BINGMAPS_DIRECTORY);
+load_language('plugin.lang', PSLI_BINGMAPS_TEMPLATE_PATH);
 
 // Assign the template contents to ADMIN_CONTENT
-$template->set_filenames(array('plugin_admin_content' => PSLI_BINGMAPS_DIRECTORY.'template/admin.tpl'));
+$template->set_filenames(array('plugin_admin_content' => PSLI_BINGMAPS_ADMIN_TPL));
 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
 
Index: /extensions/Psli_BingMaps/include/const.inc.php
===================================================================
--- /extensions/Psli_BingMaps/include/const.inc.php	(revision 14890)
+++ /extensions/Psli_BingMaps/include/const.inc.php	(revision 14891)
@@ -16,5 +16,4 @@
 
 // Define
-define('PSLI_BINGMAPS_DIRECTORY', dirname(__FILE__).'/../');
 define('PSLI_ENTITIES_TABLE' , $prefixeTable . 'psli_entities');
 define('PSLI_DATAPOINT_TABLE' , $prefixeTable . 'psli_datapoint');
@@ -27,5 +26,5 @@
 define('PSLI_CONF_VERSION_MIN', 'PsliBingMapsVerMin');
 define('PSLI_VERSION_MAJ', 1);
-define('PSLI_VERSION_MIN', 1);
+define('PSLI_VERSION_MIN', 2);
 
 ?>
Index: /extensions/Psli_BingMaps/include/guest.inc.php
===================================================================
--- /extensions/Psli_BingMaps/include/guest.inc.php	(revision 14890)
+++ /extensions/Psli_BingMaps/include/guest.inc.php	(revision 14891)
@@ -68,5 +68,5 @@
 	
 		// Language data
-		load_language('plugin.lang', PSLI_BINGMAPS_DIRECTORY);
+		load_language('plugin.lang', PSLI_BINGMAPS_TEMPLATE_PATH);
 		
 		$conf['psli_already_done'] = true;
@@ -79,5 +79,5 @@
 </div>
 <script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>			   
-<script charset="UTF-8" type="text/javascript" src="./plugins/Psli-BingMaps/JS/Psli-BingMaps.js"></script>			   
+<script charset="UTF-8" type="text/javascript" src="'.PSLI_BINGMAPS_JS.'"></script>			   
 <script>
 psli_g_BingKey = "'.$conf[PSLI_CONF_KEY].'";
Index: /extensions/Psli_BingMaps/include/version.inc.php
===================================================================
--- /extensions/Psli_BingMaps/include/version.inc.php	(revision 14890)
+++ /extensions/Psli_BingMaps/include/version.inc.php	(revision 14891)
@@ -43,3 +43,24 @@
 	$version_min = "1";
 }
+
+// from version 1.1
+if (($version_maj == "1") and ($version_min == "1"))
+{
+	// No differences between 1.1 and 1.2 except localization
+	// Just update version in configuration
+	$query = '
+		UPDATE '.CONFIG_TABLE.'
+			SET value = "' . PSLI_VERSION_MAJ . '"
+			WHERE param = "'.PSLI_CONF_VERSION_MAJ.'"
+			LIMIT 1';
+	pwg_query($query);
+	$query = '
+		UPDATE '.CONFIG_TABLE.'
+			SET value = "' . PSLI_VERSION_MIN . '"
+			WHERE param = "'.PSLI_CONF_VERSION_MIN.'"
+			LIMIT 2';
+	pwg_query($query);
+	$version_maj = PSLI_VERSION_MAJ;
+	$version_min = PSLI_VERSION_MIN;
+}
 ?>
Index: /extensions/Psli_BingMaps/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/Psli_BingMaps/language/en_UK/plugin.lang.php	(revision 14890)
+++ /extensions/Psli_BingMaps/language/en_UK/plugin.lang.php	(revision 14891)
@@ -1,4 +1,6 @@
 <?php
 
+$lang['Setup Helper'] = 'Use the map to set initial center position and zoom level of the map.';
+$lang['PointnClick Map'] = 'Point and Click map';
 $lang['Localisation - Plugin Psli-BingMaps'] = 'Localisation - Plugin Psli-BingMaps';
 $lang['Latitude'] = 'Latitude';
Index: /extensions/Psli_BingMaps/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Psli_BingMaps/language/fr_FR/plugin.lang.php	(revision 14890)
+++ /extensions/Psli_BingMaps/language/fr_FR/plugin.lang.php	(revision 14891)
@@ -1,4 +1,6 @@
 <?php
 
+$lang['Setup Helper'] = 'Utilisez la carte ci-dessous pour d&eacute;finir la position et le niveau de zoom initial de la carte.';
+$lang['PointnClick Map'] = 'Carte';
 $lang['Localisation - Plugin Psli-BingMaps'] = 'Localisation - Plugin Psli-BingMaps';
 $lang['Latitude'] = 'Latitude';
Index: /extensions/Psli_BingMaps/main.inc.php
===================================================================
--- /extensions/Psli_BingMaps/main.inc.php	(revision 14890)
+++ /extensions/Psli_BingMaps/main.inc.php	(revision 14891)
@@ -15,19 +15,31 @@
 // Chech whether we are indeed included by Piwigo.
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
- 
+
+// define Path for PHP and JS file
+define ('PSLI_BINGMAPS_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
+define ('PSLI_BINGMAPS_JS', PSLI_BINGMAPS_PATH.'JS/Psli-BingMaps.js');
+define ('PSLI_BINGMAPS_VERSION_INC_PHP', PSLI_BINGMAPS_PATH.'include/version.inc.php');
+define ('PSLI_BINGMAPS_ADMIN_INC_PHP', PSLI_BINGMAPS_PATH.'include/admin.inc.php');
+define ('PSLI_BINGMAPS_GUEST_INC_PHP', PSLI_BINGMAPS_PATH.'include/guest.inc.php');
+define ('PSLI_BINGMAPS_ADMIN_PHP', PSLI_BINGMAPS_PATH.'include/admin.php');
+
+// define Path for template file
+define('PSLI_BINGMAPS_TEMPLATE_PATH', dirname(__FILE__).'/');
+define ('PSLI_BINGMAPS_ADMIN_TPL', PSLI_BINGMAPS_TEMPLATE_PATH.'template/admin.tpl');
+
 // Include define data
 include_once(dirname(__FILE__).'/include/const.inc.php');
 
 // Check plugin update
-include_once(PSLI_BINGMAPS_DIRECTORY.'include/version.inc.php');
+include_once(PSLI_BINGMAPS_VERSION_INC_PHP);
 
 // Plugin for admin
 if (script_basename() == 'admin')   
 {
-  include_once(PSLI_BINGMAPS_DIRECTORY.'include/admin.inc.php');
+  include_once(PSLI_BINGMAPS_ADMIN_INC_PHP);
 }
 else
 {
-  include_once(PSLI_BINGMAPS_DIRECTORY.'include/guest.inc.php');
+  include_once(PSLI_BINGMAPS_GUEST_INC_PHP);
 }
 
Index: /extensions/Psli_BingMaps/template/admin.tpl
===================================================================
--- /extensions/Psli_BingMaps/template/admin.tpl	(revision 14890)
+++ /extensions/Psli_BingMaps/template/admin.tpl	(revision 14891)
@@ -11,5 +11,5 @@
 
 <fieldset>
-<legend>{'Configuration'|@translate}</legend>
+<legend>{'Configuration'|@translate}tatata</legend>
 <table style="width:100%;">
 	<colgroup>
@@ -23,13 +23,13 @@
   <tr>
     <td align="right">{'Center Latittude'|@translate} : &nbsp;&nbsp;</td>
-    <td><input type="text" size="30" maxlength="21" name="lat" value="{$LAT}"></td></td>
+    <td><input type="text" size="30" maxlength="21" name="lat" id="lat" value="{$LAT}" onChange="psli_AdminUpdateMap();" /></td></td>
   </tr>
   <tr>
     <td align="right">{'Center Longitude'|@translate} : &nbsp;&nbsp;</td>
-    <td><input type="text" size="30" maxlength="21" name="lon" value="{$LON}"></td></td>
+    <td><input type="text" size="30" maxlength="21" name="lon" id="lon" value="{$LON}" onChange="psli_AdminUpdateMap();" /></td></td>
   </tr>
   <tr>
     <td align="right">{'Zoom'|@translate} : &nbsp;&nbsp;</td>
-    <td><input type="text" size="10" maxlength="3" name="zoom" value="{$ZOOM}"></td></td>
+    <td><input type="text" size="10" maxlength="3" name="zoom" id="zoom" value="{$ZOOM}" onChange="psli_AdminUpdateMap();" /></td></td>
   </tr>
   <tr>
@@ -46,4 +46,24 @@
 </fieldset>
 
+<fieldset>
+<legend>{'PointnClick Map'|@translate}</legend>
+<table style="width:100%;">
+	<tr><td style="text-align:center;">{'Setup Helper'|@translate}</td></tr>
+	<tr>
+		<td>
+			<div id='myMap' style="position:relative; text-align:center; height:400px; margin:15px; border:2px solid white"></div>
+			<script charset="UTF-8" type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>			   
+			<script charset="UTF-8" type="text/javascript" src="{$JSPATH}"></script>			   
+			<script>
+				psli_g_BingKey = "{$KEY}";
+				psli_g_zoomInitial = {$ZOOM};
+				psli_g_MapCenter = new Microsoft.Maps.Location({$LAT}, {$LON});
+				
+				psli_InitAdminSetup();
+			</script>
+		</td>
+	</tr>
+</table>
+</fieldset>
 <p><input type="submit" name="submit" value="{'Submit'|@translate}"></p>
 
