Changeset 26642


Ignore:
Timestamp:
Jan 12, 2014, 12:54:06 AM (7 years ago)
Author:
mistic100
Message:

use new trigger functions

Location:
extensions/BatchDownloader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/BatchDownloader/include/BatchDownloader.class.php

    r25969 r26642  
    467467      $this->updateParam('date_creation', date('Y-m-d H:i:s'));
    468468
    469       trigger_action('batchdownload_init_zip', $this->data, array_keys($this->images)); // triggered once for all
     469      trigger_notify('batchdownload_init_zip', $this->data, array_keys($this->images)); // triggered once for all
    470470    }
    471471
     
    571571      pwg_query($query);
    572572
    573       trigger_action('batchdownload_end_zip', $this->data, $images_added); // triggered for each zip
     573      trigger_notify('batchdownload_end_zip', $this->data, $images_added); // triggered for each zip
    574574
    575575      // all images added ?
     
    763763        {
    764764          $set['NAME'] = l10n('Album').': '.get_cat_display_name($category['upper_names']);
    765           $set['sNAME'] = l10n('Album').': '.trigger_event('render_category_name', $category['name']);
    766           $set['COMMENT'] = trigger_event('render_category_description', $category['comment']);
     765          $set['sNAME'] = l10n('Album').': '.trigger_change('render_category_name', $category['name']);
     766          $set['COMMENT'] = trigger_change('render_category_description', $category['comment']);
    767767
    768768          if (!empty($category['permalink']))
     
    804804          $set['NAME'].=
    805805            '<a href="' . make_index_url(array('tags'=>array($tag))) . '">'
    806             .trigger_event('render_tag_name', $tag['name'])
     806            .trigger_change('render_tag_name', $tag['name'])
    807807            .'</a>';
    808808          $set['BASENAME'].= '-'.$tag['url_name'];
  • extensions/BatchDownloader/maintain.inc.php

    r26056 r26642  
    55{
    66  private $installed = false;
     7
     8  private $default_conf = array(
     9    'groups'          => array(),
     10    'level'           => 0,
     11    'what'            => array('categories','specials','collections'),
     12    'photo_size'      => 'original',
     13    'multisize'       => true,
     14    'archive_prefix'  => 'piwigo',
     15    'archive_timeout' => 48, /* hours */
     16    'max_elements'    => 500,
     17    'max_size'        => 100, /* MB */
     18    'last_clean'      => time(),
     19    'one_archive'     => false,
     20    'force_pclzip'    => false,
     21    'direct'          => false,
     22    );
    723
    824  function install($plugin_version, &$errors=array())
     
    1329    if (empty($conf['batch_download']))
    1430    {
    15       $batch_download_default_config = array(
    16         'groups'          => array(),
    17         'level'           => 0,
    18         'what'            => array('categories','specials','collections'),
    19         'photo_size'      => 'original',
    20         'multisize'       => true,
    21         'archive_prefix'  => 'piwigo',
    22         'archive_timeout' => 48, /* hours */
    23         'max_elements'    => 500,
    24         'max_size'        => 100, /* MB */
    25         'last_clean'      => time(),
    26         'one_archive'     => false,
    27         'force_pclzip'    => false,
    28         'direct'          => false,
    29         );
    30 
    31       $conf['batch_download'] = serialize($batch_download_default_config);
     31      $conf['batch_download'] = serialize($this->default_config);
    3232      $conf['batch_download_comment'] = null;
    3333
  • extensions/BatchDownloader/template/view.tpl

    r25932 r26642  
    33  <h3>{$set.NAME}</h3>
    44  {if $set.COMMENT}<blockquote>{$set.COMMENT}</blockquote>{/if}
    5   {assign var="nb_images" value='<span class="nbImagesSet">'|@cat:$set.NB_IMAGES|@cat:'</span>'}
    6   {'%d photos'|translate|replace:'%d':'%s'|sprintf:$nb_images}
     5  {assign var="nb_images" value='<span class="nbImagesSet">'|cat:$set.NB_IMAGES|@cat:'</span>'}
     6  {'%d photos'|translate|replace:'%d':'%s':$nb_images}
    77  <br>
    88  <b><a href="{$U_INIT_ZIP}" rel="nofollow">{'Return to download page'|translate} →</a></b>
    99</fieldset>
    10 
    1110
    1211{if !empty($THUMBNAILS)}
     
    1413{$THUMBNAILS}
    1514</ul>
     15
    1616{else}
    1717{'This download set is empty'|translate}
    1818{/if}
    1919
    20 {if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
     20{if !empty($navbar)}{include file='navigation_bar.tpl'|get_extent:'navbar'}{/if}
    2121{/if}
Note: See TracChangeset for help on using the changeset viewer.