Index: /extensions/BatchDownloader/admin/config.php
===================================================================
--- /extensions/BatchDownloader/admin/config.php	(revision 25930)
+++ /extensions/BatchDownloader/admin/config.php	(revision 25931)
@@ -11,4 +11,5 @@
     'what'            => isset($_POST['what']) ? array_keys($_POST['what']) : array(),
     'photo_size'      => $_POST['photo_size'],
+    'multisize'       => $_POST['multisize'] == 'true',
     'archive_prefix'  => trim($_POST['archive_prefix']),
     'archive_timeout' => intval($_POST['archive_timeout']),
Index: /extensions/BatchDownloader/admin/template/config.tpl
===================================================================
--- /extensions/BatchDownloader/admin/template/config.tpl	(revision 25930)
+++ /extensions/BatchDownloader/admin/template/config.tpl	(revision 25931)
@@ -31,5 +31,5 @@
   }
 });
-{literal}
+
 $("input[name='max_elements']").change(function() {
   $("#max_elements").slider("value", $(this).val());
@@ -48,5 +48,16 @@
   $(".advanced").slideDown();
 });
-{/literal}{/footer_script}
+
+$('input[name="multisize"]').on('change', function() {
+  if ($(this).val() == 'true') {
+    $('#multisize_title').text('{'Maximum photo size'|@translate|escape:javascript}');
+  }
+  else {
+    $('#multisize_title').text('{'Photo size'|@translate|escape:javascript}');
+  }
+})
+.filter(':checked').trigger('change');
+{/footer_script}
+
 
 <div class="titrePage">
@@ -59,4 +70,7 @@
   
   <ul>
+    <li>
+      <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
+    </li>
     <li>
       <label>
@@ -80,16 +94,17 @@
     </li>
     <li>
-      <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
-    </li>
-    <li>
       <b>{'What can be downloaded?'|@translate}</b>
       <label><input type="checkbox" name="what[categories]" {if in_array('categories',$batch_download.what)}checked="checked"{/if}/> {'Albums'|@translate}</label>
       {if $USER_COLLEC_LOADED}<label><input type="checkbox" name="what[collections]" {if in_array('collections',$batch_download.what)}checked="checked"{/if}/> {'Collections'|@translate}</label>{/if}
       <label><input type="checkbox" name="what[specials]" {if in_array('specials',$batch_download.what)}checked="checked"{/if}/> {'Specials'|@translate}</label>
-      <a class="showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}...">i</a>
-    </li>
-    <li>
-      <label>
-        <b>{'Maximum photo size'|@translate}</b>
+      <a class="icon-info-circled-1 showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}..."></a>
+    </li>
+    <li>
+      <b>{'Photo size choices'|translate}</b>
+      <label><input type="radio" name="multisize" value="true" {if $batch_download.multisize}checked{/if}> {'Any size'|translate}</label>
+      <label><input type="radio" name="multisize" value="false" {if !$batch_download.multisize}checked{/if}> {'One size'|translate}</label>
+
+      <label>
+        <b id="multisize_title">{'Maximum photo size'|@translate}</b>
         <select name="photo_size">
           {html_options options=$sizes_options selected=$batch_download.photo_size}
@@ -135,5 +150,5 @@
         <b>{'Delete previous archive when starting to download another one'|@translate}</b>
       </label>
-      <a class="showInfo" title="{'It saves space on the server but doesn\'t allow to restart failed downloads.'|@translate}">i</a>
+      <a class="icon-info-circled-1 showInfo" title="{'It saves space on the server but doesn\'t allow to restart failed downloads.'|@translate}"></a>
     </li>
     <li>
@@ -142,5 +157,5 @@
         <b>{'Force the usage of PclZip instead of ZipArchive as ZIP library'|@translate}</b>
       </label>
-      <a class="showInfo" title="{'Only check if you are experiencing corrupted archives with ZipArchive.'|@translate}">i</a>
+      <a class="icon-info-circled-1 showInfo" title="{'Only check if you are experiencing corrupted archives with ZipArchive.'|@translate}"></a>
     </li>
     <li>
@@ -149,5 +164,5 @@
         <b>{'Don\'t download archives through PHP'|@translate}</b>
       </label>
-      <a class="showInfo" title="{'Only check if your host complains about high PHP usage.'|@translate}">i</a>
+      <a class="icon-info-circled-1 showInfo" title="{'Only check if your host complains about high PHP usage.'|@translate}"></a>
     </li>
   {if $use_ziparchive}
Index: /extensions/BatchDownloader/admin/template/style.css
===================================================================
--- /extensions/BatchDownloader/admin/template/style.css	(revision 25930)
+++ /extensions/BatchDownloader/admin/template/style.css	(revision 25931)
@@ -47,14 +47,4 @@
 }
 
