Index: /extensions/stripped_black_bloc/language/en_UK/theme.lang.php
===================================================================
--- /extensions/stripped_black_bloc/language/en_UK/theme.lang.php	(revision 11823)
+++ /extensions/stripped_black_bloc/language/en_UK/theme.lang.php	(revision 13894)
@@ -7,8 +7,11 @@
 $lang['Width of columns'] = "Width of columns";
 $lang['Width of thumbnails'] = "Width of thumbnails";
-$lang['it need to be inferior than the width of columns'] = "it needs to be strictly inferior than the width of columns";
-$lang['The thumbnails can be generated by the theme'] = "The thumbnails can be generated by the theme";
-$lang['option thumbnail generated'] = "generate all the thumbnails : they will have all the same width, the \"Width of thumbnails\", with respect to the original proportions";
-$lang['option thumbnail auto'] = "generate only the thumbnails with a width lower than that indicated in  \"Width of thumbnails\" : it allows you to generate by Piwigo thumbnails much larger to have a variation of height (much more attractive)";
-$lang['option thumbnail piwigo'] = "generate nothing: thumbnails will be the ones of Piwigo";
+$lang['Create a big thumbnail every'] = "Create a big thumbnail every";
+$lang['... starting to the position number'] = "... starting to the position number";
+$lang['(set 0 to disable)'] = "(set 0 to disable)";
+$lang['(it need to be inferior than the width of columns)'] = "(it needs to be strictly inferior than the width of columns)";
+$lang['About big thumbnails, for the albums :'] = "About big thumbnails, for the albums :";
+$lang['don\'t generate big thumbnails'] = "don't generate big thumbnails";
+$lang['use the same config as above'] = "use the same config as above";
+$lang['always generate big thumbnails'] = "always generate big thumbnails";
 ?>
Index: /extensions/stripped_black_bloc/language/uk_UA/theme.lang.php
===================================================================
--- /extensions/stripped_black_bloc/language/uk_UA/theme.lang.php	(revision 13204)
+++ /extensions/stripped_black_bloc/language/uk_UA/theme.lang.php	(revision 13894)
@@ -7,8 +7,11 @@
 $lang['Width of columns'] = "Ширина стовпців";
 $lang['Width of thumbnails'] = "Ширина мініатюри";
-$lang['it need to be inferior than the width of columns'] = "вона повинна суворо поступаютися ширину стовпців";
-$lang['The thumbnails can be generated by the theme'] = "Мініатюри можуть бути отримані на тему";
-$lang['option thumbnail generated'] = "створити всі ескізи: вони будуть мати все ту ж ширину, \"Ширина мініатюри\", по відношенню до оригінальних пропорцій";
-$lang['option thumbnail auto'] = "створювати тільки ескізи з шириною менше, ніж зазначено в \"Ширина мініатюри\": він дозволяє генерувати у вигляді мініатюр Piwigo набагато більше, аби зміни висоту(є більш привабливим)";
-$lang['option thumbnail piwigo'] = "генерувати нічого: мініатюри будуть одними з Piwigo";
+$lang['Create a big thumbnail every'] = "Create a big thumbnail every";
+$lang['... starting to the position number'] = "... starting to the position number";
+$lang['(set 0 to disable)'] = "(set 0 to disable)";
+$lang['(it need to be inferior than the width of columns)'] = "(вона повинна суворо поступаютися ширину стовпців)";
+$lang['About big thumbnails, for the albums :'] = "Мініатюри можуть бути отримані на тему";
+$lang['don\'t generate big thumbnails'] = "don't generate big thumbnails";
+$lang['use the same config as above'] = "use the same config as above";
+$lang['always generate big thumbnails'] = "always generate big thumbnails";
 ?>
Index: /extensions/stripped_black_bloc/language/fr_FR/theme.lang.php
===================================================================
--- /extensions/stripped_black_bloc/language/fr_FR/theme.lang.php	(revision 11823)
+++ /extensions/stripped_black_bloc/language/fr_FR/theme.lang.php	(revision 13894)
@@ -7,8 +7,11 @@
 $lang['Width of columns'] = "Largeur des colonnes";
 $lang['Width of thumbnails'] = "Largeur des miniatures";
