Changeset 32262


Ignore:
Timestamp:
Jun 21, 2020, 8:41:03 PM (4 years ago)
Author:
ddtddt
Message:

[memories] bug more 15 photos year 1 / add date in pwg bloc / in block show always bar

Location:
extensions/memories
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/memories/blockhome/main.inc.php

    r32223 r32262  
    4646          $daydate=date("Y-m-d", strtotime('-1 year'));
    4747        }
    48        
     48        $template->clear_assign('pfoyas');
    4949        for ($i = 1; $i <= $confpfoya['pfoya_datemax']; $i++) {
    5050        $daydate2=date("Y-m-d", strtotime('-'.$i.' year'));
     
    119119    LIMIT 0, '.$pfoyanip.'
    120120  ;';
    121 
     121if(empty($query)){
     122        if($_SESSION['memodate']<$confpfoya['pfoya_nip']){
     123                $_SESSION['memodate']+=1;
     124                redirect($_SERVER["REQUEST_URI"]);
     125        }
     126}
     127 
     128 
    122129    $page['items'] = array_from_query($query, 'id');
    123130        $page['start'] = 0;
     
    131138include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
    132139
    133 if (!empty($pwg_stuffs_tpl_thumbnails_var))
    134 {
     140if (empty($pwg_stuffs_tpl_thumbnails_var)){
     141  $template->assign('NOPHOTOPFOYA','b');
     142}
     143  $template->assign('pfoyadata',l10n('Photos from').' '.format_date($daydate));
    135144  $block['thumbnails'] = $pwg_stuffs_tpl_thumbnails_var;
    136145  $block['derivative_params'] = ImageStdParams::get_by_type(IMG_THUMB);
    137146  $block['TEMPLATE'] = realpath(PFOYA_PATH.'/blockhome/stuffs_homepfoya.tpl');
    138 }
    139 
    140147$page = $page_save;
    141148$template->assign('THUMBNAILS', $tpl_save);
  • extensions/memories/blockhome/stuffs_homepfoya.tpl

    r32222 r32262  
    7373<div class="pfoya"><a href="{$PFOAYALINK}">{'more photos'|@translate} ...</a></div>
    7474{/if}
     75
     76{if isset($NOPHOTOPFOYA)}
     77{'no photos memories'|@translate}
     78{/if}
  • extensions/memories/language/en_UK/plugin.lang.php

    r32230 r32262  
    4141$lang['link in blocks'] = 'link in blocks';
    4242$lang['link to memories page'] = 'link to memories page';
     43$lang['no photos memories'] = 'no photos memories';
  • extensions/memories/language/fr_FR/plugin.lang.php

    r32230 r32262  
    4242$lang['link in blocks'] = 'lien dans le blocs';
    4343$lang['link to memories page'] = 'lien vers la page souvenirs';
     44$lang['no photos memories'] = 'pas de photo souvenir';
  • extensions/memories/main.inc.php

    r32230 r32262  
    123123                listyears();
    124124        }
    125           if($testurl[1]=='1-year-ago'){
     125          if(substr($testurl[1],0,10)=='1-year-ago'){
    126126                if (!in_array('memories-1-year-ago', $tokens)){return;}
    127127                        $daydate=date("Y-m-d", strtotime('-1 year'));
Note: See TracChangeset for help on using the changeset viewer.