Index: /extensions/akBookStyle/trunk/CHANGELOG
===================================================================
--- /extensions/akBookStyle/trunk/CHANGELOG	(revision 10974)
+++ /extensions/akBookStyle/trunk/CHANGELOG	(revision 10975)
@@ -1,2 +1,6 @@
+akBookStyle 0.4.0 - 2011-05-21
+================================
+* Make plugin compatibile with piwigo 2.2
+
 akBookStyle 0.3.1 - 2011-02-19
 ================================
Index: /extensions/akBookStyle/trunk/MANIFEST
===================================================================
--- /extensions/akBookStyle/trunk/MANIFEST	(revision 10974)
+++ /extensions/akBookStyle/trunk/MANIFEST	(revision 10975)
@@ -1,46 +1,44 @@
+akBookStyle/js/ak_jquery-load.js
+akBookStyle/include/akConfig.class.php
+akBookStyle/include/akContent.class.php
+akBookStyle/maintain.inc.php
 akBookStyle/MANIFEST
-akBookStyle/maintain.inc.php
-akBookStyle/rsync_exclude.txt
-akBookStyle/template/ak_thumbnails.tpl
-akBookStyle/template/ak_horizontal.tpl
-akBookStyle/template/ak_vertical.tpl
-akBookStyle/template/admin.tpl
-akBookStyle/template/ak_reloaded_image.tpl
-akBookStyle/js/ak_jquery-load.js
+akBookStyle/init.php
 akBookStyle/main.inc.php
-akBookStyle/default_values.inc.php
+akBookStyle/COPYING
+akBookStyle/language/es_ES/plugin.lang.php
+akBookStyle/language/es_ES/index.php
+akBookStyle/language/es_ES/description.txt
+akBookStyle/language/en_UK/plugin.lang.php
+akBookStyle/language/en_UK/index.php
+akBookStyle/language/de_DE/plugin.lang.php
+akBookStyle/language/de_DE/index.php
+akBookStyle/language/de_DE/description.txt
+akBookStyle/language/lv_LV/plugin.lang.php
+akBookStyle/language/lv_LV/description.txt
+akBookStyle/language/cs_CZ/plugin.lang.php
+akBookStyle/language/no_NO/plugin.lang.php
+akBookStyle/language/no_NO/index.php
+akBookStyle/language/no_NO/description.txt
+akBookStyle/language/it_IT/plugin.lang.php
+akBookStyle/language/it_IT/index.php
+akBookStyle/language/it_IT/description.txt
+akBookStyle/language/hu_HU/plugin.lang.php
+akBookStyle/language/hu_HU/index.php
+akBookStyle/language/hu_HU/description.txt
+akBookStyle/language/fr_FR/plugin.lang.php
 akBookStyle/language/fr_FR/index.php
 akBookStyle/language/fr_FR/description.txt
-akBookStyle/language/fr_FR/plugin.lang.php
-akBookStyle/language/de_DE/index.php
-akBookStyle/language/de_DE/description.txt
-akBookStyle/language/de_DE/plugin.lang.php
-akBookStyle/language/no_NO/index.php
-akBookStyle/language/no_NO/description.txt
-akBookStyle/language/no_NO/plugin.lang.php
+akBookStyle/language/templates/plugin.lang.php
 akBookStyle/language/templates/index.php
-akBookStyle/language/templates/plugin.lang.php
-akBookStyle/language/en_UK/index.php
-akBookStyle/language/en_UK/plugin.lang.php
-akBookStyle/language/lv_LV/description.txt
-akBookStyle/language/lv_LV/plugin.lang.php
-akBookStyle/language/it_IT/index.php
-akBookStyle/language/it_IT/description.txt
-akBookStyle/language/it_IT/plugin.lang.php
-akBookStyle/language/es_ES/index.php
-akBookStyle/language/es_ES/description.txt
-akBookStyle/language/es_ES/plugin.lang.php
-akBookStyle/language/cs_CZ/plugin.lang.php
-akBookStyle/language/hu_HU/index.php
-akBookStyle/language/hu_HU/description.txt
-akBookStyle/language/hu_HU/plugin.lang.php
+akBookStyle/css/admin.css
+akBookStyle/css/style.css
+akBookStyle/public.php
+akBookStyle/admin.php
 akBookStyle/CHANGELOG