-$lang['it need to be inferior than the width of columns'] = "cette largeur doit être strictement inférieure à celle des colonnes";
-$lang['The thumbnails can be generated by the theme'] = "Les miniatures peuvent être générées par le thème";
-$lang['option thumbnail generated'] = "générer toutes les miniatures : elles auront toutes la largeur indiquée dans \"Largeur des miniatures\" avec les proportions d'origines conservées";
-$lang['option thumbnail auto'] = "générer uniquement les miniatures ayant une largeur inférieure à celle indiquée dans \"Largeur des miniatures\" : cela permet notamment de générer par Piwigo des miniatures plus grosses pour avoir une variation de hauteur";
-$lang['option thumbnail piwigo'] = "ne rien générer : les miniatures seront celles de Piwigo";
+$lang['Create a big thumbnail every'] = "Créer une grosse miniature toutes les";
+$lang['... starting to the position number'] = "...à commencer par la position numéro";
+$lang['(set 0 to disable)'] = "(mettre 0 pour désactiver)";
+$lang['(it need to be inferior than the width of columns)'] = "(cette largeur doit être strictement inférieure à celle des colonnes)";
+$lang['About big thumbnails, for the albums :'] = "A propos de grosses miniatures, pour les images représentatives des albums :";
+$lang['don\'t generate big thumbnails'] = "ne pas générer de grosses miniatures";
+$lang['use the same config as above'] = "utiliser la config 'Créer une grosse miniature toutes les' ci-dessus";
+$lang['always generate big thumbnails'] = "toujours générer des grosses miniatures";
 ?>
Index: /extensions/stripped_black_bloc/themeconf.inc.php
===================================================================
--- /extensions/stripped_black_bloc/themeconf.inc.php	(revision 13015)
+++ /extensions/stripped_black_bloc/themeconf.inc.php	(revision 13894)
@@ -48,62 +48,12 @@
   global $template, $conf;
   $config = unserialize( $conf['stripped_black_bloc'] );
+  $template->assign( 'stripped_black_bloc', $config );
   $new_tplvar=array();
   $i=1;
   foreach ($tpl_thumbnails_var as $tplvar)
   {
-    list($width, $height, $type, $attr) = getimagesize( str_replace("../", "", $tplvar['TN_SRC']) );
-    $tplvar['TN_WIDTH']=$width;
-    $tplvar['TN_HEIGHT']=$height;
-    if (!isset($tplvar['CAPTION_NB_IMAGES']))
-    {
-      $conf_thumbnail_width=($i==$config['starting_to']) ? $config['column_width']+$config['thumbnail_width'] : $config['thumbnail_width'];
-      $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc";
-    }
-    else
-    {
-      $conf_thumbnail_width=$config['thumbnail_width'];
-    }
-    if (isset($config['thumbnail']))
-    {
-      switch ($config['thumbnail'])
-      {
-        case 'generated':
-          if (isset($tplvar['FILE_WIDTH']))
-          {
-           $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".$tplvar['FILE_PATH']."&w=".$conf_thumbnail_width;
-          }
-          else
-          {
-           $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".str_replace("../", "", $tplvar['TN_SRC'])."&w=".$conf_thumbnail_width;
-          }
-          $tplvar['TN_HEIGHT']=floor($tplvar['TN_HEIGHT']*($conf_thumbnail_width/$tplvar['TN_WIDTH']));
-          $tplvar['TN_WIDTH']=$conf_thumbnail_width;
-         break;
-         case 'auto':
-          if($tplvar['TN_WIDTH']<=$conf_thumbnail_width)
-          {
-            if (isset($tplvar['FILE_WIDTH']))
-            {
-             $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".$tplvar['FILE_PATH']."&w=".$conf_thumbnail_width;
-            }
-            else
-            {
-             $tplvar['TN_SRC']=get_root_url().PHPWG_THEMES_PATH."stripped_black_bloc/library/phpthumb/phpThumb.php?src=../../../../".str_replace("../", "", $tplvar['TN_SRC'])."&w=".$conf_thumbnail_width;
-            }
-            $tplvar['TN_HEIGHT']=floor($tplvar['TN_HEIGHT']*($conf_thumbnail_width/$tplvar['TN_WIDTH']));
-            $tplvar['TN_WIDTH']=$conf_thumbnail_width;
-          }
-        break;
-        case 'piwigo':break;
-      }
-    }
-   $new_tplvar[]=$tplvar;
-    if ($i==$config['every_x'])
-    {
-      $i=1;
-    }
-    else {
-      $i++;    
-    }
+    $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc";
+    $new_tplvar[]=$tplvar;
+    $i= ($i==$config['every_x']) ? 1 : $i+1 ;
   }
   return $new_tplvar;
