Index: extensions/rv_gmaps/trunk/admin/admin_edit.tpl
===================================================================
--- extensions/rv_gmaps/trunk/admin/admin_edit.tpl	(revision 8301)
+++ extensions/rv_gmaps/trunk/admin/admin_edit.tpl	(revision 8304)
@@ -6,5 +6,5 @@
     {html_options options=$specials}
   </optgroup>
-  <optgroup label="{'Categories'|@translate}">
+  <optgroup label="{'Albums'|@translate}">
   	{html_options options=$categories selected=$categories_selected}
   </optgroup>
Index: extensions/rv_gmaps/trunk/admin/admin_sync.tpl
===================================================================
--- extensions/rv_gmaps/trunk/admin/admin_sync.tpl	(revision 8301)
+++ extensions/rv_gmaps/trunk/admin/admin_sync.tpl	(revision 8304)
@@ -32,5 +32,5 @@
 
   <fieldset id="catSubset">
-    <legend>{'reduce to single existing categories'|@translate}</legend>
+    <legend>{'reduce to single existing albums'|@translate}</legend>
     <ul>
     <li>
@@ -40,5 +40,5 @@
     </li>
 
-    <li><label><input type="checkbox" name="subcats_included" value="1" {$SUBCATS_INCLUDED_CHECKED} /> {'Search in subcategories'|@translate}</label></li>
+    <li><label><input type="checkbox" name="subcats_included" value="1" {$SUBCATS_INCLUDED_CHECKED} /> {'Search in sub-albums'|@translate}</label></li>
     </ul>
   </fieldset>
Index: extensions/rv_gmaps/trunk/changelog.txt
===================================================================
--- extensions/rv_gmaps/trunk/changelog.txt	(revision 8301)
+++ extensions/rv_gmaps/trunk/changelog.txt	(revision 8304)
@@ -1,2 +1,5 @@
+2.2.a
+- compatible with piwigo core 2.2
+
 2.1.c
 - do not use prototype anymore (replaced by jQuery + jQuery nyromodal)
Index: extensions/rv_gmaps/trunk/include/picture_map.inc.php
===================================================================
--- extensions/rv_gmaps/trunk/include/picture_map.inc.php	(revision 8301)
+++ extensions/rv_gmaps/trunk/include/picture_map.inc.php	(revision 8304)
@@ -2,7 +2,7 @@
 global $page, $template, $conf, $rvm_dir;
 
-$template->concat('PLUGIN_PICTURE_ACTIONS', '
-  <a href="'.duplicate_picture_url().'" title="'.l10n('return to normal view mode').'"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/map_m.png" class="button" alt="map"></a>
-  ');
+$template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL,
+	duplicate_picture_url(), l10n('return to normal view mode'), '', 'map', 'map'
+));
 
 $template->assign(
@@ -11,4 +11,5 @@
     'GMAPS_API_KEY' => $conf['gmaps_api_key'],
     'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir,
+		'PLUGIN_LOCATION' => 'plugins/'.$rvm_dir,
   )
   );
Index: extensions/rv_gmaps/trunk/main.inc.php
===================================================================
--- extensions/rv_gmaps/trunk/main.inc.php	(revision 8301)
+++ extensions/rv_gmaps/trunk/main.inc.php	(revision 8304)
@@ -1,5 +1,5 @@
 <?php /*
 Plugin Name: RV Maps&Earth
-Version: 2.1.b
+Version: 2.2.a
 Description: Extend your gallery with Google Maps and Google Earth ...
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=122
@@ -7,5 +7,5 @@
 Author URI: http://www.modusoptimus.com/
 */
-define( 'RVM_PLUGIN_VERSION', '2.1.b');
+define( 'RVM_PLUGIN_VERSION', '2.2.a');
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
@@ -39,4 +39,8 @@
 	}
 }