-akBookStyle/include/akContent.class.php
-akBookStyle/include/akConfig.class.php
-akBookStyle/admin.php
-akBookStyle/Makefile
-akBookStyle/COPYING
-akBookStyle/css/style.css
-akBookStyle/css/admin.css
-akBookStyle/init.php
-akBookStyle/public.php
+akBookStyle/default_values.inc.php
+akBookStyle/template/admin.tpl
+akBookStyle/template/ak_horizontal.tpl
+akBookStyle/template/ak_reloaded_image.tpl
+akBookStyle/template/ak_vertical.tpl
+akBookStyle/template/ak_thumbnails.tpl
Index: /extensions/akBookStyle/trunk/admin.php
===================================================================
--- /extensions/akBookStyle/trunk/admin.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/admin.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -27,10 +27,12 @@
 load_language('plugin.lang', AK_PLUGIN_LANG);
 
-$ThumbnailsLocations = array('top' => 'Top',
-                             'left' => 'Left',
-                             'bottom' => 'Bottom',
-                             'right' => 'Right');
-$MouseEvents = array('click' => 'Click',
-		     'mouseover' => 'Mouseover');
+$ThumbnailsLocations = array('top' => l10n('Top'),
+                             'left' => l10n('Left'),
+			     'bottom' => l10n('Bottom'),
+                             'right' => l10n('Right')
+			     );
+$MouseEvents = array('click' => l10n('Click'),
+		     'mouseover' => l10n('Mouseover')
+		     );
 
 $me = get_plugin_data($plugin_id);
@@ -40,8 +42,8 @@
   if (!empty($_POST['ak_categories']) && $_POST['ak_categories']!=$me->ak_categories) {
     $me->ak_categories = $_POST['ak_categories'];
-    array_push($GLOBALS['page']['infos'],
-               l10n_dec('Applicable category has been updated',
-                        'Applicable categories have been updated',
-                        count($_POST['ak_categories'])));
+    $page['infos'][] = l10n_dec('Applicable category has been updated',
+				'Applicable categories have been updated',
+				count($_POST['ak_categories'])
+				);
     $save_config = true;
   }
@@ -49,5 +51,5 @@
   if (!empty($_POST['ak_by_page']) && intval($_POST['ak_by_page'])!=$me->ak_by_page) {
     $me->ak_by_page = intval($_POST['ak_by_page']);
-    array_push($GLOBALS['page']['infos'], l10n('Thumbnails per page has been updated'));
+    $page['infos'][] = l10n('Thumbnails per page has been updated');
     $save_config = true;
   }
@@ -55,5 +57,5 @@
   if (!empty($_POST['ak_by_line']) && intval($_POST['ak_by_line'])!=$me->ak_by_line) {
     $me->ak_by_line = intval($_POST['ak_by_line']);
-    array_push($GLOBALS['page']['infos'], l10n('Number of column has been updated'));
+    $page['infos'][] = l10n('Number of column has been updated');
     $save_config = true;
   }
@@ -61,5 +63,5 @@
   if (!empty($_POST['ak_thumbnail_size']) && $_POST['ak_thumbnail_size']!=$me->ak_thumbnail_size) {
     $me->ak_thumbnail_size = (int) $_POST['ak_thumbnail_size'];
-    array_push($GLOBALS['page']['infos'], l10n('Thumbnail size has been updated'));
+    $page['infos'][] = l10n('Thumbnail size has been updated');
     $save_config = true;
   }
@@ -71,5 +73,5 @@
       $me->ak_mouse_event = 'click';
     }
-    array_push($GLOBALS['page']['infos'], l10n('Event to show medium picture has been updated.'));
+    $page['infos'][] = l10n('Event to show medium picture has been updated.');
     $save_config = true;
   }
@@ -80,5 +82,5 @@
     } else {
       $me->ak_thumbnails_loc = 'left';    }
-    array_push($GLOBALS['page']['infos'], l10n('Thumbnails location has been changed'));
+    $page['infos'][] = l10n('Thumbnails location has been changed');
     $save_config = true;
   }
@@ -95,17 +97,15 @@
 $all_categories = simple_hash_from_query($query, 'id', 'name');
 