Index: /extensions/stripped_black_bloc/admin/upgrade.inc.php
===================================================================
--- /extensions/stripped_black_bloc/admin/upgrade.inc.php	(revision 12048)
+++ /extensions/stripped_black_bloc/admin/upgrade.inc.php	(revision 13894)
@@ -13,13 +13,11 @@
   'every_x'           => 20,
   'starting_to'           => 1,
-  'thumbnail'         => 'piwigo' //generated - auto - piwigo
-      );
-     $query = "
+  'catthumb'         => 'none' //none - same - all
+  );
+  $query = "
 INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
 VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#thumbnail(generated - auto - piwigo)');";
-     
-
-    pwg_query($query);
-    load_conf_from_db();
+  pwg_query($query);
+  load_conf_from_db();
 }
 elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=6)
@@ -31,10 +29,21 @@
   'every_x'           => 20,
   'starting_to'           => 1,
-  'thumbnail'         => 'piwigo' //generated - auto - piwigo
-      );
-      
-
+  'catthumb'         => 'none' //none - same - all
+  );
   conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config)));
-    load_conf_from_db();
+  load_conf_from_db();
+}
+elseif ($conff=unserialize($conf['stripped_black_bloc']) and ( !isset($conff['catthumb']) or empty($conff['catthumb'])) )
+{
+  $config = array(
+  'color_main'            => $conff['color_main'],
+  'column_width'            => $conff['column_width'],
+  'thumbnail_width'           => $conff['thumbnail_width'],
+  'every_x'           => $conff['every_x'],
+  'starting_to'           => $conff['starting_to'],
+  'catthumb'         => 'none' //none - same - all
+  );
+  conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config)));
+  load_conf_from_db();
 }
 ?>
Index: /extensions/stripped_black_bloc/admin/admin.inc.php
===================================================================
--- /extensions/stripped_black_bloc/admin/admin.inc.php	(revision 12048)
+++ /extensions/stripped_black_bloc/admin/admin.inc.php	(revision 13894)
@@ -5,6 +5,5 @@
 global $conf;
 
-if (!isset($conf['stripped_black_bloc']))
-  include(PHPWG_THEMES_PATH.'stripped_black_bloc/admin/upgrade.inc.php');
+include(PHPWG_THEMES_PATH.'stripped_black_bloc/admin/upgrade.inc.php');
 
 load_language('theme.lang', PHPWG_THEMES_PATH.'stripped_black_bloc/');
@@ -33,5 +32,5 @@
 	$config_send['every_x']=(isset($_POST['f_every_x'])) ? $_POST['f_every_x'] : 20;
 	$config_send['starting_to']=(isset($_POST['f_starting_to'])) ? $_POST['f_starting_to'] : 1;
-	$config_send['thumbnail']=(isset($_POST['f_thumbnail'])) ? $_POST['f_thumbnail'] : 'piwigo';
+	$config_send['catthumb']=(isset($_POST['f_catthumb'])) ? $_POST['f_catthumb'] : 'none';
 	conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config_send)));
 
Index: /extensions/stripped_black_bloc/admin/admin.tpl
===================================================================
--- /extensions/stripped_black_bloc/admin/admin.tpl	(revision 12048)
+++ /extensions/stripped_black_bloc/admin/admin.tpl	(revision 13894)
@@ -1,2 +1,13 @@
+{html_style}{literal}
+FORM.properties SPAN.property {
+    float: left;
+    font-weight: bold;
+    margin: 0;
+    padding: 0 0.5em 0 0;
+    text-align: right;
+    width: auto;
+}
+{/literal}{/html_style}
+
 <div class="titrePage">
   <h2>{'Stripped & Columns Theme Configuration'|@translate}</h2>
@@ -15,10 +26,10 @@
       <label for="column_width"><span class="property">{'Width of columns'|@translate}</span>&nbsp;</label>
       <input type="text" id="column_width" name="f_column_width" size="4" maxlength="4" value="{$options.column_width}" style="text-align:center;">
-      &nbsp;px
+      &nbsp;{'pixels'|@translate}
     </li>
     <li>
       <label for="column_width"><span class="property">{'Width of thumbnails'|@translate}</span>&nbsp;</label>
       <input type="text" id="column_width" name="f_thumbnail_width" size="4" maxlength="4" value="{$options.thumbnail_width}" style="text-align:center;">
-      &nbsp;px&nbsp;{'it need to be inferior than the width of columns'|@translate}
+      &nbsp;{'pixels'|@translate}&nbsp;{'(it need to be inferior than the width of columns)'|@translate}
     </li>
     <li>
@@ -33,17 +44,18 @@
     </li>
     <li>