-.showInfo {
-  position:static;
-  display:inline-block;
-  padding:1px 6px;
-  width:4px;
-  height:14px;
-  line-height:14px;
-  font-size:0.8em;
-}
-
 .advanced span {
   font-family: 'Courrier New',monospace;
Index: /extensions/BatchDownloader/include/events.inc.php
===================================================================
--- /extensions/BatchDownloader/include/events.inc.php	(revision 25930)
+++ /extensions/BatchDownloader/include/events.inc.php	(revision 25931)
@@ -145,26 +145,33 @@
     ));
   
-  foreach (ImageStdParams::get_defined_type_map() as $params)
-  {
-    $template->append(
-      'BATCH_DOWNLOAD_SIZES',
-      array(
-        'TYPE' => $params->type,
-        'DISPLAY' => l10n($params->type),
-        'SIZE' => $params->sizing->ideal_size[0].' x '.$params->sizing->ideal_size[1],
-        )
-      );
-      if ($params->type == $conf['batch_download']['photo_size']) break;
-  }
-  if ($conf['batch_download']['photo_size'] == 'original')
-  {
-    $template->append(
-      'BATCH_DOWNLOAD_SIZES',
-      array(
-        'TYPE' => 'original',
-        'DISPLAY' => l10n('Original'),
-        'SIZE' => null,
-        )
-      );
+  if ($conf['batch_download']['multisize'])
+  {
+    foreach (ImageStdParams::get_defined_type_map() as $params)
+    {
+      $template->append(
+        'BATCH_DWN_SIZES',
+        array(
+          'TYPE' => $params->type,
+          'DISPLAY' => l10n($params->type),
+          'SIZE' => $params->sizing->ideal_size[0].' x '.$params->sizing->ideal_size[1],
+          )
+        );
+        if ($params->type == $conf['batch_download']['photo_size']) break;
+    }
+    if ($conf['batch_download']['photo_size'] == 'original')
+    {
+      $template->append(
+        'BATCH_DWN_SIZES',
+        array(
+          'TYPE' => 'original',
+          'DISPLAY' => l10n('Original'),
+          'SIZE' => null,
+          )
+        );
+    }
+  }
+  else
+  {
+    $template->assign('BATCH_DWN_SIZE', $conf['batch_download']['photo_size']);
   }
     
Index: /extensions/BatchDownloader/include/functions.inc.php
===================================================================
--- /extensions/BatchDownloader/include/functions.inc.php	(revision 25930)
+++ /extensions/BatchDownloader/include/functions.inc.php	(revision 25931)
@@ -8,5 +8,5 @@
 function get_set_info_from_page()
 {
-  global $page;
+  global $page, $conf;
   
   switch ($page['section'])
@@ -70,5 +70,29 @@
     );
     
-  return trigger_event('batchdownload_get_set_info', $set);
+  // check size
+  if (!$conf['batch_download']['multisize'])
+  {
+    $set['size'] = $conf['batch_download']['photo_size'];
+  }
+  else
+  {
+    $avail_sizes = array();
+    foreach (ImageStdParams::get_defined_type_map() as $params)
+    {
+      $avail_sizes[] = $params->type;
+      if ($params->type == $conf['batch_download']['photo_size']) break;
+    }
+    if ($conf['batch_download']['photo_size'] == 'original')
+    {
+      $avail_sizes[] = 'original';
+    }
+    
+    if (!in_array($set['size'], $avail_sizes))
+    {
+      $set['size'] = $conf['batch_download']['photo_size'];
+    }
+  }
+
+  return trigger_change('batchdownload_get_set_info', $set);
 }
 
Index: /extensions/BatchDownloader/include/install.inc.php
===================================================================
--- /extensions/BatchDownloader/include/install.inc.php	(revision 25930)
+++ /extensions/BatchDownloader/include/install.inc.php	(revision 25931)
@@ -14,4 +14,5 @@
       'what'            => array('categories','specials','collections'),
       'photo_size'      => 'original',
+      'multisize'       => true,
       'archive_prefix'  => 'piwigo',
       'archive_timeout' => 48, /* hours */
@@ -43,4 +44,8 @@
       $new_conf['force_pclzip'] = isset($conf['batch_download_force_pclzip']) && $conf['batch_download_force_pclzip'];
       $new_conf['direct'] = isset($conf['batch_download_direct']) && $conf['batch_download_direct'];
+    }
+    if (!isset($new_conf['multisize']))
+    {
+      $new_conf['multisize'] = true;
     }
     
Index: /extensions/BatchDownloader/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 25930)
+++ /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 25931)
@@ -63,4 +63,8 @@
 $lang['Don\'t download archives through PHP'] = 'Don\'t download archives through PHP';
 $lang['Only check if your host complains about high PHP usage.'] = 'Only check if your host complains about high PHP usage.';
+$lang['Any size'] = 'Any size';
+$lang['One size'] = 'One size';
+$lang['Photo size choices'] = 'Photo size choices';
+$lang['Photo size'] = 'Photo size';
 
 ?>
