Changeset 1051 for trunk/picture.php


Ignore:
Timestamp:
Feb 23, 2006, 3:30:19 AM (18 years ago)
Author:
rvelices
Message:

new calendar completely integrated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r1046 r1051  
    363363}
    364364
    365 $url_up = PHPWG_ROOT_PATH.'category.php?cat='.$page['cat'];
     365$url_up = PHPWG_ROOT_PATH.'category.php?';
     366if ( isset($page['cat']) )
     367{
     368  $url_up .= 'cat='.$page['cat'];
     369}
     370elseif ( isset($_GET['calendar']) )
     371{
     372  $url_up .= 'calendar='.$_GET['calendar'];
     373}
    366374
    367375$url_up_start = floor( $page['current_rank'] / $user['nb_image_page'] );
     
    374382if ( $page['cat'] == 'search' )
    375383{
    376   $url_up.= "&search=".$_GET['search'];
     384  $url_up.= '&search='.$_GET['search'];
    377385}
    378386if ( $page['cat'] == 'list' )
    379387{
    380   $url_up.= "&list=".$_GET['list'];
     388  $url_up.= '&list='.$_GET['list'];
    381389}
    382390
     
    778786if (!empty($picture['current']['date_creation']))
    779787{
    780   $infos['INFO_CREATION_DATE'] =
    781     // FIXME because of search engine partial rewrite, giving the author
    782     // name threw GET is not supported anymore. This feature should come
    783     // back later, with a better design (calendar view).
    784 //     '<a href="'.
    785 //       PHPWG_ROOT_PATH.'category.php?cat=search'.
    786 //       '&amp;search=date_creation:'.$picture['current']['date_creation']
    787 //       .'">'.format_date($picture['current']['date_creation']).'</a>';
    788     format_date($picture['current']['date_creation']);
     788  $val = format_date($picture['current']['date_creation']);
     789  if ( $conf['calendar_datefield'] == 'date_creation' )
     790  {
     791    $infos['INFO_CREATION_DATE'] = '<a href="'.
     792       PHPWG_ROOT_PATH.'category.php?calendar=c-'.
     793       $picture['current']['date_creation'].'">'.$val.'</a>';
     794  }
     795  else
     796  {
     797     $infos['INFO_CREATION_DATE'] = $val;
     798  }
    789799}
    790800else
     
    794804
    795805// date of availability
    796 $infos['INFO_AVAILABILITY_DATE'] =
    797 // FIXME because of search engine partial rewrite, giving the author
    798 // name threw GET is not supported anymore. This feature should come
    799 // back later, with a better design (calendar view).
    800 //
    801 //   '<a href="'.
    802 //     PHPWG_ROOT_PATH.'category.php?cat=search'.
    803 //     '&amp;search=date_available:'.
    804 //     substr($picture['current']['date_available'], 0, 10)
    805 //     .'">'.
    806 //   format_date($picture['current']['date_available'], 'mysql_datetime').
    807 //   '</a>';
    808 format_date($picture['current']['date_available'], 'mysql_datetime');
     806$val = format_date($picture['current']['date_available'], 'mysql_datetime');
     807if ( $conf['calendar_datefield'] == 'date_available' )
     808{
     809  $infos['INFO_AVAILABILITY_DATE'] = '<a href="'.
     810     PHPWG_ROOT_PATH.'category.php?calendar=c-'.
     811     substr($picture['current']['date_available'],0,10).'">'.$val.'</a>';
     812}
     813else
     814{
     815   $infos['INFO_AVAILABILITY_DATE'] = $val;
     816}
    809817
    810818// size in pixels
Note: See TracChangeset for help on using the changeset viewer.