Index: /extensions/GMaps/admin.php
===================================================================
--- /extensions/GMaps/admin.php	(revision 15345)
+++ /extensions/GMaps/admin.php	(revision 15345)
@@ -0,0 +1,62 @@
+<?php
+/* -----------------------------------------------------------------------------
+  Plugin     : GMaps
+  Author     : Grum
+    email    : grum@piwigo.org
+    website  : http://photos.grum.fr
+
+    << May the Little SpaceFrog be with you ! >>
+  ------------------------------------------------------------------------------
+  See main.inc.php for release information
+
+  --------------------------------------------------------------------------- */
+
+if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
+
+
+
+global $prefixeTable, $template;
+
+load_language('plugin.lang', GMAPS_PATH);
+
+$main_plugin_object = get_plugin_data($plugin_id);
+
+
+if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED))
+{
+  $config=Array();
+  GPCCore::loadConfig('gmaps', $config);
+
+
+  if($config['installed']!=GMAPS_VERSION2)
+  {
+    /* the plugin was updated without being deactivated
+     * deactivate + activate the plugin to process the database upgrade
+     */
+    include(GMAPS_PATH."gmaps_install.class.inc.php");
+    $gmaps=new GMaps_Install($prefixeTable, dirname(__FILE__));
+    $gmaps->deactivate();
+    $gmaps->activate();
+    $template->delete_compiled_templates();
+    //$config['newInstall']='n';
+  }
+
+  include(GMAPS_PATH."gmaps_aip.class.inc.php");
+  $plugin_aip = new GMaps_AIP($prefixeTable, $main_plugin_object->getFileLocation());
+}
+else
+{
+  /*
+   * plugin was upgraded, but GPC was not
+   * display a page to inform user to upgrade GPC
+   */
+  include(GMAPS_PATH."gmaps_aip_release.class.inc.php");
+  $plugin_aip = new GMaps_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation());
+}
+
+
+
+
+$plugin_aip->manage();
+
+?>
Index: /extensions/GMaps/admin/gmaps_category_maps.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_category_maps.tpl	(revision 15344)
+++ /extensions/GMaps/admin/gmaps_category_maps.tpl	(revision 15345)
@@ -1,7 +1,12 @@
-{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script  id="jquery.ui.sortable" path="themes/default/js/ui/minified/jquery.ui.sortable.min.js"}
-{combine_script  id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
-{combine_script  id="gpc.ui.iconSelector" path="plugins/GrumPluginClasses/js/ui.iconSelector.min.js" require="jquery"}
-{combine_script  id="gpc.ui.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.min.js" require="jquery"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.sortable" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.sortable.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
+{combine_script id="jquery.ui.slider" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.slider.js"}
+
+{combine_script  id="gpc.ui.iconSelector" path="plugins/GrumPluginClasses/js/ui.iconSelector.js" require="jquery.ui"}
+{combine_script  id="gpc.ui.categorySelector" path="plugins/GrumPluginClasses/js/ui.categorySelector.js" require="jquery.ui"}
 {combine_script  id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
 
Index: /extensions/GMaps/admin/gmaps_config.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_config.tpl	(revision 15344)
+++ /extensions/GMaps/admin/gmaps_config.tpl	(revision 15345)
@@ -1,4 +1,6 @@
-{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script  id="jquery.ui.slider" path="themes/default/js/ui/minified/jquery.ui.slider.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.slider" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.slider.js"}
 
 <h2>{'gmaps_config'|@translate}</h2>
Index: /extensions/GMaps/admin/gmaps_kmlfiles.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_kmlfiles.tpl	(revision 15344)
+++ /extensions/GMaps/admin/gmaps_kmlfiles.tpl	(revision 15345)
@@ -1,5 +1,9 @@
-{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script  id="jquery.ui.sortable" path="themes/default/js/ui/minified/jquery.ui.sortable.min.js"}
-{combine_script  id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.sortable" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.sortable.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
+{combine_script id="jquery.ui.slider" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.slider.js"}
 
 {literal}
Index: /extensions/GMaps/admin/gmaps_maps.tpl
===================================================================
--- /extensions/GMaps/admin/gmaps_maps.tpl	(revision 15344)
+++ /extensions/GMaps/admin/gmaps_maps.tpl	(revision 15345)
@@ -1,5 +1,10 @@
-{combine_script  id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script  id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
-{combine_script  id="jquery.ui.slider" path="themes/default/js/ui/minified/jquery.ui.slider.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.sortable" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.sortable.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
+{combine_script id="jquery.ui.slider" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.slider.js"}
+
 {combine_script  id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
 
Index: tensions/GMaps/admin/plugin_admin.php
===================================================================
--- /extensions/GMaps/admin/plugin_admin.php	(revision 15344)
+++ 	(revision )
@@ -1,62 +1,0 @@
-<?php
-/* -----------------------------------------------------------------------------
-  Plugin     : GMaps
-  Author     : Grum
-    email    : grum@piwigo.org
-    website  : http://photos.grum.fr
-
-    << May the Little SpaceFrog be with you ! >>
-  ------------------------------------------------------------------------------
-  See main.inc.php for release information
-
-  --------------------------------------------------------------------------- */
-
-if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
-
-
-
-global $prefixeTable, $template;
-
-load_language('plugin.lang', GMAPS_PATH);
-
-$main_plugin_object = get_plugin_data($plugin_id);
-
-
-if(CommonPlugin::checkGPCRelease(GMAPS_GPC_NEEDED))
-{
-  $config=Array();
-  GPCCore::loadConfig('gmaps', $config);
-
-
-  if($config['installed']!=GMAPS_VERSION2)
-  {
-    /* the plugin was updated without being deactivated
-     * deactivate + activate the plugin to process the database upgrade
-     */
-    include(GMAPS_PATH."gmaps_install.class.inc.php");
-    $gmaps=new GMaps_Install($prefixeTable, dirname(__FILE__));
-    $gmaps->deactivate();
-    $gmaps->activate();
-    $template->delete_compiled_templates();
-    //$config['newInstall']='n';
-  }
-
-  include(GMAPS_PATH."gmaps_aip.class.inc.php");
-  $plugin_aip = new GMaps_AIP($prefixeTable, $main_plugin_object->getFileLocation());
-}
-else
-{
-  /*
-   * plugin was upgraded, but GPC was not
-   * display a page to inform user to upgrade GPC
-   */
-  include(GMAPS_PATH."gmaps_aip_release.class.inc.php");
-  $plugin_aip = new GMaps_AIPRelease($prefixeTable, $main_plugin_object->getFileLocation());
-}
-
-
-
-
-$plugin_aip->manage();
-
-?>
Index: /extensions/GMaps/gmaps_aip.class.inc.php
===================================================================
--- /extensions/GMaps/gmaps_aip.class.inc.php	(revision 15344)
+++ /extensions/GMaps/gmaps_aip.class.inc.php	(revision 15345)
@@ -43,25 +43,25 @@
       $this->tabsheet->add('amd_warning',
                             l10n('gmaps_warning'),
-                            $this->getAdminLink()."&amp;fGMaps_tabsheet=amd_warning");
+                            $this->getAdminLink()."-amd_warning");
     }
     $this->tabsheet->add('maps',
                           l10n('gmaps_maps'),
-                          $this->getAdminLink()."&amp;fGMaps_tabsheet=maps");
+                          $this->getAdminLink()."-maps");
     $this->tabsheet->add('category_maps',
                           l10n('gmaps_associate_category_maps'),
-                          $this->getAdminLink()."&amp;fGMaps_tabsheet=category_maps");
+                          $this->getAdminLink()."-category_maps");
     $this->tabsheet->add('kml_files',
                           l10n('gmaps_kml_files_management'),
-                          $this->getAdminLink()."&amp;fGMaps_tabsheet=kml_files");
+                          $this->getAdminLink()."-kml_files");
     $this->tabsheet->add('search',
                           l10n('gmaps_search'),
-                          $this->getAdminLink()."&amp;fGMaps_tabsheet=search");
+                          $this->getAdminLink()."-search");
     $this->tabsheet->add('config',
                           l10n('gmaps_config'),
-                          $this->getAdminLink()."&amp;fGMaps_tabsheet=config");
+                          $this->getAdminLink()."-config");
 
 /*    $this->tabsheet->add('help',
                           l10n('gmaps_help'),
-                          $this->getAdminLink()."&amp;fGMaps_tabsheet=help");
+                          $this->getAdminLink()."-help");
 */
   }
@@ -80,5 +80,5 @@
     parent::initEvents();
 
-    if($_REQUEST['fGMaps_tabsheet']=='search')
+    if($_GET['tab']=='search')
     {
       // load request builder JS only on the search page
@@ -101,5 +101,5 @@
     $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/gmaps_admin.tpl");
 
-    switch($_REQUEST['fGMaps_tabsheet'])
+    switch($_GET['tab'])
     {
       case 'amd_warning':
@@ -126,5 +126,5 @@
     }
 
-    $this->tabsheet->select($_REQUEST['fGMaps_tabsheet']);
+    $this->tabsheet->select($_GET['tab']);
     $this->tabsheet->assign();
     $selected_tab=$this->tabsheet->get_selected();
@@ -132,5 +132,5 @@
 
     $template_plugin["GMAPS_VERSION"] = "<i>".$this->getPluginName()."</i> ".l10n('gmaps_release').GMAPS_VERSION;
-    $template_plugin["GMAPS_PAGE"] = $_REQUEST['fGMaps_tabsheet'];
+    $template_plugin["GMAPS_PAGE"] = $_GET['tab'];
     $template_plugin["GMAPS_TITLE"] = "";
 
@@ -161,25 +161,25 @@
     if(!isset($_REQUEST['errcode'])) $_REQUEST['errcode']='';
 
-    if(!isset($_REQUEST['fGMaps_tabsheet']))
+    if(!isset($_GET['tab']))
     {
       if($this->amdState!='advanced' )
       {
-        $_REQUEST['fGMaps_tabsheet']="amd_warning";
+        $_GET['tab']="amd_warning";
       }
       else
       {
-        $_REQUEST['fGMaps_tabsheet']="maps";
-      }
-    }
-
-    if(!($_REQUEST['fGMaps_tabsheet']!="maps" or
-         $_REQUEST['fGMaps_tabsheet']!="category_maps" or
-         $_REQUEST['fGMaps_tabsheet']!="amd_warning" or
-         $_REQUEST['fGMaps_tabsheet']!="kml_files" or
-         $_REQUEST['fGMaps_tabsheet']!="search"
-         //$_REQUEST['fGMaps_tabsheet']!="help"
-         )) $_REQUEST['fGMaps_tabsheet']="maps";
-
-    if($_REQUEST['fGMaps_tabsheet']=="amd_warning" and $this->amdState=='advanced') $_REQUEST['fGMaps_tabsheet']="maps";
+        $_GET['tab']="maps";
+      }
+    }
+
+    if(!($_GET['tab']!="maps" or
+         $_GET['tab']!="category_maps" or
+         $_GET['tab']!="amd_warning" or
+         $_GET['tab']!="kml_files" or
+         $_GET['tab']!="search"
+         //$_GET['tab']!="help"
+         )) $_GET['tab']="maps";
+
+    if($_GET['tab']=="amd_warning" and $this->amdState=='advanced') $_GET['tab']="maps";
   }
 
Index: /extensions/GMaps/gmaps_ajax.php
===================================================================
--- /extensions/GMaps/gmaps_ajax.php	(revision 15344)
+++ /extensions/GMaps/gmaps_ajax.php	(revision 15345)
@@ -21,5 +21,4 @@
   // in this case, PHPWG_ROOT_PATH must be declared as an absolute path...
   define('PHPWG_ROOT_PATH',dirname(dirname(dirname(__FILE__))).'/');
-
   /*
    * set ajax module in admin mode if request is used for admin interface
@@ -1200,5 +1199,5 @@
                    GROUP_CONCAT(DISTINCT IF(pct.permalink IS NULL, CONCAT('*', pct.id), pct.permalink) ORDER BY pct.id SEPARATOR ';') AS imageCatsPLink,
                    pit.name AS imageName,
-                   pit.path, pit.tn_ext
+                   pit.path
             FROM (((".$this->tables['cache']." pgc
                     LEFT JOIN ".IMAGE_CATEGORY_TABLE." pic ON pic.image_id = pgc.imageId)
@@ -1231,5 +1230,5 @@
         {
           $row['imageName']  =GPCCore::getUserLanguageDesc($row['imageName']);
-          $row['imageTnFile']=dirname($row['path']).'/'.$conf['dir_thumbnail'].'/'.$conf['prefix_thumbnail'].get_filename_wo_extension(basename($row['path'])).'.'.$row['tn_ext'];
+          $row['imageTnFile']=str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::thumb_url(array('id'=>$row['imageId'], 'path'=>$row['path'])));
           if(!$this->checkInGroup($row, $groups, $datas['distanceTreshold']))
           {
@@ -1265,15 +1264,16 @@
             {
               $tmpCatsNames[$key]=GPCCore::getUserLanguageDesc(substr($tmpCatsNames[$key],7));
-
-              $tmpCatsUrl[]=make_picture_url(
-                array(
-                  'image_id' => $point['imageId'],
-                  'category' => array(
-                    'id' => $id,
-                    'name' => $tmpCatsNames[$key],
-                    'permalink' => (substr($tmpCatsPLinks[$key],0,1)=='*')?'':$tmpCatsPLinks[$key],
+              $tmpCatsUrl[]=$this->replaceRoot(str_replace(PHPWG_ROOT_PATH, './',
+                make_picture_url(
+                  array(
+                    'image_id' => $point['imageId'],
+                    'category' => array(
+                      'id' => $id,
+                      'name' => $tmpCatsNames[$key],
+                      'permalink' => (substr($tmpCatsPLinks[$key],0,1)=='*')?'':$tmpCatsPLinks[$key],
+                    )
                   )
                 )
-              );
+              ));
             }
 
@@ -1285,5 +1285,5 @@
             $coords['lng']+=$point['longitude'];
 
-            $coords['imgTn'][]=$this->replaceImgRoot($point['imageTnFile']);
+            $coords['imgTn'][]=$this->replaceRoot($point['imageTnFile']);
             $coords['imgCatsNames'][]=$tmpCatsNames;
             $coords['imgName'][]=GPCCore::getUserLanguageDesc($point['imageName']);
@@ -1348,6 +1348,7 @@
     /**
      * replace the root directroy for image
-     *  => './galleries/' becomes "G"
-     *  => './upload/' becomes "U"
+     *  => './_data/i/galleries/' becomes "G"
+     *  => './i.php?/galleries/' becomes "I"
+     *  => './picture.php?/' becomes "P"
      *  => other case : no chnages
      *
@@ -1355,13 +1356,17 @@
      * @returned String :
      */
-    private function replaceImgRoot($value)
-    {
-      if(preg_match('/^\.\/galleries\//i', $value)>0)
-      {
-        return("G".substr($value,12));
-      }
-      elseif(preg_match('/^\.\/upload\//i', $value)>0)
-      {
-        return("U".substr($value,9));
+    private function replaceRoot($value)
+    {
+      if(preg_match('/^\.\/_data\/i\/galleries\//i', $value)>0)
+      {
+        return("G".substr($value,20));
+      }
+      if(preg_match('/^\.\/i\.php\?\/galleries\//i', $value)>0)
+      {
+        return("I".substr($value,19));
+      }
+      if(preg_match('/^\.\/picture\.php\?\//i', $value)>0)
+      {
+        return("P".substr($value,15));
       }
       return($value);
Index: /extensions/GMaps/gmaps_pip.class.inc.php
===================================================================
--- /extensions/GMaps/gmaps_pip.class.inc.php	(revision 15344)
+++ /extensions/GMaps/gmaps_pip.class.inc.php	(revision 15345)
@@ -126,7 +126,12 @@
       }
 
-      GPCCore::addHeaderJS("jquery", "themes/default/js/jquery.min.js");
+
+      GPCCore::addHeaderJS("jquery", "themes/default/js/jquery.js");
+      GPCCore::addHeaderJS("jquery.ui", "themes/default/js/ui/jquery.ui.core.js", array('jquery'));
+      GPCCore::addHeaderJS("jquery.ui.widget", "themes/default/js/ui/jquery.ui.widget.js", array('jquery.ui'));
+
       GPCCore::addHeaderJS("maps.google.com/api", "http://maps.google.com/maps/api/js?sensor=false");
-      GPCCore::addHeaderJS("gmaps.markup", "plugins/GMaps/js/gmapsMarkup".GPCCore::getMinified().".js", array('jquery'));
+      GPCCore::addHeaderJS('gmaps.infoWindow', GMAPS_PATH.'js/gmapsInfoWindow.js', array('jquery'));
+      GPCCore::addHeaderJS("gmaps.markup", "plugins/GMaps/js/gmapsMarkup.js", array('jquery'));
 
       $desc = preg_replace(
@@ -201,9 +206,18 @@
         "<script type=\"text/javascript\">
         var gmapsMarkup =
-          {
-            categoryId:".$page['category']['id'].",
-            maps:
-            [".implode(',', $scripts)."]
-          };
+              {
+                categoryId:".$page['category']['id'].",
+                maps:
+                [".implode(',', $scripts)."]
+              },
+            gmaps =
+              {
+                lang:{
+                  boundmap:'".l10n('gmaps_i_boundmap')."',
+                  boundkml:'".l10n('gmaps_i_boundkml')."',
+                  loading:'".l10n('gmaps_loading')."',
+                  gmaps_i_show_this_picture_in:'".l10n('gmaps_i_show_this_picture_in')."'
+                }
+              };
         </script>", false);
     }
@@ -315,6 +329,6 @@
 </script>", false);
 
-          GPCCore::addHeaderJS('gmaps.infoWindow', GMAPS_PATH.'js/gmapsInfoWindow'.GPCCore::getMinified().'.js', array('jquery'));
-          GPCCore::addHeaderJS('gmaps.category', GMAPS_PATH.'js/gmapsCategory'.GPCCore::getMinified().'.js', array('jquery', 'gmaps.infoWindow'));
+          GPCCore::addHeaderJS('gmaps.infoWindow', GMAPS_PATH.'js/gmapsInfoWindow.js', array('jquery'));
+          GPCCore::addHeaderJS('gmaps.category', GMAPS_PATH.'js/gmapsCategory.js', array('jquery', 'gmaps.infoWindow'));
         }
       }
Index: /extensions/GMaps/gmaps_version.inc.php
===================================================================
--- /extensions/GMaps/gmaps_version.inc.php	(revision 15344)
+++ /extensions/GMaps/gmaps_version.inc.php	(revision 15345)
@@ -15,7 +15,7 @@
   if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-  define('GMAPS_VERSION',  '1.3.2');
-  define('GMAPS_VERSION2', '01.03.02');
-  define('GMAPS_GPC_NEEDED', '3.5.1');
-  define('GMAPS_AMD_NEEDED', '0.6.0'); //advanced metadata plugin is needed
+  define('GMAPS_VERSION',  '1.4.0');
+  define('GMAPS_VERSION2', '01.04.00');
+  define('GMAPS_GPC_NEEDED', '3.5.2');
+  define('GMAPS_AMD_NEEDED', '0.7.0'); //advanced metadata plugin is needed
 ?>
Index: /extensions/GMaps/js/gmapsCategory.js
===================================================================
--- /extensions/GMaps/js/gmapsCategory.js	(revision 15344)
+++ /extensions/GMaps/js/gmapsCategory.js	(revision 15345)
@@ -208,15 +208,25 @@
       for(var index=0;index<marker.info.imgTn.length;index++)
       {
-        switch(marker.info.imgTn[index].charAt(0))
-        {
-          case 'G':
-            marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
-            break;
-          case 'U':
-            marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
-            break;
-        }
-      }
-    }
+        marker.info.imgTn[index]=replaceRoot(marker.info.imgTn[index]);
+      }
+    }
+  }
+
+  var replaceRoot=function(value)
+  {
+    var returned=value;
+    switch(value.charAt(0))
+    {
+      case 'G':
+        returned='./_data/i/galleries/'+value.substr(1);
+        break;
+      case 'I':
+        returned='./i.php?/galleries/'+value.substr(1);
+        break;
+      case 'P':
+        returned='./picture.php?/'+value.substr(1);
+        break;
+    }
+    return(returned);
   }
 
