Ignore:
Timestamp:
Jun 20, 2013, 2:10:51 AM (11 years ago)
Author:
mistic100
Message:

new parameters on config screen "photo_size", "one_archive", "force_pclzip", "direct"

Location:
extensions/BatchDownloader/admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/admin/config.php

    r23288 r23383  
    1515    'max_elements'    => intval($_POST['max_elements']),
    1616    'max_size'        => intval($_POST['max_size']),
     17    'one_archive'     => isset($_POST['one_archive']),
     18    'force_pclzip'    => isset($_POST['force_pclzip']),
     19    'direct'          => isset($_POST['direct']),
    1720    'last_clean'      => $conf['batch_download']['last_clean'],
    1821    );
     
    2124  conf_update_param('batch_download', serialize($conf['batch_download']));
    2225  conf_update_param('batch_download_comment', $conf['batch_download_comment']);
     26 
     27  array_push($page['infos'], l10n('Information data registered in database'));
    2328}
    2429
     
    3641
    3742// sizes
    38 $enabled = ImageStdParams::get_defined_type_map();
    39 $disabled = @unserialize(@$conf['disabled_derivatives']);
    40 if ($disabled === false) $disabled = array();
    41 
    42 $sizes_keys = array_diff(array_keys($enabled), array_keys($disabled));
     43$type_map = ImageStdParams::get_defined_type_map();
     44$sizes_keys = array_keys($type_map);
    4345$sizes_names = array_map(create_function('$s', 'return l10n($s);'), $sizes_keys);
    4446
     
    5860  'batch_download' => $conf['batch_download'],
    5961  'batch_download_comment' => stripslashes($conf['batch_download_comment']),
    60   'use_ziparchive' => class_exists('ZipArchive') && !isset($conf['batch_downloader_force_pclzip']),
     62  'use_ziparchive' => class_exists('ZipArchive') && !$conf['batch_download']['force_pclzip'],
    6163  'PHP_VERSION' => PHP_VERSION,
    6264  'ADVANCED_CONF' => load_language('advanced.html', BATCH_DOWNLOAD_PATH, array('return'=>true))
  • extensions/BatchDownloader/admin/sets.php

    r23318 r23383  
    1515  $set->updateParam('nb_zip', $set->getEstimatedArchiveNumber());
    1616  $set->updateParam('status', 'done');
    17   $set->deleteLastArchive();
     17  $set->deleteArchives();
    1818  $set->clearImages();
    1919  unset($set);
  • extensions/BatchDownloader/admin/template/config.tpl

    r23288 r23383  
    6262      <label>
    6363      {if $group_options}
    64         <span class="property">{'User groups'|@translate}</span>
     64        <b>{'User groups'|@translate}</b>
    6565        <select name="groups[]" data-placeholder="{'Everybody'|@translate}" class="chzn-select" multiple="multiple" style="width:370px;">
    6666          {html_options options=$group_options selected=$batch_download.groups}
     
    7373    <li>
    7474      <label>
    75         <span class="property">{'Privacy level'|@translate}</span>
     75        <b>{'Privacy level'|@translate}</b>
    7676        <select name="level">
    7777          {html_options options=$level_options selected=$batch_download.level}
     
    8080    </li>
    8181    <li>
    82       <span class="property">{'What can be downloaded?'|@translate}</span>
     82      <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
     83    </li>
     84    <li>
     85      <b>{'What can be downloaded?'|@translate}</b>
    8386      <label><input type="checkbox" name="what[categories]" {if in_array('categories',$batch_download.what)}checked="checked"{/if}/> {'Albums'|@translate}</label>
    8487      {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}
    8588      <label><input type="checkbox" name="what[specials]" {if in_array('specials',$batch_download.what)}checked="checked"{/if}/> {'Specials'|@translate}</label>
    86           <a class="showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}...">i</a>
     89      <a class="showInfo" title="{'Most visited'|@translate}, {'Random photos'|@translate}, {'Best rated'|@translate}...">i</a>
    8790    </li>
    8891    <li>
    89       <i>{'Warning: Only registered users can use Batch Downloader.'|@translate}</i>
     92      <label>
     93        <b>{'Maximum photo size'|@translate}</b>
     94        <select name="photo_size">
     95          {html_options options=$sizes_options selected=$batch_download.photo_size}
     96        </select>
     97      </label>
    9098    </li>
    9199  </ul>
     
    96104 
    97105  <ul>
    98     <li style="display:none;">
    99       <label>
    100         <span class="property">{'Maximum photo size'|@translate}</span>
    101         <select name="photo_size">
    102           {html_options options=$sizes_options selected=$batch_download.photo_size}
    103         </select>
    104         NOT IMPLEMENTED
    105       </label>
    106     </li>
    107106    <li>
    108107      <label>
    109         <span class="property">{'Delete downloads after'|@translate}</span>
     108        <b>{'Delete downloads after'|@translate}</b>
    110109        <input type="text" name="archive_timeout" value="{$batch_download.archive_timeout}" size="3"> {'hours'|@translate}
    111110      </label>
     
    113112    <li>
    114113      <label>
    115         <span class="property">{'Maximum number of photos per download set'|@translate}</span>
     114        <b>{'Maximum number of photos per download set'|@translate}</b>
    116115        <div id="max_elements"></div>
    117116        <input type="text" name="max_elements" value="{$batch_download.max_elements}" size="5">
     
    120119    <li>
    121120      <label>
    122         <span class="property">{'Maximum size of each archive (in Megabytes)'|@translate}</span>
     121        <b>{'Maximum size of each archive (in Megabytes)'|@translate}</b>
    123122        <div id="max_size"></div>
    124123        <input type="text" name="max_size" value="{$batch_download.max_size}" size="5">
     
    127126    <li>
    128127      <label>
    129         <span class="property">{'Archive prefix'|@translate}</span>
     128        <b>{'Archive prefix'|@translate}</b>
    130129        <input type="text" name="archive_prefix" value="{$batch_download.archive_prefix}">
    131130      </label>
     131    </li>
     132    <li>
     133      <label>
     134        <input type="checkbox" name="one_archive" {if $batch_download.one_archive}checked{/if}>
     135        <b>{'Delete previous archive when starting to download another one'|@translate}</b>
     136      </label>
     137      <a class="showInfo" title="{'It saves space on the server but doesn\'t allow to restart failed downloads.'|@translate}">i</a>
     138    </li>
     139    <li>
     140      <label>
     141        <input type="checkbox" name="force_pclzip" {if $batch_download.force_pclzip}checked{/if}>
     142        <b>{'Force the usage of PclZip instead of ZipArchive as ZIP library'|@translate}</b>
     143      </label>
     144      <a class="showInfo" title="{'Only check if you are experiencing corrupted archives with ZipArchive.'|@translate}">i</a>
     145    </li>
     146    <li>
     147      <label>
     148        <input type="checkbox" name="direct" {if $batch_download.direct}checked{/if}>
     149        <b>{'Don\'t download archives through PHP'|@translate}</b>
     150      </label>
     151      <a class="showInfo" title="{'Only check if your host complains about high PHP usage.'|@translate}">i</a>
    132152    </li>
    133153  {if $use_ziparchive}
    134154    <li>
    135155      <label>
    136         <span class="property">{'Archive comment'|@translate} :</span><br>
     156        <b>{'Archive comment'|@translate} :</b><br>
    137157        <textarea name="archive_comment" rows="5" style="width:450px;">{$batch_download_comment}</textarea>
    138158      </label>
  • extensions/BatchDownloader/admin/template/style.css

    r23318 r23383  
    11.chzn-choices li {
    22  clear:none !important;
    3 }
    4 
    5 .property {
    6   width:auto !important;
    73}
    84
Note: See TracChangeset for help on using the changeset viewer.