Index: /extensions/BatchDownloader/admin/config.php
===================================================================
--- /extensions/BatchDownloader/admin/config.php	(revision 21421)
+++ /extensions/BatchDownloader/admin/config.php	(revision 21422)
@@ -4,7 +4,10 @@
 if (isset($_POST['save_config']))
 {
+  if (!defined('USER_COLLEC_ID')) $_POST['what']['collections'] = 'on';
+  
   $conf['batch_download'] = array(
     'groups'          => isset($_POST['groups']) ? $_POST['groups'] : array(),
     'level'           => $_POST['level'],
+    'what'            => isset($_POST['what']) ? array_keys($_POST['what']) : array(),
     'photo_size'      => $_POST['photo_size'],
     'archive_prefix'  => trim($_POST['archive_prefix']),
@@ -19,4 +22,5 @@
   conf_update_param('batch_download_comment', $conf['batch_download_comment']);
 }
+
 
 // groups
@@ -44,5 +48,6 @@
 // max values
 $conf['batch_download']['max_elements_value'] = isset($conf['batch_download_max_elements']) ? $conf['batch_download_max_elements'] : 1000;
-$conf['batch_download']['max_size_value'] = isset($conf['batch_download_max_size']) ? $conf['batch_download_max_size'] : 500;
+$conf['batch_download']['max_size_value'] =     isset($conf['batch_download_max_size']) ?     $conf['batch_download_max_size'] :     500;
+
 
 $template->assign(array(
@@ -50,4 +55,5 @@
   'level_options' => $level_options,
   'sizes_options' => $sizes_options,
+  'USER_COLLEC_LOADED' => defined('USER_COLLEC_ID'),
   'batch_download' => $conf['batch_download'],
   'batch_download_comment' => stripslashes($conf['batch_download_comment']),
Index: /extensions/BatchDownloader/admin/template/config.tpl
===================================================================
--- /extensions/BatchDownloader/admin/template/config.tpl	(revision 21421)
+++ /extensions/BatchDownloader/admin/template/config.tpl	(revision 21422)
@@ -34,4 +34,12 @@
   $("#max_elements").slider("value", $(this).val());
 });
+
+jQuery(".showInfo").tipTip({ldelim}
+  delay: 0,
+  fadeIn: 200,
+  fadeOut: 200,
+  maxWidth: '300px',
+  defaultPosition: 'bottom'
+});
 {/footer_script}
 
@@ -64,4 +72,11 @@
         </select>
       </label>
+    </li>
+    <li>
+      <span class="property">{'What can be downloaded?'|@translate}</span>
+      <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>
Index: /extensions/BatchDownloader/admin/template/style.css
===================================================================
--- /extensions/BatchDownloader/admin/template/style.css	(revision 21421)
+++ /extensions/BatchDownloader/admin/template/style.css	(revision 21422)
@@ -47,2 +47,12 @@
   width:120px;
 }
+
+.showInfo {
+  position:static;
+  display:inline-block;
+  padding:1px 6px;
+  width:4px;
+  height:14px;
+  line-height:14px;
+  font-size:0.8em;
+}
Index: /extensions/BatchDownloader/include/events.inc.php
===================================================================
--- /extensions/BatchDownloader/include/events.inc.php	(revision 21421)
+++ /extensions/BatchDownloader/include/events.inc.php	(revision 21422)
@@ -58,7 +58,25 @@
   global $page, $template, $user, $conf;
   
+  // check accesses
   if ( !count($page['items']) or !isset($page['section']) ) return;
   
   if (check_download_access() === false) return;
+  
+  switch ($page['section'])
+  {
+  case 'categories':
+    if (!isset($page['category'])) return; // don't download the full gallery in flat mode !
+    
+    if (!in_array('categories', $conf['batch_download']['what'])) return;
+    break;
+    
+  case 'collections':
+    if (!in_array('collections', $conf['batch_download']['what'])) return;
+    break;
+    
+  default:
+    if (!in_array('specials', $conf['batch_download']['what'])) return;
+  }
+  
   
   // download the set
Index: /extensions/BatchDownloader/include/install.inc.php
===================================================================
--- /extensions/BatchDownloader/include/install.inc.php	(revision 21421)
+++ /extensions/BatchDownloader/include/install.inc.php	(revision 21422)
@@ -9,7 +9,8 @@
   if (empty($conf['batch_download']))
   {
-    $batch_download_default_config = serialize(array(
+    $batch_download_default_config = array(
       'groups'          => array(),
       'level'           => 0,
+      'what'            => array('categories','specials','collections'),
       'photo_size'      => 'original',
       'archive_prefix'  => 'piwigo',
@@ -18,11 +19,23 @@
       'max_size'        => 100, /* MB */
       'last_clean'      => time(),
-      ));
+      );
+      
+    $conf['batch_download'] = serialize($batch_download_default_config);
+    $conf['batch_download_comment'] = null;
     
-    conf_update_param('batch_download', $batch_download_default_config);
-    conf_update_param('batch_download_comment', null);
+    conf_update_param('batch_download', $conf['batch_download']);
+    conf_update_param('batch_download_comment', $conf['batch_download_comment']);
+  }
+  else
+  {
+    $new_conf = is_string($conf['batch_download']) ? unserialize($conf['batch_download']) : $conf['batch_download'];
     
-    $conf['batch_download'] = $batch_download_default_config;
-    $conf['batch_download_comment'] = null;
+    if (empty($new_conf['what']))
+    {
+      $new_conf['what'] = array('categories','specials','collections');
+      
+      $conf['batch_download'] = serialize($new_conf);
+      conf_update_param('batch_download', $conf['batch_download']);
+    }
   }
 
Index: /extensions/BatchDownloader/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 21421)
+++ /extensions/BatchDownloader/language/en_UK/plugin.lang.php	(revision 21422)
@@ -47,4 +47,5 @@
 $lang['Starting download Archive #%d will destroy Archive #%d, be sure you finish the download. Continue ?'] = 'Starting download Archive #%d will destroy Archive #%d, be sure you finish the download. Continue ?';
 $lang['Warning: Only registered users can use Batch Downloader.'] = 'Warning: Only registered users can use Batch Downloader.';
+$lang['What can be downloaded?'] = 'What can be downloaded?';
 
 ?>
Index: /extensions/BatchDownloader/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 21421)
+++ /extensions/BatchDownloader/language/fr_FR/plugin.lang.php	(revision 21422)
@@ -47,4 +47,5 @@
 $lang['Starting download Archive #%d will destroy Archive #%d, be sure you finish the download. Continue ?'] = 'Le démarrage du téléchargement de l\'archive #%d détruira l\'archive #%d, soyez sûr de terminer le téléchargement avant de continuer.';
 $lang['Warning: Only registered users can use Batch Downloader.'] = 'Attention: seuls les utilisateurs enregistrés peuvent utiliser Batch Downloader.';
+$lang['What can be downloaded?'] = 'Qu\'est-ce qui peut être téléchargé ?';
 
 ?>