-$GLOBALS['template']->set_filenames(array('plugin_admin_content' => AK_PLUGIN_TEMPLATE . '/admin.tpl'));
-$GLOBALS['template']->assign('AK_PLUGIN_CSS', AK_PLUGIN_CSS);
-$GLOBALS['template']->assign('ALL_CATEGORIES', $all_categories); 
-$GLOBALS['template']->assign('AK_CATEGORIES', $me->ak_categories); 
-$GLOBALS['template']->assign('AK_BY_PAGE', $me->ak_by_page); 
-$GLOBALS['template']->assign('AK_BY_LINE', $me->ak_by_line); 
-$GLOBALS['template']->assign('AK_THUMBNAIL_SIZE', $me->ak_thumbnail_size); 
-$GLOBALS['template']->assign('AK_MOUSE_EVENT', $me->ak_mouse_event); 
-$GLOBALS['template']->assign('AK_AVAILABLE_EVENTS', array_keys($MouseEvents)); 
-$GLOBALS['template']->assign('AK_EVENTS_LABELS', array_values($MouseEvents)); 
-$GLOBALS['template']->assign('AK_THUMBNAILS_LOC', $me->ak_thumbnails_loc); 
-$GLOBALS['template']->assign('AK_THUMBNAILS_LOCATIONS_KEYS', array_keys($ThumbnailsLocations)); 
-$GLOBALS['template']->assign('AK_THUMBNAILS_LOCATIONS_VALUES', array_values($ThumbnailsLocations)); 
-$GLOBALS['template']->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+$template->set_filenames(array('plugin_admin_content' => AK_PLUGIN_TEMPLATE . '/admin.tpl'));
+$template->assign('AK_PLUGIN_CSS', AK_PLUGIN_CSS);
+$template->assign('ALL_CATEGORIES', $all_categories); 
+$template->assign('AK_CATEGORIES', $me->ak_categories); 
+$template->assign('AK_BY_PAGE', $me->ak_by_page); 
+$template->assign('AK_BY_LINE', $me->ak_by_line); 
+$template->assign('AK_THUMBNAIL_SIZE', $me->ak_thumbnail_size); 
+$template->assign('AK_EVENT', $me->ak_mouse_event); 
+$template->assign('AK_EVENTS', $MouseEvents); 
+$template->assign('AK_THUMBNAILS_LOC', $me->ak_thumbnails_loc); 
+$template->assign('AK_THUMBNAILS_LOCATIONS', $ThumbnailsLocations); 
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
 ?>
Index: /extensions/akBookStyle/trunk/include/akContent.class.php
===================================================================
--- /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/include/akContent.class.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -89,5 +89,4 @@
     $template->assign('AK_THUMBNAILS_LOC', $this->plugin_config->ak_thumbnails_loc); 
     $template->assign('AK_PIC_SRC', get_image_url($images[$this->current_picture]));
-
     $template->assign('AK_NEXT', $this->getNextPicture($this->current_picture, $images));
     $template->assign('AK_PREVIOUS', $this->getPreviousPicture($this->current_picture, $images));
@@ -103,6 +102,6 @@
 
     $selected_one = false;