Index: /extensions/BatchDownloader/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 25930)
+++ /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 25931)
@@ -42,5 +42,5 @@
 $lang['Unable to find ZipArchive PHP extension, Batch Downloader will use PclZip instead, but with degraded performance.'] = 'Impossible de trouver l\'extension PHP ZipArchive, Batch Downloader va utiliser PclZip à la place, mais avec des performances dégradées.';
 $lang['Remove from download set'] = 'Supprimer du lot';
-$lang['Confirm the download of %d pictures?'] = 'Confirmer le téléchargementde %d photos ?';
+$lang['Confirm the download of %d pictures?'] = 'Confirmer le téléchargement de %d photos ?';
 $lang['Remove all finished downloads'] = 'Supprimer tous les téléchargements terminés';
 $lang['hours'] = 'heures';
@@ -63,4 +63,8 @@
 $lang['Don\'t download archives through PHP'] = 'Ne pas télécharger les archives via PHP';
 $lang['Only check if your host complains about high PHP usage.'] = 'Ne cochez uniquement que si votre hébergeur se plaint d\'une activité abusive de PHP.';
+$lang['Any size'] = 'N\'importe quelle taille';
+$lang['One size'] = 'Une seule taille';
+$lang['Photo size choices'] = 'Choix de la taille des photos';
+$lang['Photo size'] = 'Taille des photos';
 
 ?>
Index: /extensions/BatchDownloader/template/download_button.tpl
===================================================================
--- /extensions/BatchDownloader/template/download_button.tpl	(revision 25930)
+++ /extensions/BatchDownloader/template/download_button.tpl	(revision 25931)
@@ -1,38 +1,12 @@
-{footer_script require='jquery'}
-var batchdown_count = {$BATCH_DWN_COUNT};
-var batchdown_string = "{'Confirm the download of %d pictures?'|@translate}";
-{literal}
-jQuery().ready(function() {
-  jQuery("#batchDownloadLink").click(function() {
-	  var elt = jQuery("#batchDownloadBox");
+<a href="{$BATCH_DWN_URL}{$BATCH_DWN_SIZE}" id="batchDownloadLink" title="{'Download all pictures of this selection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
+  <span class="pwg-icon batch-downloader-icon" style="background:url('{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/images/zip.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Download'|@translate}</span>
+</a>
 
-    elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
-      .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
-      .toggle();
-
-    return false;
-  });
-
-  jQuery("#batchDownloadBox").on("mouseleave click", function() {
-    jQuery(this).hide();
-  });
-  
-  jQuery("#batchDownloadBox a").click(function() {
-    return confirm(batchdown_string.replace('%d', batchdown_count));
-  });
-});
-{/literal}{/footer_script}
-
-{html_style}{literal}
-.downloadSizeDetails {font-style:italic; font-size:80%;}
-{/literal}{/html_style}
-
-<li><a href="{$BATCH_DWN_URL}" id="batchDownloadLink" title="{'Download all pictures of this selection'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
-  <span class="pwg-icon batch-downloader-icon" style="background:url('{$ROOT_URL}{$BATCH_DOWNLOAD_PATH}template/images/zip.png') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">{'Download'|@translate}</span>
-</a></li>
+{if isset($BATCH_DWN_SIZES)}
+{combine_script id='core.switchbox' load='async' require='jquery' path='themes/default/js/switchbox.js'}
 
 <div id="batchDownloadBox" class="switchBox" style="display:none">
   <div class="switchBoxTitle">{'Download'|@translate} - {'Photo sizes'|@translate}</div>
-  {foreach from=$BATCH_DOWNLOAD_SIZES item=size name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
+  {foreach from=$BATCH_DWN_SIZES item=size name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
   <a href="{$BATCH_DWN_URL}{$size.TYPE}" rel="nofollow">
     {$size.DISPLAY} {if $size.SIZE}<span class="downloadSizeDetails">({$size.SIZE})</span>{/if}
@@ -40,2 +14,24 @@
   {/foreach}
 </div>
+{/if}
+
+{footer_script require='jquery'}
+var batchdown_count = {$BATCH_DWN_COUNT};
+var batchdown_string = "{'Confirm the download of %d pictures?'|@translate}";
+
+{if isset($BATCH_DWN_SIZES)}
+  (SwitchBox=window.SwitchBox||[]).push("#batchDownloadLink", "#batchDownloadBox");
+  
+  jQuery("#batchDownloadBox a").click(function() {
+    return confirm(batchdown_string.replace('%d', batchdown_count));
+  });
+{else}
+  jQuery("#batchDownloadLink").click(function() {
+    return confirm(batchdown_string.replace('%d', batchdown_count));
+  });
+{/if}
+{/footer_script}
+
+{html_style}{literal}
+.downloadSizeDetails {font-style:italic; font-size:80%;}
+{/literal}{/html_style}