@@ -335,5 +345,5 @@
         function ()
         {
-          window.location=gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0];
+          window.location=replaceRoot(gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0]);
         }
       );
@@ -345,5 +355,5 @@
       {
         $('#ciGMIWC_showcatList')
-          .append('<li><a href="'+gmaps.currentInfo.imgCatsUrl[index][i]+'">'+gmaps.currentInfo.imgCatsNames[index][i]+'</a></li>');
+          .append('<li><a href="'+replaceRoot(gmaps.currentInfo.imgCatsUrl[index][i])+'">'+gmaps.currentInfo.imgCatsNames[index][i]+'</a></li>');
       }
       $('#ciGMIWC_img, #ciGMIWC_showcat')
Index: tensions/GMaps/js/gmapsCategory.min.js
===================================================================
--- /extensions/GMaps/js/gmapsCategory.min.js	(revision 15344)
+++ 	(revision )
@@ -1,2 +1,0 @@
-/* file: gmapsCategory.js - v1.2.2 | minified on 2011/09/23 with http://jscompress.com/ */
-function categoryMaps(){var a=[null,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:40,x:4,y:39}],b={width:-1,height:-1};this.createMap=function(b,c){var d=new google.maps.Map($("#"+b.id).get(0),{backgroundColor:"#ffffff",mapTypeId:b.mapType,zoom:b.zoomLevel,center:gmaps.bounds.getCenter(),navigationControl:b.navigationControl==-1?false:true,scrollwheel:b.navigationControl==-1?false:true,scaleControl:b.scaleControl=="n"?false:true,streetViewControl:b.streetViewControl=="n"?false:true,mapTypeControl:b.mapTypeControl==-1?false:true,mapTypeControlOptions:{style:b.mapTypeControl},markerTitle:""});if(b.kmlFileUrl!=""){kmlFile=new google.maps.KmlLayer(b.kmlFileUrl,{preserveViewport:true});kmlFile.setMap(d)}else{kmlFile=null}re=/^mS(\d\d)_.*/i;iM=re.exec(b.markerImg);if(iM!=null)iM=new Number(iM[1]);if(iM!=null){d.markerImg=new google.maps.MarkerImage("plugins/GMaps/img/"+b.markerImg,new google.maps.Size(a[iM].w,a[iM].h),new google.maps.Point(0,0),new google.maps.Point(a[iM].x,a[iM].y))}else{d.markerImg=null}d.kmlFile=kmlFile;d.markers=new Array;d.gmapsIndex=c;d.viewportInitialized=false;d.callId=0;b.gMap=d};this.loadMarkers=function(a){var b=this;a.callId++;datas={requestId:gmaps.requestId,callId:a.callId,bounds:{north:a.getBounds().getNorthEast().lat(),east:a.getBounds().getNorthEast().lng(),south:a.getBounds().getSouthWest().lat(),west:a.getBounds().getSouthWest().lng()},width:$(a.getDiv()).width(),height:$(a.getDiv()).height(),distanceTreshold:20,loadIndex:a.gmapsIndex};$("#gmapsLoading").css("display","inline-block");$("#gmapsNbPhotos").html("");$.ajax({type:"POST",url:"plugins/GMaps/gmaps_ajax.php",async:true,data:{ajaxfct:"public.maps.getMarkers",datas:datas},success:function(a){tmp=$.parseJSON(a);if(gmaps.maps[tmp.loadIndex].gMap.callId==tmp.callId){tmp.markers.sort(c);b.applyMarkers(gmaps.maps[tmp.loadIndex].gMap,tmp.markers);$("#gmapsLoading").css("display","none");$("#gmapsNbPhotos").html("["+tmp.datas.nbPhotos+"]")}}})};this.applyMarkers=function(a,b){var c=this;if(a.markers.length>0){var d=0;while(d<a.markers.length){newListIndex=this.markerInList(a.markers[d].uId,b);if(newListIndex==-1){a.markers[d].marker.setMap(null);a.markers.splice(d,1)}else{b.splice(newListIndex,1);d++}}}for(var d=0;d<b.length;d++){var e=new google.maps.Marker({position:new google.maps.LatLng(b[d].lat,b[d].lng),map:a,title:b[d].nbImgTxt});if(a.markerImg!=null)e.setIcon(a.markerImg);e.info=b[d];e.info.displayed=0;a.markers.push({marker:e,uId:b[d].uId});google.maps.event.addListener(e,"click",function(){c.displayWindowInfo(this)});for(var f=0;f<e.info.imgTn.length;f++){switch(e.info.imgTn[f].charAt(0)){case"G":e.info.imgTn[f]="./galleries/"+e.info.imgTn[f].substr(1);break;case"U":e.info.imgTn[f]="./upload/"+e.info.imgTn[f].substr(1);break}}}};var c=function(a,b){if(a.uId<b.uId){return-1}else if(a.uId<b.uId){return 1}return 0};this.markerInList=function(a,b){for(var c=0;c<b.length;c++){if(b[c].uId==a)return c}return-1};this.displayWindowInfo=function(a){var c=this;if(gmapsMM!=null&&gmapsMM instanceof markupMaps)gmapsMM.closePictureInfo();b.width=-1;b.width=-1;gmaps.currentMarker=a;gmaps.currentInfo=a.info;gmaps.infoWindow.close();gmaps.infoWindow.setContent($("#iGMapsInfoWindowContent").clone().each(d).get(0));gmaps.infoWindow.open(a.map,a);$("#ciWALeft, #ciWARight").unbind("click");$("#ciWARight").bind("click",function(a){c.displayPictureNext()});$("#ciWALeft").bind("click",function(a){c.displayPicturePrev()});this.displayPictureInfo(gmaps.currentInfo.displayed)};var d=function(a,b){if(b.id!="")b.id="c"+b.id;$(b).children().each(d)};this.closePictureInfo=function(){gmaps.currentMarker=null;gmaps.currentInfo=null;gmaps.infoWindow.setContent("");gmaps.infoWindow.close();$("#ciGMIWC_img").unbind("click");$("#ciWALeft, #ciWARight").unbind("click")};this.displayPictureInfo=function(a){var b=a,c=this;gmaps.currentInfo.displayed=a;if(gmaps.currentInfo.imgName[a]==""){$("#ciGMIWC_title").html(" ")}else{$("#ciGMIWC_title").html(gmaps.currentInfo.imgName[a])}$("#ciGMIWC_img").attr("src",gmaps.currentInfo.imgTn[a]).bind("load",function(a){});$("#ciGMIWC_img").unbind("click");if(gmaps.currentInfo.imgCatsUrl[a].length==1){$("#ciGMIWC_img").bind("click",function(){window.location=gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0]})}else{$("#ciGMIWC_showcatList").html("");for(var d=0;d<gmaps.currentInfo.imgCatsUrl[a].length;d++){$("#ciGMIWC_showcatList").append('<li><a href="'+gmaps.currentInfo.imgCatsUrl[a][d]+'">'+gmaps.currentInfo.imgCatsNames[a][d]+"</a></li>")}$("#ciGMIWC_img, #ciGMIWC_showcat").bind("mouseenter",function(){$("#ciGMIWC_showcat").css("display","block")}).bind("mouseleave",function(){$("#ciGMIWC_showcat").css("display","none")})}if(gmaps.currentInfo.nbImg>1){$("#ciGMIWC_picnum").html(a+1+"/"+gmaps.currentInfo.nbImgTxt);$("#ciWALeft, #ciWARight").css("display","inline-block")}else{$("#ciGMIWC_picnum").html(gmaps.currentInfo.nbImgTxt);$("#ciWALeft, #ciWARight").css("display","none")}};this.displayPicturePrev=function(){gmaps.currentInfo.displayed--;if(gmaps.currentInfo.displayed<0)gmaps.currentInfo.displayed=gmaps.currentInfo.nbImg-1;this.displayPictureInfo(gmaps.currentInfo.displayed)};this.displayPictureNext=function(){gmaps.currentInfo.displayed++;if(gmaps.currentInfo.displayed>=gmaps.currentInfo.nbImg)gmaps.currentInfo.displayed=0;this.displayPictureInfo(gmaps.currentInfo.displayed)};this.fitToBounds=function(a,b){gmaps.maps[b].gMap.fitBounds(a);if(gmaps.maps[b].zoomLevelMaxActivated&&gmaps.maps[b].gMap.getZoom()>gmaps.maps[b].zoomLevel){gmaps.maps[b].gMap.setZoom(gmaps.maps[b].zoomLevel)}};this.initializeMapViewport=function(a,b){var c=this;if(b>-1&&($("#"+gmaps.maps[b].id+"Content").dialog("isOpen")&&a=="loaded"||a=="open")&&gmaps.maps[b].gMap.viewportInitialized==false){google.maps.event.trigger(gmaps.maps[b].gMap,"resize");$("#"+gmaps.maps[b].id+" span, #"+gmaps.maps[b].id+" a").css("font-size","55.0%");if(gmaps.geolocated){if(gmaps.maps[b].fitToBounds){this.fitToBounds(gmaps.bounds,b)}else{gmaps.maps[b].gMap.setCenter(gmaps.bounds.getCenter())}}else{this.fitToBounds(gmaps.maps[b].gMap.kmlFile.getDefaultViewport(),b)}google.maps.event.addListener(gmaps.maps[b].gMap,"dragend",function(){c.loadMarkers(this);$("#gmapsBoundMap").css("display","inline");$("#gmapsBoundKml").css("display","inline")});google.maps.event.addListener(gmaps.maps[b].gMap,"zoom_changed",function(){c.loadMarkers(this);gmaps.infoWindow.close();$("#gmapsBoundMap").css("display","inline");$("#gmapsBoundKml").css("display","inline")});gmaps.maps[b].gMap.viewportInitialized=true;this.loadMarkers(gmaps.maps[b].gMap)}}}var gmapsCM=null,gmapsMM=null;$(window).load(function(){gmapsCM=new categoryMaps;initInfoWindow();gmaps.currentInfo=null;gmaps.currentMarker=null;gmaps.bounds=new google.maps.LatLngBounds(new google.maps.LatLng(gmaps.bounds.south,gmaps.bounds.west),new google.maps.LatLng(gmaps.bounds.north,gmaps.bounds.east));gmaps.infoWindow=new google.maps.InfoWindow;google.maps.event.addListener(gmaps.infoWindow,"closeclick",function(){gmaps.infoWindow.setContent("");$("#ciGMIWC_img").unbind("click")});for(var a=0;a<gmaps.maps.length;a++){gmapsCM.createMap(gmaps.maps[a],a);if(gmaps.maps[a].sizeMode=="A"){$("#"+gmaps.maps[a].id).css({width:$(window).width()*gmaps.popupAutomaticSize+"px",height:$(window).height()*gmaps.popupAutomaticSize+"px"})}$("#"+gmaps.maps[a].id+"Content").dialog({autoOpen:false,width:$("#"+gmaps.maps[a].id).width(),height:"auto",modal:true,closeText:"X",dialogClass:"gmapsPopup",title:gmaps.maps[a].title,open:function(){$.ajax({type:"POST",url:"plugins/GMaps/gmaps_ajax.php",async:true,data:{ajaxfct:"public.maps.init",category:gmaps.categoryId,mapId:"n"},success:function(a){gmaps.requestId=a;for(var b=0;b<gmaps.maps.length;b++){gmapsCM.initializeMapViewport("loaded",b)}}})}}).data("index",a);if(gmaps.geolocated){$("div.gmapsPopup div.ui-dialog-titlebar").append('<a href="#" id="gmapsBoundMap" style="display:none;"><span>∴</span></a>');$("#gmapsBoundMap").attr("title",gmaps.lang.boundmap).bind("click",a,function(a){gmapsCM.fitToBounds(gmaps.bounds,a.data);$(this).css("display","none").blur();return false})}if(gmaps.maps[a].gMap.kmlFile!=null){$("div.gmapsPopup div.ui-dialog-titlebar").append('<a href="#" id="gmapsBoundKml"><span>∼</span></a>');$("#gmapsBoundKml").attr("title",gmaps.lang.boundkml).bind("click",a,function(a){gmapsCM.fitToBounds(gmaps.maps[a.data].gMap.kmlFile.getDefaultViewport(),a.data);$(this).css("display","none").blur();return false})}$("div.gmapsPopup div.ui-dialog-titlebar").append('<span id="gmapsLoading" style="display:none;"><img src="./plugins/GrumPluginClasses/icons/processing.gif"><span>'+gmaps.lang.loading+"</span></span>");$("#ui-dialog-title-iGMapsIconContent").append('<span id="gmapsNbPhotos"></span>')}})
Index: tensions/GMaps/js/gmapsInfoWindow.min.js
===================================================================
--- /extensions/GMaps/js/gmapsInfoWindow.min.js	(revision 15344)
+++ 	(revision )
@@ -1,2 +1,0 @@
-/* file: gmapsInfoWindow.js - v1.0.0 | minified on 2011/09/23 with http://jscompress.com/ */
-function initInfoWindow(){if($("#iGMapsInfoWindow").length==0){$("body").append($("<div/>",{id:"iGMapsInfoWindow",css:{display:"none"}}).append($("<div/>",{id:"iGMapsInfoWindowContent"}).append($("<div/>",{id:"iGMIWC_title",html:"(title)"})).append($("<table/>",{id:"iGMIWC_thumb"}).append($("<tr/>").append($("<td/>",{css:{width:"28px"}}).append($('<div id="iWALeft"/>'))).append($("<td/>").append($("<img/>",{id:"iGMIWC_img",src:""}))).append($("<td/>",{css:{width:"28px"}}).append($('<div id="iWARight">'))))).append($("<div/>",{id:"iGMIWC_picnum",html:"0/0 photo"})).append($("<div/>",{id:"iGMIWC_showcat",css:{display:"none"}}).append($("<span/>",{html:gmaps.lang.gmaps_i_show_this_picture_in})).append($("<ul/>",{id:"iGMIWC_showcatList"})))))}}
Index: /extensions/GMaps/js/gmapsMarkup.js
===================================================================
--- /extensions/GMaps/js/gmapsMarkup.js	(revision 15344)
+++ /extensions/GMaps/js/gmapsMarkup.js	(revision 15345)
@@ -237,16 +237,26 @@
       for(var index=0;index<marker.info.imgTn.length;index++)
       {
-        switch(marker.info.imgTn[index].charAt(0))
-        {
-          case 'G':
-            marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
-            break;
-          case 'U':
-            marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
-            break;
-        }
-      }
-    }
-  };
+        marker.info.imgTn[index]=replaceRoot(marker.info.imgTn[index]);
+      }
+    }
+  };
+
+  var replaceRoot=function(value)
+  {
+    var returned=value;
+    switch(value.charAt(0))
+    {
+      case 'G':
+        returned='./_data/i/galleries/'+value.substr(1);
+        break;
+      case 'I':
+        returned='./i.php?/galleries/'+value.substr(1);
+        break;
+      case 'P':
+        returned='./picture.php?/'+value.substr(1);
+        break;
+    }
+    return(returned);
+  }
 
   var compareMarkers=function(m1,m2)
