Index: /extensions/GDThumb/admin.php
===================================================================
--- /extensions/GDThumb/admin.php	(revision 31244)
+++ /extensions/GDThumb/admin.php	(revision 31245)
@@ -3,12 +3,11 @@
 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
 
-function delete_gdthumb_cache($height) {
-  $pattern = '#.*-cu_s9999x'.$height.'\.[a-zA-Z0-9]{3,4}$#';
-  if ($contents = @opendir(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR)):
+function int_delete_gdthumb_cache($pattern) {
+  if ($contents = @opendir(PHPWG_ROOT_PATH . PWG_DERIVATIVE_DIR)):
     while (($node = readdir($contents)) !== false):
       if ($node != '.'
           and $node != '..'
-          and is_dir(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$node)):
-        clear_derivative_cache_rec(PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$node, $pattern);
+          and is_dir(PHPWG_ROOT_PATH . PWG_DERIVATIVE_DIR . $node)):
+        clear_derivative_cache_rec(PHPWG_ROOT_PATH . PWG_DERIVATIVE_DIR . $node, $pattern);
       endif;
     endwhile;
@@ -16,4 +15,15 @@
   endif;
 }
+
+function delete_gdthumb_cache($height) {
+  int_delete_gdthumb_cache('#.*-cu_s9999x' . $height . '\.[a-zA-Z0-9]{3,4}$#');
+  int_delete_gdthumb_cache('#.*-cu_s' . $height . 'x9999\.[a-zA-Z0-9]{3,4}$#');
+}
+
+global $template, $conf, $page;
+
+load_language('plugin.lang', GDTHUMB_PATH);
+include(dirname(__FILE__).'/config_default.inc.php');
+$params = $conf['gdThumb'];
 
 if (isset($_GET['getMissingDerivative'])) {
@@ -43,5 +53,9 @@
       if ($src_image->is_mimetype())
         continue;
-      $derivative = new DerivativeImage(ImageStdParams::get_custom(9999, $conf['gdThumb']['height']), $src_image);
+      if (($params['method'] == "slide") || ($params['method'] == "square")):
+        $derivative = new DerivativeImage(ImageStdParams::get_custom($params['height'], 9999), $src_image);
+      else:
+        $derivative = new DerivativeImage(ImageStdParams::get_custom(9999, $params['height']), $src_image);
+      endif;
       if (@filemtime($derivative->get_path())===false) {
         $urls[] = $derivative->get_url().$uid;
@@ -64,15 +78,9 @@
 }
 
-global $template, $conf, $page;
-
-load_language('plugin.lang', GDTHUMB_PATH);
-include(dirname(__FILE__).'/config_default.inc.php');
-$params = $conf['gdThumb'];
-
 // Delete cache
 if (isset($_POST['cachedelete'])) {
   check_pwg_token();
-  delete_gdthumb_cache($conf['gdThumb']['height']);
-  delete_gdthumb_cache($conf['gdThumb']['height'] * 2 + $conf['gdThumb']['margin']);
+  delete_gdthumb_cache($params['height']);
+  delete_gdthumb_cache($params['height'] * 2 + $params['margin']);
   redirect('admin.php?page=plugin-GDThumb');
 }
@@ -92,5 +100,35 @@
   endif;
 
-  $big_thumb = !empty($_POST['big_thumb']);
+  $big_thumb        = !empty($_POST['big_thumb']);
+  $big_thumb_noinpw = !empty($_POST['big_thumb_noinpw']);
+  $thumb_animate    = !empty($_POST['thumb_animate']);
+  $thumb_mode_album = $_POST['thumb_mode_album'];
+  $thumb_mode_photo = $_POST['thumb_mode_photo'];
+
+  if ($method == "slide"):
+    if ($big_thumb):
+      $big_thumb = false;
+      array_push($page['warnings'], l10n('Big thumb cannot be used in Slide mode. Disabled'));
+    endif;
+    if ($thumb_animate):
+      $thumb_animate = false;
+      array_push($page['warnings'], l10n('Thumb animation cannot be used in Slide mode. Disabled'));
+    endif;
+
+    if (($thumb_mode_album == "overlay-ex") || ($thumb_mode_album == "overlay") || ($thumb_mode_album == "top") || ($thumb_mode_album == "bottom")):
+      $thumb_mode_album = "bottom_static";
+      array_push($page['warnings'], l10n('This Thumb mode cannot be used in Slide mode. Changed to default'));
+    endif;
+
+    if (($thumb_mode_photo == "overlay-ex") || ($thumb_mode_photo == "overlay") || ($thumb_mode_photo == "top") || ($thumb_mode_photo == "bottom")):
+      $thumb_mode_photo = "bottom_static";
+      array_push($page['warnings'], l10n('This Thumb mode cannot be used in Slide mode. Changed to default'));
+    endif;
+  endif;
+
+  if (($big_thumb_noinpw) && (!$big_thumb)):
+    $big_thumb_noinpw = false;
+  endif;
+
   $params  = array(
       'height'          => $_POST['height']
@@ -98,23 +136,23 @@
     , 'nb_image_page'   => $_POST['nb_image_page']
     , 'big_thumb'       => $big_thumb
-    , 'big_thumb_noinpw'=> !empty($_POST['big_thumb_noinpw'])
+    , 'big_thumb_noinpw'=> $big_thumb_noinpw
     , 'cache_big_thumb' => !empty($_POST['cache_big_thumb'])
     , 'normalize_title' => $normalize
     , 'method'          => $method
-    , 'thumb_mode_album'=> $_POST['thumb_mode_album']
-    , 'thumb_mode_photo'=> $_POST['thumb_mode_photo']
+    , 'thumb_mode_album'=> $thumb_mode_album
+    , 'thumb_mode_photo'=> $thumb_mode_photo
     , 'thumb_metamode'  => $_POST['thumb_metamode']
     , 'no_wordwrap'     => !empty($_POST['no_wordwrap'])
-    , 'thumb_animate'   => !empty($_POST['thumb_animate'])
+    , 'thumb_animate'   => $thumb_animate
   );
 
   if (!is_numeric($params['height'])) {
-    array_push($page['errors'], 'Thumbnails max height must be an integer.');
+    array_push($page['errors'], l10n('Thumbnails max height must be an integer'));
   }
   if (!is_numeric($params['margin'])) {
-    array_push($page['errors'], 'Margin between thumbnails must be an integer.');
+    array_push($page['errors'], l10n('Margin between thumbnails must be an integer'));
   }
   if (!is_numeric($params['nb_image_page'])) {
-    array_push($page['errors'], 'Number of photos per page must be an integer.');
+    array_push($page['errors'], l10n('Number of photos per page must be an integer'));
   }
 
@@ -127,11 +165,5 @@
 
   if (empty($page['errors'])) {
-    $query = '
-  UPDATE ' . CONFIG_TABLE . '
-    SET value="' . addslashes(serialize($params)) . '"
-    WHERE param="gdThumb"
-    LIMIT 1';
-    pwg_query($query);
-    
+    conf_update_param('gdThumb', $params);
     array_push($page['infos'], l10n('Information data registered in database'));
   }
Index: /extensions/GDThumb/changelog.txt
===================================================================
--- /extensions/GDThumb/changelog.txt	(revision 31244)
+++ /extensions/GDThumb/changelog.txt	(revision 31245)
@@ -26,4 +26,12 @@
 
 === Changelog ===
+version 1.0.18
++ ADMIN: style improvements
++ ADMIN: Experimental: New option for Thumbnail mode - "slide" - Square thumb with standard static Overlay (bottom/top)
++ ADMIN: Changed to use standard PWG persistance method for settings
++ Improved handling of derivatives
+- Fixed issue with Photo thumb metadata not including Visits and Rating metadata
+- Translation improvements. New languages: NO, TR, GR, PT
+
 version 1.0.17
 + All language translations are deprecated to allow full reset. en_UK folder now includes full set of translation resources
Index: /extensions/GDThumb/css/gdthumb.css
===================================================================
--- /extensions/GDThumb/css/gdthumb.css	(revision 31244)
+++ /extensions/GDThumb/css/gdthumb.css	(revision 31245)
@@ -1,5 +1,5 @@
-ul.thumbnails { overflow: hidden; }
+ul.thumbnails { overflow: hidden; background: inherit; }
 
-ul.thumbnails .gdthumb   { position: relative; overflow: hidden; float: left; display: inline; background: none !important; }
+ul.thumbnails .gdthumb   { position: relative; overflow: hidden; float: left; display: inline; background: inherit !important; }
 ul.thumbnails .gdthumb a { position: absolute; z-index:0; }
 
@@ -9,5 +9,6 @@
 ul.thumbnails .gdthumb.animate:hover img { transform: scale(1.5,1.5) rotate(10deg); -ms-transform: scale(1.5,1.5) rotate(10deg); -webkit-transform: scale(1.5,1.5) rotate(10deg); -o-transform: scale(1.5,1.5) rotate(10deg); -moz-transform: scale(1.5,1.5) rotate(10deg); }
 
-ul.thumbnails .gdthumb .thumbLegend    { position: absolute; z-index: 1; height: 5em; left:0; right:0; padding:5px 0; width:100%; background:rgba(0,0,0,0.7); text-align:center; overflow:hidden; color:#aaa; padding-left: 4px; padding-right: 4px; }
+ul.thumbnails .gdthumb .thumbLegend { position: absolute; z-index: 1; height: 5em; left:0; right:0; padding:5px 0; width:100%; background:rgba(0,0,0,0.7); text-align:center; overflow:hidden; color:#aaa; padding-left: 4px; padding-right: 4px; }
+ul.thumbnails .gdthumb.slide .thumbLegend { background: inherit; height: auto; }
 
 ul.thumbnails .thumbLegend .thumbName  { display:block; color:#eee; }
@@ -49,4 +50,8 @@
 ul.thumbnails .gdthumb .overlay-ex.thumbLegend .thumbInfo .glyphicon { padding-top: 3px; font-size: 17px; }
 
+ul.thumbnails.nowrap .gdthumb .thumbLegend { white-space: nowrap; overflow: hidden; height: auto; }
 
-ul.thumbnails.nowrap .gdthumb .thumbLegend { white-space: nowrap; overflow: hidden; height: auto; }
+body.theme-whitehawk .gdthumb.slide { border: 1px solid #000; }
+body.theme-whitehawk .gdthumb.slide .thumbLegend.bottom_static { background: #FFF; color: #555; }
+body.theme-whitehawk .gdthumb.slide .thumbLegend.bottom_static .thumbTitle { color: #555; }
+body.theme-whitehawk .gdthumb.slide .thumbLegend.bottom_static .thumbName { color: #555; }
Index: /extensions/GDThumb/js/gdthumb.js
===================================================================
--- /extensions/GDThumb/js/gdthumb.js	(revision 31244)
+++ /extensions/GDThumb/js/gdthumb.js	(revision 31245)
@@ -64,5 +64,10 @@
       GDThumb.big_thumb.crop   = GDThumb.big_thumb.height;
       GDThumb.max_height = thumb_width;
-    } 
+    } else if (GDThumb.method == 'slide') {
+      var main_width = jQuery('ul.thumbnails').width();
+      var max_col_count = Math.floor(main_width / GDThumb.max_height);
+      var thumb_width   = Math.floor(main_width / max_col_count) - GDThumb.margin;
+      GDThumb.max_height = thumb_width;
+    }
 
     GDThumb.t = new Array;
@@ -71,11 +76,13 @@
       height = parseInt(jQuery(this).attr('height'));
       th = {index: index, width: width, height: height, real_width: width, real_height: height};
+
       if (GDThumb.check_pv) {
         var ratio = th.width / th.height;
         GDThumb.big_thumb_block = (ratio > 2.2) || (ratio < 0.455);
       }
-      if ((GDThumb.method == 'square') && (th.height != th.width)) {
+
+      if (((GDThumb.method == 'square') || (GDThumb.method == 'slide')) && (th.height != th.width)) {
+        th.width  = GDThumb.max_height;
         th.height = GDThumb.max_height;
-        th.width  = GDThumb.max_height;
         th.crop   = GDThumb.max_height;
       } else if (height < GDThumb.max_height) {
@@ -110,5 +117,10 @@
     var best_size = {width: 1, height: 1};
 
-    if (GDThumb.method == 'square') {
+    if (GDThumb.method == 'slide') {
+      best_size.width  = GDThumb.max_height;
+      best_size.height = GDThumb.max_height;
+
+      GDThumb.resize(first_thumb, GDThumb.t[0].real_width, GDThumb.t[0].real_height, GDThumb.t[0].width, GDThumb.t[0].height, false);
+    } else if (GDThumb.method == 'square') {
       if (GDThumb.big_thumb != null) {
         best_size.width = GDThumb.big_thumb.width;
@@ -215,5 +227,5 @@
         for (j=0;j<thumb_process.length;j++) {
 
-          if (GDThumb.method == 'square') {
+          if ((GDThumb.method == 'square') || (GDThumb.method == 'slide')) {
             new_width  = GDThumb.max_height;
             new_height = GDThumb.max_height;
@@ -254,5 +266,8 @@
 
   resize: function(thumb, width, height, new_width, new_height, is_big) {
-    if ((!is_big) && (GDThumb.method == 'square')) {
+
+    use_crop = true;
+    if (GDThumb.method == 'slide') {
+      use_crop = false;
       thumb.css({height: '', width: ''});
       new_width = new_height;
@@ -268,4 +283,22 @@
       height_crop = Math.round((real_height - new_height) / 2);
       width_crop = Math.round((real_width - new_height) / 2);
+      thumb.css({
+        height: real_height+'px',
+        width: real_width+'px'
+      });
+    } else if ((!is_big) && (GDThumb.method == 'square')) {
+      thumb.css({height: '', width: ''});
+      new_width = new_height;
+
+      if (width < height) {
+        real_height = Math.round(height * new_width / width);
+        real_width  = new_width;
+      } else {
+        real_height = new_width;
+        real_width  = Math.round(width * new_height / height);
+      }
+
+      height_crop = Math.round((real_height - new_height) / 2);
+      width_crop = Math.round((real_width - new_width) / 2);
       thumb.css({
         height: real_height+'px',
@@ -298,5 +331,9 @@
 
     thumb.parents('li').css({ height: new_height+'px', width: new_width+'px' });
-    thumb.parent('a').css({ clip: 'rect('+height_crop+'px, '+(new_width+width_crop)+'px, '+(new_height+height_crop)+'px, '+width_crop+'px)', top: -height_crop+'px', left: -width_crop+'px' });
+    if (use_crop) {
+      thumb.parent('a').css({ clip: 'rect('+height_crop+'px, '+(new_width+width_crop)+'px, '+(new_height+height_crop)+'px, '+width_crop+'px)', top: -height_crop+'px', left: -width_crop+'px' });
+    } else {
+      thumb.parent('a').css({ top: -height_crop+'px', left: -width_crop+'px' });
+    }
   }
 }
Index: /extensions/GDThumb/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/GDThumb/language/en_UK/plugin.lang.php	(revision 31244)
+++ /extensions/GDThumb/language/en_UK/plugin.lang.php	(revision 31245)
@@ -6,5 +6,5 @@
 $lang['Block for Panoramic Photo Page'] = 'Block for Panoramic Photo Page';
 $lang['Cache have been generated'] = 'Cache have been generated';
-$lang['Cache Informations'] = 'Cache Information';
+$lang['Cache Informations'] = 'Cache Informations';
 $lang['Cache the big thumbnails (recommended)'] = 'Cache the big thumbnails (recommended)';
 $lang['Changelog'] = 'Changelog';
@@ -34,5 +34,5 @@
 $lang['Prevent word wrap'] = 'Prevent word wrap';
 $lang['Purge thumbnails cache'] = 'Purge thumbnails cache';
-$lang['Scale thumbnails'] = 'Scale thumbnails';
+$lang['Thumbnail Mode'] = 'Thumbnail Mode';
 $lang['Show thumbnails caption'] = 'Show thumbnails caption';
 $lang['Square'] = 'Square';
@@ -44,3 +44,14 @@
 $lang['Use Description if Set'] = 'Use Description if Set';
 $lang['Vertical'] = 'Vertical';
- 
+$lang['Slide'] = 'Slide';
+$lang['%d visit'] = '%d visit';
+$lang['%d visits'] = '%d visits';
+$lang['Big thumb cannot be used in Slide mode. Disabled'] = 'Big thumb cannot be used in Slide mode. Disabled';
+$lang['Margin between thumbnails must be an integer'] = 'Margin between thumbnails must be an integer';
+$lang['Number of photos per page must be an integer'] = 'Number of photos per page must be an integer';
+$lang['Rating:'] = 'Rating:';
+$lang['This Thumb mode cannot be used in Slide mode. Changed to default'] = 'This Thumb mode cannot be used in Slide mode. Changed to default';
+$lang['Thumb animation cannot be used in Slide mode. Disabled'] = 'Thumb animation cannot be used in Slide mode. Disabled';
+$lang['Thumbnails max height must be an integer'] = 'Thumbnails max height must be an integer';
+
+?>
Index: /extensions/GDThumb/main.inc.php
===================================================================
--- /extensions/GDThumb/main.inc.php	(revision 31244)
+++ /extensions/GDThumb/main.inc.php	(revision 31245)
@@ -2,5 +2,5 @@
 /*
 Plugin Name: gdThumb
-Version: 1.0.17
+Version: 1.0.18
 Description: Apply Masonry style to album or image thumbs
 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=771
@@ -19,5 +19,5 @@
 // | Plugin constants                                               |
 // +-----------------------------------------------------------------------+
-define('GDTHUMB_VERSION', '1.0.17');
+define('GDTHUMB_VERSION', '1.0.18');
 define('GDTHUMB_ID',      basename(dirname(__FILE__)));
 define('GDTHUMB_PATH' ,   PHPWG_PLUGINS_PATH . GDTHUMB_ID . '/');
@@ -28,9 +28,5 @@
 if (!isset($conf['gdThumb'])):
   include(dirname(__FILE__).'/config_default.inc.php');
-
-  $query = '
-INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment)
-VALUES ("gdThumb" , "'.addslashes(serialize($config_default)).'" , "GDThumb plugin parameters");';
-  pwg_query($query);
+  conf_update_param('gdThumb', $config_default);
   load_conf_from_db();
 endif;
@@ -113,8 +109,16 @@
   $template->set_filename( 'index_thumbnails', dirname(__FILE__) . '/template/gdthumb_thumb.tpl');
   $template->assign('GDThumb', $confTemp);
-  $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height']));
+  if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")):
+    $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom($confTemp['height'], 9999));
+  else:
+    $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height']));
+  endif;
 
   if ($confTemp['big_thumb'] and !empty($tpl_vars[0])):
-    $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']);
+    if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")):
+      $derivative_params = ImageStdParams::get_custom(2 * $confTemp['height'] + $confTemp['margin'], 9999);
+    else:
+      $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']);
+    endif;
     $template->assign('GDThumb_big', new DerivativeImage($derivative_params, $tpl_vars[0]['src_image']));
   endif;
@@ -132,10 +136,18 @@
   $template->set_filename( 'index_category_thumbnails', dirname(__FILE__) . '/template/gdthumb_cat.tpl');
   $template->assign('GDThumb', $confTemp);
-  $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height']));
+  if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")):
+    $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom($confTemp['height'], 9999));
+  else:
+    $template->assign('GDThumb_derivative_params', ImageStdParams::get_custom(9999, $confTemp['height']));
+  endif;
 
   if ($confTemp['big_thumb'] and !empty($tpl_vars[0])):
     $id = $tpl_vars[0]["representative_picture_id"];
     if (($id) && ($rep = $tpl_vars[0]["representative"])):
-      $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']);
+      if (($confTemp['method'] == "slide") || ($confTemp['method'] == "square")):
+        $derivative_params = ImageStdParams::get_custom(2 * $confTemp['height'] + $confTemp['margin'], 9999);
+      else:
+        $derivative_params = ImageStdParams::get_custom(9999, 2 * $confTemp['height'] + $confTemp['margin']);
+      endif;
       $template->assign('GDThumb_big', new DerivativeImage($derivative_params, $rep['src_image']));
     endif;
Index: /extensions/GDThumb/template/admin.tpl
===================================================================
--- /extensions/GDThumb/template/admin.tpl	(revision 31244)
+++ /extensions/GDThumb/template/admin.tpl	(revision 31245)
@@ -24,4 +24,13 @@
       <label for="direction">{'Masonry Type'|@translate}</label>
     </li>
+    <li>
+      <select id="method" name="method" >
+        <option {if $METHOD == 'crop'}selected="selected"{/if} value="crop">{'Crop (Default)'|@translate}</option>
+        <option {if $METHOD == 'resize'}selected="selected"{/if} value="resize">{'Resize'|@translate}</option>
+        <option {if $METHOD == 'square'}selected="selected"{/if} value="square">{'Square'|@translate}</option>
+        <option {if $METHOD == 'slide'}selected="selected"{/if} value="slide">{'Slide'|@translate}</option>
+      </select>
+      <label for="method">{'Thumbnail Mode'|@translate}</label>
+    </li>
     <li><input id="height" type="text" size="2" maxlength="3" name="height" value="{$HEIGHT}"><label for="height">{'Thumbnails max height'|@translate}&nbsp;(px)</label></li>
     <li><input id="margin" type="text" size="2" maxlength="3" name="margin" value="{$MARGIN}"><label for="margin">{'Margin between thumbnails'|@translate}&nbsp;px</label></li>
@@ -31,4 +40,5 @@
     <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label><span class="graphicalCheckbox {if $BIG_THUMB_NOINPW}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="big_thumb_noinpw" id="big_thumb_noinpw" type="checkbox" value="1" {if $BIG_THUMB_NOINPW}checked="checked"{/if}>{'Block for Panoramic Photo Page'|@translate} (x2.2+)</label></li>
     <li><label><span class="graphicalCheckbox {if $CACHE_BIG_THUMB}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="cache_big_thumb" id="cache_big_thumb" type="checkbox" value="1" {if $CACHE_BIG_THUMB}checked="checked"{/if}>{'Cache the big thumbnails (recommended)'|@translate}</label></li>
+    <li><label><span class="graphicalCheckbox {if $THUMB_ANIMATE}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="thumb_animate" id="thumb_animate" type="checkbox" value="1" {if $THUMB_ANIMATE}checked="checked"{/if}>{'Animate thumbnail on hover'|@translate}</label></li>
     <li>
       <select id="normalize_title" name="normalize_title" >
@@ -40,12 +50,4 @@
     </li>
     <li><label><span class="graphicalCheckbox {if $NO_WORDWRAP}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="no_wordwrap" id="no_wordwrap" type="checkbox" value="1" {if $NO_WORDWRAP}checked="checked"{/if}>{'Prevent word wrap'|@translate}</label></li>
-    <li>
-      <select id="method" name="method" >
-        <option {if $METHOD == 'crop'}selected="selected"{/if} value="crop">{'Crop (Default)'|@translate}</option>
-        <option {if $METHOD == 'resize'}selected="selected"{/if} value="resize">{'Resize'|@translate}</option>
-        <option {if $METHOD == 'square'}selected="selected"{/if} value="square">{'Square'|@translate}</option>
-      </select>
-      <label for="method">{'Scale thumbnails'|@translate}</label>
-    </li>
     <li>
       <select id="thumb_mode_album" name="thumb_mode_album" >
@@ -84,5 +86,4 @@
       <label for="thumb_metamode">{'Metadata Display Mode'|@translate}</label>
     </li>
-    <li><label><span class="graphicalCheckbox {if $THUMB_ANIMATE}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="thumb_animate" id="thumb_animate" type="checkbox" value="1" {if $THUMB_ANIMATE}checked="checked"{/if}>{'Animate thumbnail on hover'|@translate}</label></li>
   </ul>
 </fieldset>
@@ -91,5 +92,5 @@
   <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
   <input type="submit" name="submit" value="{'Submit'|@translate}">
-  <input type="submit" name="cachedelete" id="cachedelete" value="{'Purge thumbnails cache'|@translate}" title="{'Delete images in GDThumb cache.'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');">
+  <input type="button" name="cachedelete" id="cachedelete" value="{'Purge thumbnails cache'|@translate}" title="{'Delete images in GDThumb cache.'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');">
   <input type="button" name="cachebuild" id="cachebuild" value="{'Pre-cache thumbnails'|@translate}" title="{'Finds images that have not been cached and creates the cached version.'|@translate}" onclick="jQuery.gdThumb_start();">
 </p>
Index: /extensions/GDThumb/template/gdthumb_cat.tpl
===================================================================
--- /extensions/GDThumb/template/gdthumb_cat.tpl	(revision 31244)
+++ /extensions/GDThumb/template/gdthumb_cat.tpl	(revision 31245)
@@ -7,5 +7,5 @@
 {assign var=derivative value=$pwg->derivative($GDThumb_derivative_params, $cat.representative.src_image)}
 
-  <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if}">
+  <li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} {$GDThumb.method}">
     {if $GDThumb.thumb_mode_album !== "hide" }
     <span class="thumbLegend {$GDThumb.thumb_mode_album}">
Index: /extensions/GDThumb/template/gdthumb_thumb.tpl
===================================================================
--- /extensions/GDThumb/template/gdthumb_thumb.tpl	(revision 31244)
+++ /extensions/GDThumb/template/gdthumb_thumb.tpl	(revision 31245)
@@ -6,5 +6,5 @@
   {* {$thumbnails|print_r} *}
 
-<li class="gdthumb{if $GDThumb.thumb_animate} animate{/if}">
+<li class="gdthumb{if $GDThumb.thumb_animate} animate{/if} {$GDThumb.method}">
   {if $GDThumb.thumb_mode_photo !== "hide" }
   <span class="thumbLegend {$GDThumb.thumb_mode_photo}">
@@ -42,13 +42,14 @@
     {elseif $GDThumb.thumb_metamode !== "hide"}
       {if isset($thumbnail.NB_COMMENTS)}
-      <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
-        {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
-      </span>
+      <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">{$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}</span>
       {/if}
       {if isset($thumbnail.NB_COMMENTS) && isset($thumbnail.NB_HITS)} - {/if}
       {if isset($thumbnail.NB_HITS)}
-      <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
-        {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
-      </span>
+      <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">{$pwg->l10n_dec('%d visit', '%d visits',$thumbnail.NB_HITS)}</span>
+      {elseif isset($thumbnail.hit)}
+      <span class="{if 0==$thumbnail.hit}zero {/if}nb-hits">{$pwg->l10n_dec('%d visit', '%d visits',$thumbnail.hit)}</span>
+      {/if}
+      {if isset($thumbnail.rating_score)}
+      <span class="{if 0==$thumbnail.rating_score}zero {/if}rating">, {'Rating:'|@translate} {$thumbnail.rating_score}</span>
       {/if}
     {/if}
