Changeset 21422 for extensions/BatchDownloader
- Timestamp:
- Mar 9, 2013, 11:06:35 PM (11 years ago)
- Location:
- extensions/BatchDownloader
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/BatchDownloader/admin/config.php
r17880 r21422 4 4 if (isset($_POST['save_config'])) 5 5 { 6 if (!defined('USER_COLLEC_ID')) $_POST['what']['collections'] = 'on'; 7 6 8 $conf['batch_download'] = array( 7 9 'groups' => isset($_POST['groups']) ? $_POST['groups'] : array(), 8 10 'level' => $_POST['level'], 11 'what' => isset($_POST['what']) ? array_keys($_POST['what']) : array(), 9 12 'photo_size' => $_POST['photo_size'], 10 13 'archive_prefix' => trim($_POST['archive_prefix']), … … 19 22 conf_update_param('batch_download_comment', $conf['batch_download_comment']); 20 23 } 24 21 25 22 26 // groups … … 44 48 // max values 45 49 $conf['batch_download']['max_elements_value'] = isset($conf['batch_download_max_elements']) ? $conf['batch_download_max_elements'] : 1000; 46 $conf['batch_download']['max_size_value'] = isset($conf['batch_download_max_size']) ? $conf['batch_download_max_size'] : 500; 50 $conf['batch_download']['max_size_value'] = isset($conf['batch_download_max_size']) ? $conf['batch_download_max_size'] : 500; 51 47 52 48 53 $template->assign(array( … … 50 55 'level_options' => $level_options, 51 56 'sizes_options' => $sizes_options, 57 'USER_COLLEC_LOADED' => defined('USER_COLLEC_ID'), 52 58 'batch_download' => $conf['batch_download'], 53 59 'batch_download_comment' => stripslashes($conf['batch_download_comment']), -
extensions/BatchDownloader/admin/template/config.tpl
r20372 r21422 34 34 $("#max_elements").slider("value", $(this).val()); 35 35 }); 36 37 jQuery(".showInfo").tipTip({ldelim} 38 delay: 0, 39 fadeIn: 200, 40 fadeOut: 200, 41 maxWidth: '300px', 42 defaultPosition: 'bottom' 43 }); 36 44 {/footer_script} 37 45 … … 64 72 </select> 65 73 </label> 74 </li> 75 <li> 76 <span class="property">{'What can be downloaded?'|@translate}</span> 77 <label><input type="checkbox" name="what[categories]" {if in_array('categories',$batch_download.what)}checked="checked"{/if}/> {'Albums'|@translate}</label> 78 {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} 79 <label><input type="checkbox" name="what[specials]" {if in_array('specials',$batch_download.what)}checked="checked"{/if}/> {'Specials'|@translate}</label> 80 <a class="showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}...">i</a> 66 81 </li> 67 82 <li> -
extensions/BatchDownloader/admin/template/style.css
r20138 r21422 47 47 width:120px; 48 48 } 49 50 .showInfo { 51 position:static; 52 display:inline-block; 53 padding:1px 6px; 54 width:4px; 55 height:14px; 56 line-height:14px; 57 font-size:0.8em; 58 } -
extensions/BatchDownloader/include/events.inc.php
r21206 r21422 58 58 global $page, $template, $user, $conf; 59 59 60 // check accesses 60 61 if ( !count($page['items']) or !isset($page['section']) ) return; 61 62 62 63 if (check_download_access() === false) return; 64 65 switch ($page['section']) 66 { 67 case 'categories': 68 if (!isset($page['category'])) return; // don't download the full gallery in flat mode ! 69 70 if (!in_array('categories', $conf['batch_download']['what'])) return; 71 break; 72 73 case 'collections': 74 if (!in_array('collections', $conf['batch_download']['what'])) return; 75 break; 76 77 default: 78 if (!in_array('specials', $conf['batch_download']['what'])) return; 79 } 80 63 81 64 82 // download the set -
extensions/BatchDownloader/include/install.inc.php
r19837 r21422 9 9 if (empty($conf['batch_download'])) 10 10 { 11 $batch_download_default_config = serialize(array(11 $batch_download_default_config = array( 12 12 'groups' => array(), 13 13 'level' => 0, 14 'what' => array('categories','specials','collections'), 14 15 'photo_size' => 'original', 15 16 'archive_prefix' => 'piwigo', … … 18 19 'max_size' => 100, /* MB */ 19 20 'last_clean' => time(), 20 )); 21 ); 22 23 $conf['batch_download'] = serialize($batch_download_default_config); 24 $conf['batch_download_comment'] = null; 21 25 22 conf_update_param('batch_download', $batch_download_default_config); 23 conf_update_param('batch_download_comment', null); 26 conf_update_param('batch_download', $conf['batch_download']); 27 conf_update_param('batch_download_comment', $conf['batch_download_comment']); 28 } 29 else 30 { 31 $new_conf = is_string($conf['batch_download']) ? unserialize($conf['batch_download']) : $conf['batch_download']; 24 32 25 $conf['batch_download'] = $batch_download_default_config; 26 $conf['batch_download_comment'] = null; 33 if (empty($new_conf['what'])) 34 { 35 $new_conf['what'] = array('categories','specials','collections'); 36 37 $conf['batch_download'] = serialize($new_conf); 38 conf_update_param('batch_download', $conf['batch_download']); 39 } 27 40 } 28 41 -
extensions/BatchDownloader/language/en_UK/plugin.lang.php
r20372 r21422 47 47 $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 ?'; 48 48 $lang['Warning: Only registered users can use Batch Downloader.'] = 'Warning: Only registered users can use Batch Downloader.'; 49 $lang['What can be downloaded?'] = 'What can be downloaded?'; 49 50 50 51 ?> -
extensions/BatchDownloader/language/fr_FR/plugin.lang.php
r20372 r21422 47 47 $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.'; 48 48 $lang['Warning: Only registered users can use Batch Downloader.'] = 'Attention: seuls les utilisateurs enregistrés peuvent utiliser Batch Downloader.'; 49 $lang['What can be downloaded?'] = 'Qu\'est-ce qui peut être téléchargé ?'; 49 50 50 51 ?>
Note: See TracChangeset
for help on using the changeset viewer.