@@ -343,5 +353,5 @@
         function ()
         {
-          window.location=gmapsMarkup.currentInfo.imgCatsUrl[gmapsMarkup.currentInfo.displayed][0];
+          window.location=replaceRoot(gmapsMarkup.currentInfo.imgCatsUrl[gmapsMarkup.currentInfo.displayed][0]);
         }
       );
@@ -353,5 +363,5 @@
       {
         $('#ciGMIWC_showcatList')
-          .append('<li><a href="'+gmapsMarkup.currentInfo.imgCatsUrl[index][i]+'">'+gmapsMarkup.currentInfo.imgCatsNames[index][i]+'</a></li>');
+          .append('<li><a href="'+replaceRoot(gmapsMarkup.currentInfo.imgCatsUrl[index][i])+'">'+gmapsMarkup.currentInfo.imgCatsNames[index][i]+'</a></li>');
       }
       $('#ciGMIWC_img, #ciGMIWC_showcat')
@@ -462,4 +472,6 @@
   function ()
   {
+    initInfoWindow();
+
     gmapsMM=new markupMaps();
 
Index: tensions/GMaps/js/gmapsMarkup.min.js
===================================================================
--- /extensions/GMaps/js/gmapsMarkup.min.js	(revision 15344)
+++ 	(revision )
@@ -1,2 +1,0 @@
-/* file: gmapsMarkup.js - v1.1.2 | minified on 2011/09/23 with http://jscompress.com/ */
-function markupMaps(){var a=[null,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:40,x:4,y:39}];this.createMap=function(b,c){var d=new google.maps.LatLngBounds(new google.maps.LatLng(b.mapBounds.south,b.mapBounds.west),new google.maps.LatLng(b.mapBounds.north,b.mapBounds.east)),e=new google.maps.Map($("#"+b.id).get(0),{backgroundColor:"#ffffff",mapTypeId:b.mapType,zoom:b.zoomLevel,center:d.getCenter(),navigationControl:b.navigationControl==-1?false:true,scrollwheel:b.navigationControl==-1?false:true,scaleControl:b.scaleControl=="n"?false:true,streetViewControl:b.streetViewControl=="n"?false:true,mapTypeControl:b.mapTypeControl==-1?false:true,mapTypeControlOptions:{style:b.mapTypeControl},markerTitle:""});if(b.kmlFileUrl!=""){kmlFile=new google.maps.KmlLayer(b.kmlFileUrl,{preserveViewport:true});kmlFile.setMap(e)}else{kmlFile=null}re=/^mS(\d\d)_.*/i;iM=re.exec(b.markerImg);if(iM!=null)iM=new Number(iM[1]);if(iM!=null){e.markerImg=new google.maps.MarkerImage("plugins/GMaps/img/"+b.markerImg,new google.maps.Size(a[iM].w,a[iM].h),new google.maps.Point(0,0),new google.maps.Point(a[iM].x,a[iM].y))}else{e.markerImg=null}e.bounds=d;e.kmlFile=kmlFile;e.markers=new Array;e.gmapsIndex=c;e.width=b.width;e.height=b.height;e.callId=0;e.allowBubble=b.allowBubble;e.initialized=false;b.gMap=e;if(b.geolocated){if(b.fitToBounds){this.fitToBounds(e.bounds,c)}else{e.setCenter(e.bounds.getCenter())}}if(b.markerVisible){this.loadMarkers(e)}else{this.initializeMapViewport(c)}};this.loadMarkers=function(a){var c=this;if(a.getBounds()==null)return false;a.callId++;datas={requestId:gmapsMarkup.requestId,callId:a.callId,bounds:{north:a.getBounds().getNorthEast().lat(),east:a.getBounds().getNorthEast().lng(),south:a.getBounds().getSouthWest().lat(),west:a.getBounds().getSouthWest().lng()},width:a.width,height:a.height,distanceTreshold:20,loadIndex:a.gmapsIndex};$.ajax({type:"POST",url:"plugins/GMaps/gmaps_ajax.php",async:true,data:{ajaxfct:"public.maps.getMarkers",datas:datas},success:function(a){tmp=$.parseJSON(a);if(gmapsMarkup.maps[tmp.loadIndex].gMap.callId==tmp.callId){tmp.markers.sort(b);c.applyMarkers(gmapsMarkup.maps[tmp.loadIndex].gMap,tmp.markers);c.initializeMapViewport(tmp.loadIndex)}}})};this.applyMarkers=function(a,b){if(a==null)return false;if(a.markers.length>0){var c=0;while(c<a.markers.length){newListIndex=this.markerInList(a.markers[c].uId,b);if(newListIndex==-1){a.markers[c].marker.setMap(null);a.markers.splice(c,1)}else{b.splice(newListIndex,1);c++}}}for(var c=0;c<b.length;c++){var d=this,e=new google.maps.Marker({position:new google.maps.LatLng(b[c].lat,b[c].lng),map:a,title:b[c].nbImgTxt});if(a.markerImg!=null)e.setIcon(a.markerImg);e.info=b[c];e.info.displayed=0;a.markers.push({marker:e,uId:b[c].uId});if(a.allowBubble){google.maps.event.addListener(e,"click",function(){d.displayWindowInfo(this)})}for(var f=0;f<e.info.imgTn.length;f++){switch(e.info.imgTn[f].charAt(0)){case"G":e.info.imgTn[f]="./galleries/"+e.info.imgTn[f].substr(1);break;case"U":e.info.imgTn[f]="./upload/"+e.info.imgTn[f].substr(1);break}}}};var b=function(a,b){if(a.uId<b.uId){return-1}else if(a.uId<b.uId){return 1}return 0};this.markerInList=function(a,b){for(var c=0;c<b.length;c++){if(b[c].uId==a)return c}return-1};this.displayWindowInfo=function(a){if(gmapsCM&&gmapsCM instanceof categoryMaps)gmapsCM.closePictureInfo();gmapsMarkup.currentInfo=a.info;gmapsMarkup.infoWindow.close();gmapsMarkup.infoWindow.setContent($("#iGMapsInfoWindowContent").clone().each(c).get(0));gmapsMarkup.infoWindow.open(a.map,a);$("#ciWALeft, #ciWARight").unbind("click");$("#ciWARight").bind("click",function(a){__this.displayPictureNext()});$("#ciWALeft").bind("click",function(a){__this.displayPicturePrev()});this.displayPictureInfo(gmapsMarkup.currentInfo.displayed)};var c=function(a,b){if(b.id!="")b.id="c"+b.id;$(b).children().each(c)};this.closePictureInfo=function(){gmapsMarkup.currentInfo=null;gmapsMarkup.infoWindow.setContent("");gmapsMarkup.infoWindow.close();$("#ciWALeft, #ciWARight").unbind("click")};this.displayPictureInfo=function(a){var b=this;$("#ciWALeft,#ciWARight").unbind("click");$("#ciWARight").bind("click",function(a){b.displayPictureNext()});$("#ciWALeft").bind("click",function(a){b.displayPicturePrev()});gmapsMarkup.currentInfo.displayed=a;if(gmapsMarkup.currentInfo.imgName[a]==""){$("#ciGMIWC_title").html(" ")}else{$("#ciGMIWC_title").html(gmapsMarkup.currentInfo.imgName[a])}$("#ciGMIWC_img").attr("src",gmapsMarkup.currentInfo.imgTn[a]);$("#ciGMIWC_img").unbind();if(gmapsMarkup.currentInfo.imgCatsUrl[a].length==1){$("#ciGMIWC_img").bind("click",function(){window.location=gmapsMarkup.currentInfo.imgCatsUrl[gmapsMarkup.currentInfo.displayed][0]})}else{$("#ciGMIWC_showcatList").html("");for(var c=0;c<gmapsMarkup.currentInfo.imgCatsUrl[a].length;c++){$("#ciGMIWC_showcatList").append('<li><a href="'+gmapsMarkup.currentInfo.imgCatsUrl[a][c]+'">'+gmapsMarkup.currentInfo.imgCatsNames[a][c]+"</a></li>")}$("#ciGMIWC_img, #ciGMIWC_showcat").bind("mouseenter",function(){$("#ciGMIWC_showcat").css("display","block")}).bind("mouseleave",function(){$("#ciGMIWC_showcat").css("display","none")})}if(gmapsMarkup.currentInfo.nbImg>1){$("#ciGMIWC_picnum").html(a+1+"/"+gmapsMarkup.currentInfo.nbImgTxt);$("#ciWALeft, #ciWARight").css("display","inline-block")}else{$("#ciGMIWC_picnum").html(gmapsMarkup.currentInfo.nbImgTxt);$("#ciWALeft, #ciWARight").css("display","none")}};this.displayPicturePrev=function(){gmapsMarkup.currentInfo.displayed--;if(gmapsMarkup.currentInfo.displayed<0)gmapsMarkup.currentInfo.displayed=gmapsMarkup.currentInfo.nbImg-1;this.displayPictureInfo(gmapsMarkup.currentInfo.displayed)};this.displayPictureNext=function(){gmapsMarkup.currentInfo.displayed++;if(gmapsMarkup.currentInfo.displayed>=gmapsMarkup.currentInfo.nbImg)gmapsMarkup.currentInfo.displayed=0;this.displayPictureInfo(gmapsMarkup.currentInfo.displayed)};this.fitToBounds=function(a,b){gmapsMarkup.maps[b].gMap.fitBounds(a);if(gmapsMarkup.maps[b].zoomLevelMaxActivated&&gmapsMarkup.maps[b].gMap.getZoom()>gmapsMarkup.maps[b].zoomLevel){gmapsMarkup.maps[b].gMap.setZoom(gmapsMarkup.maps[b].zoomLevel)}};this.initializeMapViewport=function(a){var b=this;if(a>-1&&!gmapsMarkup.maps[a].gMap.initialized){$("#"+gmapsMarkup.maps[a].id+" span, #"+gmapsMarkup.maps[a].id+" a").css("font-size","55.0%");if(gmapsMarkup.maps[a].markerVisible){google.maps.event.addListener(gmapsMarkup.maps[a].gMap,"dragend",function(){b.loadMarkers(this)});google.maps.event.addListener(gmapsMarkup.maps[a].gMap,"zoom_changed",function(){b.loadMarkers(this);gmapsMarkup.infoWindow.close()})}if(gmapsMarkup.maps[a].kmlZoom&&gmapsMarkup.maps[a].gMap.kmlFile!=null){google.maps.event.addListenerOnce(gmapsMarkup.maps[a].gMap.kmlFile,"defaultviewport_changed",function(){b.fitToBounds(gmapsMarkup.maps[a].gMap.kmlFile.getDefaultViewport(),a)})}gmapsMarkup.maps[a].gMap.initialized=true}}}var gmapsCM=null,gmapsMM=null;$(window).load(function(){gmapsMM=new markupMaps;gmapsMarkup.currentInfo=null;gmapsMarkup.infoWindow=new google.maps.InfoWindow;google.maps.event.addListener(gmapsMarkup.infoWindow,"closeclick",function(){gmapsMarkup.infoWindow.setContent("");$("#ciGMIWC_img").unbind()});$.ajax({type:"POST",url:"plugins/GMaps/gmaps_ajax.php",async:true,data:{ajaxfct:"public.maps.init",category:gmapsMarkup.categoryId,mapId:"y"},success:function(a){gmapsMarkup.requestId=a;for(var b=0;b<gmapsMarkup.maps.length;b++){$("#"+gmapsMarkup.maps[b].id).css({width:gmapsMarkup.maps[b].width+"px",height:gmapsMarkup.maps[b].height+"px"});gmapsMM.createMap(gmapsMarkup.maps[b],b)}}})})
Index: tensions/GMaps/js/gmapsPicture.min.js
===================================================================
--- /extensions/GMaps/js/gmapsPicture.min.js	(revision 15344)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/* file: gmapsPicture.js - v1.1.1 | minified on 2011/04/21 with http://jscompress.com/ */
-var viewportInitialized={icon:false,meta:false},markerImgProp=[null,{w:32,h:32,x:15,y:31},{w:32,h:32,x:15,y:31},{w:32,h:32,x:10,y:31},{w:30,h:40,x:4,y:39}];function applyMap(properties)
-{var latlng=new google.maps.LatLng(gmaps.coords.latitude,gmaps.coords.longitude),map=new google.maps.Map($("#"+properties.id).get(0),{mapTypeId:properties.mapType,zoom:properties.zoomLevel,center:latlng,navigationControl:(properties.navigationControl==-1)?false:true,scrollwheel:(properties.navigationControl==-1)?false:true,scaleControl:(properties.scaleControl=='n')?false:true,streetViewControl:(properties.streetViewControl=='n')?false:true,mapTypeControl:(properties.mapTypeControl==-1)?false:true,mapTypeControlOptions:{style:properties.mapTypeControl},markerTitle:''}),marker=null;if(gmaps.geolocated)
-{marker=new google.maps.Marker({position:latlng,map:map,title:properties.markerTitle});}
-re=/^mS(\d\d)_.*/i;iM=re.exec(properties.markerImg);if(iM!=null)iM=new Number(iM[1]);if(iM!=null&&marker!=null)
-{var markerImg=new google.maps.MarkerImage('plugins/GMaps/img/'+properties.markerImg,new google.maps.Size(markerImgProp[iM].w,markerImgProp[iM].h),new google.maps.Point(0,0),new google.maps.Point(markerImgProp[iM].x,markerImgProp[iM].y));marker.setIcon(markerImg);}
-if(properties.kmlFileUrl!='')
-{kmlFile=new google.maps.KmlLayer(properties.kmlFileUrl,{preserveViewport:true});}
-else
-{kmlFile=null;}
-map.kmlFile=kmlFile;properties.gMap=map;properties.gMapCenter=latlng;}
-function centerMap(map)
-{if(gmaps.geolocated)
-{map.gMap.setCenter(map.gMapCenter);}
-else
-{fitKmlBounds(map);}}
-function fitKmlBounds(map)
-{if(map.gMap!=null)map.gMap.fitBounds(map.gMap.kmlFile.getDefaultViewport());}
-$(window).load(function()
-{gmaps.popupMapIndex=-1;for(i=0;i<gmaps.maps.length;i++)
-{applyMap(gmaps.maps[i]);gmaps.maps[i].gMap.setCenter(gmaps.maps[i].gMapCenter);$('#'+gmaps.maps[i].id+' span, #'+gmaps.maps[i].id+' a').css('font-size','55.0%');if(gmaps.maps[i].gMap.kmlFile!=null)
-gmaps.maps[i].gMap.kmlFile.setMap(gmaps.maps[i].gMap);if(gmaps.maps[i].displayType=='IP')
-{gmaps.popupMapIndex=i;if(gmaps.maps[i].sizeMode=='A')
-{$('#iGMapsIcon').css({width:($(window).width()*gmaps.popupAutomaticSize)+'px',height:($(window).height()*gmaps.popupAutomaticSize)+'px'});}}}
-if($('#iGMapContent').length>0)
-{tabId=$('#iGMapContent').get(0).parentNode.parentNode.id;tabId='tab'+tabId.toUpperCase().substring(0,1)+tabId.substr(1);$("#"+tabId+" a").bind('click',function()
-{if(viewportInitialized.meta==false)
-{for(i=0;i<gmaps.maps.length;i++)
-{if(gmaps.maps[i].displayType=='MP')
-{google.maps.event.trigger(gmaps.maps[i].gMap,'resize');centerMap(gmaps.maps[i]);$('#'+gmaps.maps[i].id+' span, #'+gmaps.maps[i].id+' a').css('font-size','55.0%');}}
-viewportInitialized.meta=true;}});}
-if($('#iGMapsIconContent').length>0)
-{$('#iGMapsIconContent').dialog({autoOpen:false,width:$('#iGMapsIcon').width(),height:'auto',modal:true,closeText:'X',dialogClass:'gmapsPopup',title:gmaps.maps[gmaps.popupMapIndex].title,open:function()
-{if(viewportInitialized.icon==false&&gmaps.popupMapIndex!=-1)
-{if(gmaps.maps[gmaps.popupMapIndex].gMap.kmlFile!=null)
-gmaps.maps[gmaps.popupMapIndex].gMap.kmlFile.setMap(gmaps.maps[gmaps.popupMapIndex].gMap);google.maps.event.trigger(gmaps.maps[gmaps.popupMapIndex].gMap,'resize');centerMap(gmaps.maps[gmaps.popupMapIndex]);$('#iGMapsIcon span, #iGMapsIcon a').css('font-size','55.0%');viewportInitialized.icon=true;}
-google.maps.event.addListener(gmaps.maps[gmaps.popupMapIndex].gMap,'dragend',function()
-{$('#gmapsCenterMap').css('display','inline');$('#gmapsBoundKml').css('display','inline');});google.maps.event.addListener(gmaps.maps[gmaps.popupMapIndex].gMap,'zoom_changed',function()
-{$('#gmapsCenterMap').css('display','inline');$('#gmapsBoundKml').css('display','inline');});}});if(gmaps.geolocated)
-{$('div.gmapsPopup div.ui-dialog-titlebar').append('<a href="#" id="gmapsCenterMap" style="display:none;" onclick="centerMap(gmaps.maps[gmaps.popupMapIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+'<span>•</span></a>');$('#gmapsCenterMap').attr('title',gmaps.lang.centermap);}
-if(gmaps.maps[gmaps.popupMapIndex].gMap.kmlFile!=null)
-{$('div.gmapsPopup div.ui-dialog-titlebar').append('<a href="#" id="gmapsBoundKml" onclick="fitKmlBounds(gmaps.maps[gmaps.popupMapIndex]); $(this).css(\'display\', \'none\').blur(); return(false);">'+'<span>∼</span></a>');$('#gmapsBoundKml').attr('title',gmaps.lang.boundkml);}}});
Index: /extensions/GMaps/main.inc.php
===================================================================
--- /extensions/GMaps/main.inc.php	(revision 15344)
+++ /extensions/GMaps/main.inc.php	(revision 15345)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: GMaps
-Version: 1.3.2
+Version: 1.4.0
 Description: Display and manage (google) maps
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=454
@@ -123,4 +123,7 @@
 |         |            |   . Manage extended description for categories names
 |         |            |
+| 1.4.0   | 2012-05-25 | * mantis feature:2638
+|         |            |   . Compatibility with Piwigo 2.4
+|         |            |
 |         |            |
 |         |            |
Index: /extensions/GMaps/templates/gmaps_category.tpl
===================================================================
--- /extensions/GMaps/templates/gmaps_category.tpl	(revision 15344)
+++ /extensions/GMaps/templates/gmaps_category.tpl	(revision 15345)
@@ -1,5 +1,8 @@
-{combine_script id="jquery" path="themes/default/js/jquery.min.js"}
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
+
 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
 
Index: /extensions/GMaps/templates/gmaps_dialog_area_choose.tpl
===================================================================
--- /extensions/GMaps/templates/gmaps_dialog_area_choose.tpl	(revision 15344)
+++ /extensions/GMaps/templates/gmaps_dialog_area_choose.tpl	(revision 15345)
@@ -1,4 +1,8 @@
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
+
 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
 
Index: /extensions/GMaps/templates/gmaps_picture_icon.tpl
===================================================================
--- /extensions/GMaps/templates/gmaps_picture_icon.tpl	(revision 15344)
+++ /extensions/GMaps/templates/gmaps_picture_icon.tpl	(revision 15345)
@@ -1,7 +1,10 @@
-{combine_script id="jquery" path="themes/default/js/jquery.min.js"}
-{combine_script id="jquery.ui" path="themes/default/js/ui/minified/jquery.ui.core.min.js"}
-{combine_script id="jquery.ui.dialog" path="themes/default/js/ui/minified/jquery.ui.dialog.min.js"}
+{combine_script id="jquery.ui" require='jquery' path="themes/default/js/ui/jquery.ui.core.js"}
+{combine_script id="jquery.ui.widget" require='jquery.ui' path="themes/default/js/ui/jquery.ui.widget.js"}
+{combine_script id="jquery.ui.mouse" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.mouse.js"}
+{combine_script id="jquery.ui.position" require='jquery.ui.widget' path="themes/default/js/ui/jquery.ui.position.js"}
+{combine_script id="jquery.ui.dialog" require='jquery.ui.widget' src="themes/default/js/ui/jquery.ui.dialog.js"}
+
 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
-{combine_script id="gmaps.picture" path="plugins/GMaps/js/gmapsPicture.min.js" require="jquery.ui"}
+{combine_script id="gmaps.picture" path="plugins/GMaps/js/gmapsPicture.js" require="jquery.ui"}
 
 <div id='iGMapsIconContent' style='display:none;'>
Index: /extensions/GMaps/templates/gmaps_picture_meta.tpl
===================================================================
--- /extensions/GMaps/templates/gmaps_picture_meta.tpl	(revision 15344)
+++ /extensions/GMaps/templates/gmaps_picture_meta.tpl	(revision 15345)
@@ -1,5 +1,5 @@
-{combine_script id="jquery" path="themes/default/js/jquery.min.js"}
+{combine_script id="jquery" path="themes/default/js/jquery.js"}
 {combine_script id="maps.google.com/api" path="http://maps.google.com/maps/api/js?sensor=false"}
-{combine_script id="gmaps.picture" path="plugins/GMaps/js/gmapsPicture.min.js" require="jquery"}
+{combine_script id="gmaps.picture" path="plugins/GMaps/js/gmapsPicture.js" require="jquery"}
 
 <div id='iGMapContent' style='text-align:center;'>