-      <label for="thumbnail">{'The thumbnails can be generated by the theme'|@translate}</label>
-      </p>
+      <br><br>
+        <label for="thumbnail">{'About big thumbnails, for the albums :'|@translate}</label>
+      <br><br>
       <label>
-        <input type="radio" name="f_thumbnail" id="thumbnail" value="generated"  {if $options.thumbnail=="generated"}checked{/if}>
-        &nbsp;{'option thumbnail generated'|@translate}</label>
+        <input type="radio" name="f_catthumb" id="catthumb" value="none"  {if $options.catthumb=="none"}checked{/if}>
+        &nbsp;{'don\'t generate big thumbnails'|@translate}</label>
       <br>
       <label>
-        <input type="radio" name="f_thumbnail" id="thumbnail" value="auto" {if $options.thumbnail=="auto"}checked{/if}>
-        &nbsp;{'option thumbnail auto'|@translate}</label>
+        <input type="radio" name="f_catthumb" id="catthumb" value="same" {if $options.catthumb=="same"}checked{/if}>
+        &nbsp;{'use the same config as above'|@translate}</label>
       <br>
       <label>
-        <input type="radio" name="f_thumbnail" id="thumbnail" value="piwigo" {if $options.thumbnail=="piwigo"}checked{/if}>
-        &nbsp;{'option thumbnail piwigo'|@translate}</label>
+        <input type="radio" name="f_catthumb" id="catthumb" value="all" {if $options.catthumb=="all"}checked{/if}>
+        &nbsp;{'always generate big thumbnails'|@translate}</label>
       <br>
     </li>
Index: /extensions/stripped_black_bloc/theme.css
===================================================================
--- /extensions/stripped_black_bloc/theme.css	(revision 13212)
+++ /extensions/stripped_black_bloc/theme.css	(revision 13894)
@@ -209,5 +209,5 @@
     text-decoration: none;
 }
-.masonry-brick, .bloc .title, .nav_bulle {
+.masonry-brick, .bloc .title, .bloc_big .title, .nav_bulle {
 	color: #FFFFFF;
 	background-image: url("img/btn.png");
@@ -222,5 +222,5 @@
 
 }
-.bloc a {
+.bloc a, .bloc_big a {
     border-radius: 5px 5px 5px 5px;
 }
Index: /extensions/stripped_black_bloc/template/mainpage_categories.tpl
===================================================================
--- /extensions/stripped_black_bloc/template/mainpage_categories.tpl	(revision 11709)
+++ /extensions/stripped_black_bloc/template/mainpage_categories.tpl	(revision 13894)
@@ -1,5 +1,15 @@
-  {foreach from=$category_thumbnails item=cat}
-	<div class="bloc album">
-			<a href="{$cat.URL}" style="background: url({$cat.TN_SRC}) no-repeat scroll center center transparent; height: {$cat.TN_HEIGHT}px; width: {$cat.TN_WIDTH}px; opacity: 0.75;" >
+{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
+{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
+{foreach from=$category_thumbnails item=cat}
+  {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
+    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
+  {elseif $stripped_black_bloc.catthumb=="all"}
+    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
+  {else}
+    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
+  {/if}
+  {assign var='size' value=$derivative->get_size()}
+	<div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} album">
+			<a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" >
 				{$cat.NAME}
 			</a>
Index: /extensions/stripped_black_bloc/template/thumbnails.tpl
===================================================================
--- /extensions/stripped_black_bloc/template/thumbnails.tpl	(revision 12048)
+++ /extensions/stripped_black_bloc/template/thumbnails.tpl	(revision 13894)
@@ -1,10 +1,18 @@
+{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
+{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
 {if !empty($thumbnails)}
   {foreach from=$thumbnails item=thumbnail}
-  <div class="{$thumbnail.TN_CLASS}">
-        <a href="{$thumbnail.URL}" style="background: url({$thumbnail.TN_SRC}) no-repeat scroll center center transparent; height: {$thumbnail.TN_HEIGHT}px; width: {$thumbnail.TN_WIDTH}px; opacity: 0.75;" >
-          {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
-        </a>
-        <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
-	</div>
+    {if $thumbnail.TN_CLASS=="bloc"}
+      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
+    {else}
+      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
+    {/if}
+    {assign var='size' value=$derivative->get_size()}
+ <div class="{$thumbnail.TN_CLASS}">
+    <a href="{$thumbnail.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" >
+      {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
+    </a>
+    <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
+  </div>
   {/foreach}
 {/if}