-    foreach ($tpl_vars as &$tpl_var) {
-      list($thumbnail_width, $thumbnail_height) = getimagesize($tpl_var['TN_SRC']);
+    foreach ($tpl_vars as $i => &$tpl_var) {
+      list($thumbnail_width, $thumbnail_height) = getimagesize(get_thumbnail_path($images[$i]));
       $thumbnail_x_center = $thumbnail_width/2;
       $thumbnail_y_center = $thumbnail_height/2;
@@ -164,6 +163,6 @@
   private function getPictureId($images) {
     if ($GLOBALS['conf']['question_mark_in_urls']==false and
-      isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) ) {
-      $rewritten = $_SERVER["PATH_INFO"];
+      isset($_SERVER['PATH_INFO']) and !empty($_SERVER['PATH_INFO']) ) {
+      $rewritten = $_SERVER['PATH_INFO'];
       $rewritten = str_replace('//', '/', $rewritten);
     } else {
Index: /extensions/akBookStyle/trunk/js/ak_jquery-load.js
===================================================================
--- /extensions/akBookStyle/trunk/js/ak_jquery-load.js	(revision 10974)
+++ /extensions/akBookStyle/trunk/js/ak_jquery-load.js	(revision 10975)
@@ -18,5 +18,5 @@
 
 	  $a = $(this);
-          next_thumbnail = $('table.thumbnails a[href='+$(this).attr('href')+']');          
+	  next_thumbnail = $('table.thumbnails a[href="'+$(this).attr('href')+'"]');
           if (next_thumbnail.length==0) {
 	    if ($a.attr('id')=='akNextPicture') {
@@ -31,30 +31,28 @@
           } else {
             next_thumbnail.parent().parent().parent().addClass('selected');
-	    try {
-	      $.get($a.attr('href'),{},
-		    function success(data) { 		    
-		      $('#akPicture')
-			.attr('src', data.AK_PIC_SRC)
-			.attr('alt', data.AK_PIC_ALT)
-			.attr('title', data.AK_PIC_TITLE);
-
-		      if (data.AK_PREVIOUS) {
-			$('#akPreviousPicture')
-			  .removeClass('hide')
-			  .attr('href', data.AK_PREVIOUS);
-		      } else {
-			$('#akPreviousPicture').addClass('hide');
-		      }
-		      if (data.AK_NEXT) {
-			$('#akNextPicture')
-			  .removeClass('hide')
-			  .attr('href', data.AK_NEXT);
-		      } else {
-			$('#akNextPicture').addClass('hide');
-		      }
-		      $a.click(function(e) { e.preventDefault();}); 
-		    },
-		    'json');	    
-	    } catch (e) {}
+	    $.get($a.attr('href'),{},
+		  function success(data) {
+		    $('#akPicture')
+		      .attr('src', data.AK_PIC_SRC)
+		      .attr('alt', data.AK_PIC_ALT)
+		      .attr('title', data.AK_PIC_TITLE);
+		    
+		    if (data.AK_PREVIOUS) {
+		      $('#akPreviousPicture')
+			.removeClass('hide')
+			.attr('href', data.AK_PREVIOUS);
+		    } else {
+		      $('#akPreviousPicture').addClass('hide');
+		    }
+		    if (data.AK_NEXT) {
+		      $('#akNextPicture')
+			.removeClass('hide')
+			.attr('href', data.AK_NEXT);
+		    } else {
+		      $('#akNextPicture').addClass('hide');
+		    }
+		    $a.click(function(e) { e.preventDefault();}); 
+		  },
+		  'json');	    
           }
 	  return false;
Index: /extensions/akBookStyle/trunk/language/cs_CZ/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/cs_CZ/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/cs_CZ/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -31,6 +31,6 @@
 $lang['Thumbnail size has been updated'] = "Velikost náhledù byla aktualizována";
 $lang['Thumbnail size'] = "Velikost náhledù";
-$lang['click'] = "klik";
-$lang['mouseover'] = "pøejetí myší";
+$lang['Click'] = "klik";
+$lang['Mouseover'] = "pøejetí myší";
 $lang['Event to show medium picture.'] = "Událost pro zobrazení fotografie.";
 $lang['Event to show medium picture has been updated.'] = "Událost pro zobrazení fotografie byla aktualizována.";
Index: /extensions/akBookStyle/trunk/language/de_DE/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/de_DE/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/de_DE/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -25,5 +25,5 @@
 $lang['Applicable categorie(s)'] = "Kategorieauswahl";
 $lang['Applicable category has been updated'] = "Die Ansicht wurde für die gewählte Kategorie angepasst";
-$lang['Applicable categories has been updated'] = "Die Ansicht wurde für die gewählten Kategorien angepasstn";
+$lang['Applicable categories have been updated'] = "Die Ansicht wurde für die gewählten Kategorien angepasstn";
 $lang['Number of thumbnails per page'] = "Anzahl der Vorschaubilder pro Seite";
 $lang['Thumbnails per page has been updated'] = "Die Anzahl der Vorschaubilder wurde angepasst";
@@ -31,6 +31,6 @@
 $lang['Thumbnail size has been updated'] = "Die Anzahl der Spalten wurde angepasst";
 $lang['Thumbnail size'] = "Größe der Vorschaubilder";
-$lang['click'] = "Klick";
-$lang['mouseover'] = "Mit dem Mauszeiger berühren";
+$lang['Click'] = "Klick";
+$lang['Mouseover'] = "Mit dem Mauszeiger berühren";
 $lang['Event to show medium picture.'] = "Bei welchem Ereignis soll das Bild mittlerer Größe angezeigt werden.";
 $lang['Event to show medium picture has been updated.'] = "Die Ereignisauswahl wurde angepasst.";
Index: /extensions/akBookStyle/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/en_UK/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/en_UK/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -21,28 +21,8 @@
 // +-----------------------------------------------------------------------+
 
-$lang['That plugin give an alternate presentation for galleries. It gives you in a whole page access to medium image and thumbnails.'] = "That plugin give an alternate presentation for galleries. It gives you in a whole page access to medium image and thumbnails.";
-$lang['Main configuration'] = "Main configuration";
-$lang['Applicable categorie(s)'] = "Applicable categorie(s)";
-$lang['Applicable category has been updated'] = "Applicable category has been updated";
-$lang['Applicable categories have been updated'] = "Applicable categories have been updated";
-$lang['Number of thumbnails per page'] = "Number of thumbnails per page";
-$lang['Thumbnails per page has been updated'] = "Thumbnails per page has been updated";
-$lang['Number of column'] = "Number of column";
-$lang['Thumbnail size has been updated'] = "Thumbnail size has been updated";
-$lang['Thumbnail size'] = "Thumbnail size";
-$lang['click'] = "click";
-$lang['mouseover'] = "mouseover";
-$lang['Event to show medium picture.'] = "Event to show medium picture.";
-$lang['Event to show medium picture has been updated.'] = "Event to show medium picture has been updated.";
-$lang['Thumbnails location'] = "Thumbnails location";
-$lang['Thumbnails location has been changed'] = "Thumbnails location has been changed";
-$lang['Top'] = "Top";
-$lang['Left'] = "Left";
-$lang['Bottom'] = "Bottom";
-$lang['Right'] = "Right";
-$lang['or number of lines for Top/Bottom'] = "or number of lines for Top/Bottom";
-$lang['Next image'] = "Next image";
-$lang['Next page'] = "Next page";
-$lang['Previous image'] = "Previous image";
-$lang['Previous page'] = "Previous page";
+/* 
+ * The purpose of that file is to provide a way to overwrite 
+ * default translation.
+ * See language/templates/plugin.lang.php for available keys
+ */
 ?>
Index: /extensions/akBookStyle/trunk/language/es_ES/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/es_ES/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/es_ES/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -24,10 +24,10 @@
 $lang['Main configuration'] = "Configuración general";
 $lang['Number of thumbnails per page'] = "Número de miniaturas por página";
-$lang['Thumbnails per page has been updated'] = "El número de las miniaturas por página ha sido modificado.";
+$lang['Thumbnails per page have been updated'] = "El número de las miniaturas por página ha sido modificado.";
 $lang['Number of column'] = "Número de columnas";
 $lang['Thumbnail size has been updated'] = "El número de columna ha sido modificado";
 $lang['Thumbnail size'] = "Tamaño de las miniaturas";
-$lang['click'] = "clic";
-$lang['mouseover'] = "sobrevuelo";
+$lang['Click'] = "clic";
+$lang['Mouseover'] = "sobrevuelo";
 $lang['Event to show medium picture.'] = "Acontecimiento que pone en marcha la visualización de la imagen.";
 $lang['Event to show medium picture has been updated.'] = "El modo de visualización de la imagen ha sido modificado.";
Index: /extensions/akBookStyle/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/fr_FR/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/fr_FR/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -25,5 +25,5 @@
 $lang['Applicable categorie(s)'] = "Choix de catégorie(s)";
 $lang['Applicable category has been updated'] = "La catégorie sélectionnée a été mise à jour";
-$lang['Applicable categories has been updated'] = "Les catégories sélectionnées ont été mises à jour";
+$lang['Applicable categories have been updated'] = "Les catégories sélectionnées ont été mises à jour";
 $lang['Number of thumbnails per page'] = "Nombre des miniatures par page";
 $lang['Thumbnails per page has been updated'] = "Le nombre des miniatures par page a été modifié.";
@@ -31,6 +31,6 @@
 $lang['Thumbnail size has been updated'] = "Le nombre de colonne a été modifié";
 $lang['Thumbnail size'] = "Taille des miniatures";
-$lang['click'] = "clic";
-$lang['mouseover'] = "survol";
+$lang['Click'] = "clic";
+$lang['Mouseover'] = "survol";
 $lang['Event to show medium picture.'] = "Evénement déclenchant l'affichage de l'image.";
 $lang['Event to show medium picture has been updated.'] = "Le mode d'affichage de l'image a été modifié.";
Index: /extensions/akBookStyle/trunk/language/hu_HU/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/hu_HU/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/hu_HU/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -24,10 +24,10 @@
 $lang['Main configuration'] = "Fő konfiguráció";
 $lang['Number of thumbnails per page'] = "Bélyegképek száma az oldalon";
-$lang['Thumbnails per page has been updated'] = "Bélyegképek száma az oldalon frissítve.";
+$lang['Thumbnails per page have been updated'] = "Bélyegképek száma az oldalon frissítve.";
 $lang['Number of column'] = "Oszlopok száma";
 $lang['Thumbnail size has been updated'] = "Bélyegkép mérete frissítve.";
 $lang['Thumbnail size'] = "Bélyegkép mérete";
-$lang['click'] = "kattintásra";
-$lang['mouseover'] = "kurzor a képen";
+$lang['Click'] = "kattintásra";
+$lang['Mouseover'] = "kurzor a képen";
 $lang['Event to show medium picture.'] = "Közepes kép mutatása.";
 $lang['Event to show medium picture has been updated.'] = "Közepes kép megjelenítés módja frissítve.";
Index: /extensions/akBookStyle/trunk/language/it_IT/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/it_IT/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/it_IT/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -24,10 +24,10 @@
 $lang['Main configuration'] = "Configurazione generale";
 $lang['Number of thumbnails per page'] = "Numero di miniature per pagina";
-$lang['Thumbnails per page has been updated'] = "Il numero di miniature per pagina è stato aggiornato.";
+$lang['Thumbnails per page have been updated'] = "Il numero di miniature per pagina è stato aggiornato.";
 $lang['Number of column'] = "Numero di colonne";
 $lang['Thumbnail size has been updated'] = "Le dimenzioni delle miniature sono state aggiornate";
 $lang['Thumbnail size'] = "Dimenzioni delle miniature";
-$lang['click'] = "clic";
-$lang['mouseover'] = "sorvolo";
+$lang['Click'] = "clic";
+$lang['Mouseover'] = "sorvolo";
 $lang['Event to show medium picture.'] = "Eventi che attivano la visualizzazione di un'immagine.";
 $lang['Event to show medium picture has been updated.'] = "Il modo di visualizzazione dell'immagine è stata modificata.";
Index: /extensions/akBookStyle/trunk/language/lv_LV/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/lv_LV/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/lv_LV/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -27,10 +27,10 @@
 $lang['Applicable categories have been updated'] = "Pielietojamās kategorijas ir atjauninātas";
 $lang['Number of thumbnails per page'] = "Sīkbilžu skaits lapā";
-$lang['Thumbnails per page has been updated'] = "Sīkbilžu skaits lapā ir atjaunināts";
+$lang['Thumbnails per page have been updated'] = "Sīkbilžu skaits lapā ir atjaunināts";
 $lang['Number of column'] = "Kolonu skaits";
 $lang['Thumbnail size has been updated'] = "Sīkbildes izmēri ir atjaunināti";
 $lang['Thumbnail size'] = "Sīkbildes izmērs";
-$lang['click'] = "klikšķināt";
-$lang['mouseover'] = "pārvilkt ar peli";
+$lang['Click'] = "klikšķināt";
+$lang['Mouseover'] = "pārvilkt ar peli";
 $lang['Event to show medium picture.'] = "Pasākums, lai parādītu vidēja izmēra attēlu.";
 $lang['Event to show medium picture has been updated.'] = " Pasākums, lai parādītu vidēja izmēra attēlu ir atjaunināts.";
Index: /extensions/akBookStyle/trunk/language/no_NO/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/no_NO/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/no_NO/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -31,6 +31,6 @@
 $lang['Thumbnail size has been updated'] = "Miniatyr bilde størrelse har blitt oppdatert";
 $lang['Thumbnail size'] = "Miniatyr størrelse";
-$lang['click'] = "Klikk";
-$lang['mouseover'] = "mus-over";
+$lang['Click'] = "Klikk";
+$lang['Mouseover'] = "mus-over";
 $lang['Event to show medium picture.'] = "Hendelse å vise medium bilde.";
 $lang['Event to show medium picture has been updated.'] = "Hendelse å vise mediuum bilde er oppdatert.";
Index: /extensions/akBookStyle/trunk/language/templates/plugin.lang.php
===================================================================
--- /extensions/akBookStyle/trunk/language/templates/plugin.lang.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/language/templates/plugin.lang.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -21,30 +21,35 @@
 // +-----------------------------------------------------------------------+
 
-$lang['ak_intro'] = "That plugin give an alternate presentation for galleries. It gives you in a whole page access to medium image and thumbnails.";
-$lang['ak_general_config'] = "Main configuration";
-$lang['Applicable categorie(s)'] = "Applicable categorie(s)";
-$lang['Applicable category has been updated'] = "Applicable category has been updated";
-$lang['Applicable categories have been updated'] = "Applicable categories have been updated";
-$lang['ak_by_page'] = "Number of thumbnails per page";
-$lang['ak_by_page_changed'] = "Thumbnails per page has been updated";
-$lang['ak_by_line'] = "Number of column";
-$lang['ak_by_line_changed'] = "Number of column has been updated";
-$lang['ak_thumbnail_size'] = "Thumbnail size";
-$lang['ak_by_line_changed'] = "Thumbnail size has been updated";
-$lang['ak_event_click'] = "click";
-$lang['ak_event_mouseover'] = "mouseover";
-$lang['ak_mouse_event'] = "Event to show medium picture.";
-$lang['ak_mouse_event_changed'] = "Event to show medium picture has been updated.";
-$lang['ak_thumbnails_loc'] = "Thumbnails location";
-$lang['ak_thumbnails_loc_changed'] = "Thumbnails location has been changed";
-$lang['top'] = "Top";
-$lang['left'] = "Left";
-$lang['bottom'] = "Bottom";
-$lang['right'] = "Right";
-$lang['ak_by_column'] = 'or number of lines for Top/Bottom';
+// admin
+$lang['ak Book Style'] = '';
+$lang['Applicable categorie(s)'] = '';
+$lang['Applicable categories have been updated'] = '';
+$lang['Applicable category has been updated'] = '';
+$lang['Bottom'] = '';
+$lang['Click'] = '';
+$lang['Event to show medium picture.'] = '';
+$lang['Event to show medium picture has been updated.'] = '';
+$lang['Left'] = '';
+$lang['Main configuration'] = '';
+$lang['Mouseover'] = '';
+$lang['Number of column'] = '';
+$lang['Number of column has been updated'] = '';
+$lang['Number of thumbnails per page'] = '';
+$lang['or number of lines for Top/Bottom'] = '';
+$lang['Right'] = '';
+$lang['Submit'] = '';
+$lang['Thumbnail size'] = '';
+$lang['Thumbnail size has been updated'] = '';
+$lang['Thumbnails location'] = '';
+$lang['Thumbnails location has been changed'] = '';
+$lang['Thumbnails per page has been updated'] = '';
+$lang['Top'] = '';
 
-$lang['Next image'] = 'Next image';
-$lang['Next page'] = 'Next page';
-$lang['Previous image'] = 'Previous image';
-$lang['Previous page'] = 'Previous page';
+// public
+$lang['Home'] = '';
+$lang['Next image'] = '';
+$lang['Next page'] = '';
+$lang['Previous image'] = '';
+$lang['Previous page'] = '';
+$lang['Thumbnails'] = '';
 ?>
Index: /extensions/akBookStyle/trunk/main.inc.php
===================================================================
--- /extensions/akBookStyle/trunk/main.inc.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/main.inc.php	(revision 10975)
@@ -23,5 +23,5 @@
 /*
 Plugin Name: akBookStyle
-Version: 0.3.1
+Version: 0.4.0
 Description: Book style for designers
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=307
Index: /extensions/akBookStyle/trunk/maintain.inc.php
===================================================================
--- /extensions/akBookStyle/trunk/maintain.inc.php	(revision 10974)
+++ /extensions/akBookStyle/trunk/maintain.inc.php	(revision 10975)
@@ -3,5 +3,5 @@
 // | akBookStyle  - a plugin for Piwigo                                    |
 // +-----------------------------------------------------------------------+
-// | Copyright(C) 2009-2010 Nicolas Roudaire        http://www.nikrou.net  |
+// | Copyright(C) 2009-2011 Nicolas Roudaire        http://www.nikrou.net  |
 // | Copyright(C) 2009      vdigital                                       |
 // +-----------------------------------------------------------------------+
@@ -37,5 +37,7 @@
   $config_file = $GLOBALS['conf']['local_data_dir'].'/plugins/';
   $config_file .= basename(dirname(__FILE__)).'.dat';
-  unlink($config_file);
+  if (file_exists($config_file)) {
+    unlink($config_file);
+  }
 }
 ?>
Index: /extensions/akBookStyle/trunk/template/admin.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/admin.tpl	(revision 10974)
+++ /extensions/akBookStyle/trunk/template/admin.tpl	(revision 10975)
@@ -4,12 +4,12 @@
 
 <div class="titrePage">
-  <h2>{'ak Book Style'|translate}</h2>
+  <h2>{'ak Book Style'|@translate}</h2>
 </div>
 
 <form method="post" action="" class="general">
 <fieldset>
-  <legend>{'Main configuration'|translate}</legend>
+  <legend>{'Main configuration'|@translate}</legend>
   <p class="field">
-    <label>{'Applicable categorie(s)'|translate}
+    <label>{'Applicable categorie(s)'|@translate}
       <select name="ak_categories[]" multiple="multiple" size="{$ak_categories|@count|@max:3}">
         <option value=""></option>
@@ -19,30 +19,30 @@
   </p>
   <p class="field">
-    <label>{'Number of thumbnails per page'|translate}
+    <label>{'Number of thumbnails per page'|@translate}
       <input type="text" name="ak_by_page" value="{$AK_BY_PAGE}"> 
     </label>
   </p>
   <p class="field">
-    <label>{'Number of column'|translate} 
+    <label>{'Number of column'|@translate} 
       <input type="text" name="ak_by_line" value="{$AK_BY_LINE}">({'or number of lines for Top/Bottom'|@translate})
     </label>
   </p>
   <p class="field">
-    <label>{'Thumbnail size'|translate}
+    <label>{'Thumbnail size'|@translate}
       <input type="text" name="ak_thumbnail_size" value="{$AK_THUMBNAIL_SIZE}">
     </label>
   </p>
   <p class="field">
-    <label>{'Event to show medium picture.'|translate}
-      {html_radios name='ak_mouse_event' values=$AK_AVAILABLE_EVENTS output=$AK_EVENTS_LABELS|translate selected=$AK_MOUSE_EVENT}
+    <label>{'Event to show medium picture.'|@translate}
+      {html_radios name="ak_mouse_event" options=$AK_EVENTS selected=$AK_EVENT}
     </label>
   </p>
   <p class="field">
-    <label>{'Thumbnails location'|translate}
-      {html_radios name="ak_thumbnails_loc" values=$AK_THUMBNAILS_LOCATIONS_KEYS output=$AK_THUMBNAILS_LOCATIONS_VALUES|translate selected="$AK_THUMBNAILS_LOC"}
+    <label>{'Thumbnails location'|@translate}
+      {html_radios name="ak_thumbnails_loc" options=$AK_THUMBNAILS_LOCATIONS selected="$AK_THUMBNAILS_LOC"}
     </label>
   </p>
 </fieldset>
 
-<p><input class="submit" type="submit" name="submit" value="{'Submit'|translate}"></p>
+<p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}"></p>
 </form>
Index: /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl
===================================================================
--- /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl	(revision 10974)
+++ /extensions/akBookStyle/trunk/template/ak_thumbnails.tpl	(revision 10975)
@@ -1,12 +1,10 @@
-{known_script id="jquery" src=$ROOT_URL|cat:"themes/default/js/jquery.packed.js"}
-{html_head} 
-<link rel="stylesheet" type="text/css" href="{$AK_PLUGIN_CSS}/style.css">
-<script type="text/javascript">
+{combine_css path="$AK_PLUGIN_CSS/style.css"}
+{combine_script id="ak_jquery_load" require="jquery" path="$AK_PLUGIN_JS/ak_jquery-load.js"}
+
+{footer_script require="ak_jquery_load"}
 var dir_thumbnail = '{$AK_DIR_THUMBNAIL}';
 var prefix_thumbnail = '{$AK_PREFIX_THUMBNAIL}';
 var ak_mouse_event = '{$AK_MOUSE_EVENT}';
-</script>
-<script type="text/javascript" src="{$AK_PLUGIN_JS}/ak_jquery-load.js"></script>
-{/html_head}
+{/footer_script}
 
 {assign var=temp value=$TITLE|@strripos:'<a href='}