+
+define('RVM_ACTION_MODEL', '<a href="%s" title="%s" rel="nofollow" class="pwg-state-default pwg-button" %s>
+	<span class="pwg-icon pwg-icon-%s">&nbsp;</span><span class="pwg-button-text">%s</span>
+</a>');
 
 function rvm_end_index()
@@ -76,16 +80,15 @@
 	{
 		$link_title = sprintf( l10n('displays %s on a map'), strip_tags($page['title']) );
-		$template->concat( 'PLUGIN_INDEX_ACTIONS' ,'
-<li><a href="'.$map_url.'" title="'.$link_title.'" rel="nofollow"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/map_m.png" class="button" alt="map"></a></li>
-');
+		$template->concat( 'PLUGIN_INDEX_ACTIONS' , '<li>'.sprintf(RVM_ACTION_MODEL,
+			$map_url, $link_title, '', 'map', 'map'
+			).'</li>');
  	}
 
-//  if ( empty($map_url) )
 	{
 		$kml_url = rvm_duplicate_kml_index_url( array(), array('start') );
 		$link_title = sprintf( l10n('opens %s in Google Earth'), strip_tags($page['title']) );
-		$template->concat( 'PLUGIN_INDEX_ACTIONS' ,'
-<li><a href="'.$kml_url.'" title="'.$link_title.'" rel="nofollow" type="application/vnd.google-earth.kml+xml"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/earth_m.png" class="button" alt="earth"></a></li>
-');
+		$template->concat( 'PLUGIN_INDEX_ACTIONS' , '<li>'.sprintf(RVM_ACTION_MODEL,
+			$kml_url, $link_title, 'type="application/vnd.google-earth.kml+xml"', 'globe', 'earth'
+			).'</li>');
 	}
 }
@@ -108,7 +111,7 @@
 			{
 				$link_title = sprintf( l10n('displays %s on a map'), strip_tags($pictures['current']['name']) );
-				$template->concat('PLUGIN_PICTURE_ACTIONS', '
-<a href="'.$map_url.'" title="'.$link_title.'" rel="nofollow" target="_top"><img src="'.get_absolute_root_url(false).'plugins/'.$rvm_dir.'/icons/map_m.png" class="button" alt="map"></a>
-');
+				$template->concat( 'PLUGIN_PICTURE_ACTIONS' , sprintf(RVM_ACTION_MODEL,
+					$map_url, $link_title, 'target="_top"', 'map', 'map'
+				));
 			}
 		}
Index: extensions/rv_gmaps/trunk/map.php
===================================================================
--- extensions/rv_gmaps/trunk/map.php	(revision 8301)
+++ extensions/rv_gmaps/trunk/map.php	(revision 8304)
@@ -67,4 +67,5 @@
     'GMAPS_API_KEY' => $conf['gmaps_api_key'],
     'PLUGIN_ROOT_URL' => get_absolute_root_url().'plugins/'.$rvm_dir,
+		'PLUGIN_LOCATION' => 'plugins/'.$rvm_dir,
     'U_MAP_DATA' => $map_data_url,
     'GALLERY_TITLE' => $conf['gallery_title'],
Index: extensions/rv_gmaps/trunk/template/map.tpl
===================================================================
--- extensions/rv_gmaps/trunk/template/map.tpl	(revision 8301)
+++ extensions/rv_gmaps/trunk/template/map.tpl	(revision 8304)
@@ -5,5 +5,20 @@
 <meta name="robots" content="noindex,nofollow" />
 <title>{$GALLERY_TITLE}</title>
-<link rel="stylesheet" type="text/css" href="{$PLUGIN_ROOT_URL}/template/style.css?v={$RVM_PLUGIN_VERSION}" />
+
+<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$GMAPS_API_KEY}&amp;hl={$lang_info.code}" type="text/javascript"></script>
+
+{combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'}
+{combine_script id='jquery.nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}
+{combine_css path="`$PLUGIN_LOCATION`/template/style.css" version=$RVM_PLUGIN_VERSION}
+{combine_css path="`$PLUGIN_LOCATION`/template/nyroModal/nyroModal.css" version=$RVM_PLUGIN_VERSION}
+
+{combine_script id='rvm.dl' load='header' path="`$PLUGIN_LOCATION`/template/data_loader.js" version=$RVM_PLUGIN_VERSION}
+{combine_script id='rvm.dh' load='header' path="`$PLUGIN_LOCATION`/template/data_handler.js" version=$RVM_PLUGIN_VERSION}
+{combine_script id='rvm.pl' load='header' path="`$PLUGIN_LOCATION`/template/page_linker.js" version=$RVM_PLUGIN_VERSION}
+{combine_script id='core.scripts' load='header' path='themes/default/js/scripts.js'}
+
+{get_combined_css}
+{get_combined_scripts load='header'}
+
 <!--[if IE]>
 <style type="text/css">
@@ -19,16 +34,5 @@
 <![endif]-->
 
-<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key={$GMAPS_API_KEY}&amp;hl={$lang_info.code}" type="text/javascript"></script>
-
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
-<script type="text/javascript">jQuery.noConflict();</script>
-<script src="{$PLUGIN_ROOT_URL}/template/nyroModal/jquery.nyroModal-1.6.2.js" type="text/javascript"></script>
-<link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.css" rel="stylesheet" type="text/css">
-
-<script src="{$PLUGIN_ROOT_URL}/template/data_loader.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
-<script src="{$PLUGIN_ROOT_URL}/template/data_handler.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
-<script src="{$PLUGIN_ROOT_URL}/template/page_linker.js?v={$RVM_PLUGIN_VERSION}" type="text/javascript"></script>
-
-<script src="{$ROOT_URL}themes/default/js/scripts.js" type="text/javascript"></script>
+
 
 <script type="text/javascript">{literal}
@@ -226,3 +230,4 @@
 <div id="map"> </div>
 </body>
+{get_combined_scripts load='footer'}
 </html>
Index: extensions/rv_gmaps/trunk/template/mapl.tpl
===================================================================
--- extensions/rv_gmaps/trunk/template/mapl.tpl	(revision 8301)
+++ extensions/rv_gmaps/trunk/template/mapl.tpl	(revision 8304)
@@ -15,6 +15,10 @@
 	<div class="titrePage">
 		<ul class="categoryActions">
-			<li><a href="{$U_KML}" title="{$KML_LINK_TITLE}" rel="nofollow" type="application/vnd.google-earth.kml+xml"><img src="{$PLUGIN_ROOT_URL}/icons/earth_m.png" class="button" alt="earth"></a></li>
-			<li><a target="_top" href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'Home'|@translate}"/></a></li>
+			<li><a href="{$U_KML}" title="{$KML_LINK_TITLE}" class="pwg-state-default pwg-button" rel="nofollow" type="application/vnd.google-earth.kml+xml">
+				<span class="pwg-icon pwg-icon-globe">&nbsp;</span><span class="pwg-button-text">earth</span>
+			</a><li>
+			<li><a target="_top" href="{$U_HOME}" title="{'return to homepage'|@translate}" class="pwg-state-default pwg-button">
+				<span class="pwg-icon pwg-icon-home">&nbsp;</span><span class="pwg-button-text">{'Home'|@translate}</span>
+			</a><li>
 		</ul>
 		<h2>{$TITLE}</h2>
@@ -24,5 +28,5 @@
 {if not empty($related_categories)}
 	<ul class="fullTagCloud">
-		<li>{'Categories'|@translate}:</li>
+		<li>{'Albums'|@translate}:</li>
 		{foreach from=$related_categories item=cat}
 		<li>{strip}
Index: extensions/rv_gmaps/trunk/template/picture_map_content.tpl
===================================================================
--- extensions/rv_gmaps/trunk/template/picture_map_content.tpl	(revision 8301)
+++ extensions/rv_gmaps/trunk/template/picture_map_content.tpl	(revision 8304)
@@ -1,6 +1,7 @@
+
 {html_head}
 <script src="http://maps.google.com/maps/api/js?sensor=false&amp;hl={$lang_info.code}" type="text/javascript"></script>
-<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
-<script src="{$PLUGIN_ROOT_URL}/template/nyroModal/jquery.nyroModal-1.6.2.js" type="text/javascript"></script>
+{combine_script id='jquery' load='header' path='http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'}
+{combine_script id='jquery.nyroModal' load='async' path="`$PLUGIN_LOCATION`/template/nyroModal/jquery.nyroModal-1.6.2.js" version='1.6.2'}
 <link href="{$PLUGIN_ROOT_URL}/template/nyroModal/nyroModal.css" rel="stylesheet" type="text/css">
 
