Changeset 16598


Ignore:
Timestamp:
Jul 10, 2012, 6:13:37 PM (8 years ago)
Author:
mistic100
Message:

-fix template override with UserCollection
-localization

Location:
extensions/BatchDownloader
Files:
9 edited
1 moved

Legend:

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

    r16400 r16598  
    1212if (isset($_GET['cancel']))
    1313{
    14   $BatchDownloader = new BatchDownloader($_GET['cancel']);
     14  $BatchDownloader = new BatchDownloader($_GET['cancel']); 
     15  $BatchDownloader->updateParam('total_size', $BatchDownloader->getEstimatedTotalSize());
     16  $BatchDownloader->updateParam('status', 'done');
    1517  $BatchDownloader->deleteLastArchive();
    1618  $BatchDownloader->clearImages();
    17   $BatchDownloader->updateParam('status', 'done');
    1819}
    1920
     
    9495  'list' => l10n('Random'),
    9596  'recent_pics' => l10n('Recent photos'),
    96   // 'selection' => l10n('Selection'),
     97  'collection' => l10n('User collection'),
    9798  );
    9899
  • extensions/BatchDownloader/admin/template/config.tpl

    r16392 r16598  
    8383    <li>
    8484      <label>
    85         <span class="property">{'Delete unterminated downloads after'|@translate}</span>
     85        <span class="property">{'Delete downloads after'|@translate}</span>
    8686        <input type="text" name="archive_timeout" value="{$batch_download.archive_timeout}" size="3"> {'hours'|@translate}
    8787      </label>
  • extensions/BatchDownloader/include/BatchDownloader.class.php

    r16592 r16598  
    431431      $out.= '<li id="zip-'.$i.'">';
    432432     
    433       if ($i < $this->data['last_zip']+1)
     433      if ($this->data['status'] == 'done' or $i < $this->data['last_zip']+1)
    434434      {
    435435        $out.= '<img src="'.BATCH_DOWNLOAD_PATH.'template/drive.png"> Archive #'.$i.' (already downloaded)';
  • extensions/BatchDownloader/include/events.inc.php

    r16592 r16598  
    3434      case 'view':
    3535        $page['sub_section'] = 'view';
    36         $page['title'].= l10n('Edit set');
     36        $page['title'].= l10n('Edit the set');
    3737        break;
    3838      default:
     
    107107  // toolbar button
    108108  $button = '<li><a href="'. $url .'&amp;action=advdown_set" title="'.l10n('Download all pictures of this selection').'" class="pwg-state-default pwg-button" rel="nofollow">
    109                         <span class="pwg-icon" style="background:url(\'' . BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">'.l10n('Advanced Downloader').'</span>
     109                        <span class="pwg-icon" style="background:url(\'' . BATCH_DOWNLOAD_PATH . 'template/zip.png\') center center no-repeat;">&nbsp;</span><span class="pwg-button-text">'.l10n('Batch Downloader').'</span>
    110110                </a></li>';
    111111  $template->concat('PLUGIN_INDEX_ACTIONS', $button);
     
    130130    user_id = '.$user['id'].'
    131131    AND status != "done"
     132  LIMIT 1
    132133;';
    133134  $result = pwg_query($query);
    134135  if (!pwg_db_num_rows($result)) return;
    135136 
    136   $menu->register_block(new RegisteredBlock('mbAdvancedDownloader', l10n('Downloads'), 'AdvancedDownloader'));
     137  $menu->register_block(new RegisteredBlock('mbBatchDownloader', l10n('Batch Downloader'), 'BatchDownloader'));
    137138}
    138139
     
    142143 
    143144  $menu = &$menu_ref_arr[0];
    144   $block = $menu->get_block('mbAdvancedDownloader');
     145  $block = $menu->get_block('mbBatchDownloader');
    145146 
    146147  if ($block != null)
     
    171172    $template->set_template_dir(BATCH_DOWNLOAD_PATH . 'template/');
    172173    $block->set_title(l10n('Downloads'));
    173     $block->template = 'menublock.tpl';
     174    $block->template = 'menublock_batch_down.tpl';
    174175    $block->data = $data;
    175176  }
  • extensions/BatchDownloader/language/en_UK/description.txt

    r16379 r16598  
     1Allows users to download pictures sets in ZIP. Compatible with User Collections.
  • extensions/BatchDownloader/language/en_UK/plugin.lang.php

    r16379 r16598  
    11<?php
    22
    3 
     3$lang['download'] = 'download';
     4$lang['done'] = 'done';
     5$lang['Whole gallery'] = 'Whole gallery';
     6$lang['Random'] = 'Random';
     7$lang['User collection'] = 'User collection';
     8$lang['Nb images'] = 'Nb images';
     9$lang['Nb archives'] = 'Nb archives';
     10$lang['Total size'] = 'Total size';
     11$lang['Download history'] = 'Download history';
     12$lang['Download set deleted'] = 'Download set deleted';
     13$lang['The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'] = 'The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>';
     14$lang['You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.'] = 'You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.';
     15$lang['You can not edit this set'] = 'You can not edit this set';
     16$lang['Batch Downloader'] = 'Batch Downloader';
     17$lang['Generate ZIP'] = 'Generate ZIP';
     18$lang['Edit the set'] = 'Edit the set';
     19$lang['Download all pictures of this selection'] = 'Download all pictures of this selection';
     20$lang['Downloads'] = 'Downloads';
     21$lang['Download permissions'] = 'Download permissions';
     22$lang['User groups'] = 'User groups';
     23$lang['Archives'] = 'Archives';
     24$lang['Maximum photo size'] = 'Maximum photo size';
     25$lang['Delete downloads after'] = 'Delete downloads after';
     26$lang['Maximum number of photos per download set'] = 'Maximum number of photos per download set';
     27$lang['Maximum size of each archive (in Megabytes)'] = 'Maximum size of each archive (in Megabytes)';
     28$lang['Archive prefix'] = 'Archive prefix';
     29$lang['Archive comment'] = 'Archive comment';
     30$lang['Set type'] = 'Set type';
     31$lang['Delete this set'] = 'Delete this set';
     32$lang['Cancel this set'] = 'Cancel this set';
     33$lang['Download info'] = 'Download info';
     34$lang['Estimated number of archives'] = 'Estimated number of archives';
     35$lang['real number of archives can differ'] = 'real number of archives can differ';
     36$lang['Download links'] = 'Download links';
     37$lang['<b>Warning:</b> all files will be deleted within %d hours'] = '<b>Warning:</b> all files will be deleted within %d hours';
     38$lang['Cancel this download'] = 'Cancel this download';
     39$lang['Return to download page'] = 'Return to download page';
    440
    541?>
  • extensions/BatchDownloader/language/fr_FR/description.txt

    r16379 r16598  
     1Permet aux utilisateurs de télécharger les photos par lot. Compatible avec User Collections.
  • extensions/BatchDownloader/language/fr_FR/plugin.lang.php

    r16379 r16598  
    11<?php
    22
    3 
     3$lang['download'] = 'téléchargement';
     4$lang['done'] = 'terminé';
     5$lang['Whole gallery'] = 'Galerie complète';
     6$lang['Random'] = 'Aléatoire';
     7$lang['User collection'] = 'Collection utilisateur';
     8$lang['Nb images'] = 'Nb images';
     9$lang['Nb archives'] = 'Nb archives';
     10$lang['Total size'] = 'Taille totale';
     11$lang['Download history'] = 'Historique des téléchargements';
     12$lang['Download set deleted'] = 'Lot supprimé';
     13$lang['The archive is downloading, if the download doesn\'t start automatically please <a href="%s">click here</a>'] = 'L\'archive est en court de téléchargement, si le téléchargement n\'a pas commencé automatiquement veuillez <a href="%s">cliquer ici</a>';
     14$lang['You choose to download %d pictures, but the system is limited to %d. You can edit the set, or the last %d pictures will not be downloaded.'] = 'Vous avez sélectionné %d photos, mais le système est limité à %d. Vous pouvez éditer le lot, ou les %d dernières photos ne seront pas téléchargées.';
     15$lang['You can not edit this set'] = 'Vous ne pouvez pas éditer ce lot';
     16$lang['Batch Downloader'] = 'Téléchargement par lot';
     17$lang['Generate ZIP'] = 'Génération des ZIP';
     18$lang['Edit the set'] = 'Editer le lot';
     19$lang['Download all pictures of this selection'] = 'Télécharger toutes les photos de cette sélection';
     20$lang['Downloads'] = 'Téléchargements';
     21$lang['Download permissions'] = 'Permissions de téléchargement';
     22$lang['User groups'] = 'Groupes d\'utilisateurs';
     23$lang['Archives'] = 'Archives';
     24$lang['Maximum photo size'] = 'Taille maximale des photo';
     25$lang['Delete unterminated downloads after'] = 'Supprimer les téléchargements après';
     26$lang['Maximum number of photos per download set'] = 'Nombre maximal de photos par lot';
     27$lang['Maximum size of each archive (in Megabytes)'] = 'Taille maximale de chaque archive (en Megaoctets)';
     28$lang['Archive prefix'] = 'Préfixe de l\'archive';
     29$lang['Archive comment'] = 'Commentaire de l\'archive';
     30$lang['Set type'] = 'Type de lot';
     31$lang['Delete this set'] = 'Supprimer ce lot';
     32$lang['Cancel this set'] = 'Annuler ce lot';
     33$lang['Download info'] = 'Informations sur le téléchargement';
     34$lang['Estimated number of archives'] = 'Nombre estimé d\'archives';
     35$lang['real number of archives can differ'] = 'le nombre réel d\'archives peut différer';
     36$lang['Download links'] = 'Liens de téléchargement';
     37$lang['<b>Warning:</b> all files will be deleted within %d hours'] = '<b>Attention:</b> les fichiers seront supprimés dans %d heures';
     38$lang['Cancel this download'] = 'Annuler ce téléchargement';
     39$lang['Return to download page'] = 'Retourner à la page de téléchargement';
    440
    541?>
  • extensions/BatchDownloader/main.inc.php

    r16592 r16598  
    33Plugin Name: Batch Downloader
    44Version: auto
    5 Description: Allows users to download pictures sets in ZIP. Compatible with User Selection.
    6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=
     5Description: Allows users to download pictures sets in ZIP. Compatible with User Collections.
     6Plugin URI: http://piwigo.org/ext/extension_view.php?eid=616
    77Author: Mistic
    88Author URI: http://www.strangeplanet.fr
Note: See TracChangeset for help on using the changeset viewer.