Changeset 536 for trunk/picture.php


Ignore:
Timestamp:
Sep 24, 2004, 10:37:29 AM (20 years ago)
Author:
z0rglub
Message:

add support of a third size picture in "high" sub-directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/picture.php

    r535 r536  
    165165  {
    166166    $picture[$i]['src'] = $cat_directory.$row['file'];
     167    // if we are working on the "current" element, we search if there is a
     168    // high quality picture
     169    if ($i == 'current')
     170    {
     171      if (@fopen($cat_directory.'high/'.$row['file'], 'r'))
     172      {
     173        $picture[$i]['high'] = $cat_directory.'high/'.$row['file'];
     174      }
     175    }
    167176  }
    168177
     
    210219$url_admin.= '&image_id='.$_GET['image_id'];
    211220
    212 $url_slide = $picture['current']['url'].'&slideshow='.$conf['slideshow_period'];
     221$url_slide = $picture['current']['url'];
     222$url_slide.= '&slideshow='.$conf['slideshow_period'];
    213223//----------------------------------------------------------- rate registration
    214224if (isset($_GET['rate'])
     
    387397if (is_numeric( $page['cat'] ))
    388398{
    389   $title_img = replace_space(get_cat_display_name( $page['cat_name'], " > "));
     399  $title_img = replace_space(get_cat_display_name($page['cat_name'],' > '));
    390400  $n = $page['num'] + 1;
    391401  $title_nb = $n.'/'.$page['cat_nb_images'];
     
    457467  'L_DOWNLOAD_HINT' => $lang['download_hint'],
    458468  'L_PICTURE_METADATA' => $lang['picture_show_metadata'],
     469  'L_PICTURE_HIGH' => $lang['picture_high'],
     470  'L_PICTURE_HIGH_ALT' => $lang['picture_high_alt'],
    459471 
    460472  'U_HOME' => add_session_id($url_home),
     
    465477  )
    466478);
    467 //-------------------------------------------------------- upper menu management
     479//------------------------------------------------------- upper menu management
    468480// download link if file is not a picture
    469481if (!$picture['current']['is_picture'])
    470482{
    471   $template->assign_block_vars('download', array(
    472         'U_DOWNLOAD' => $picture['current']['download']
    473       ));
     483  $template->assign_block_vars(
     484    'download',
     485    array('U_DOWNLOAD' => $picture['current']['download']));
    474486}
    475487else
    476488{
    477   $template->assign_block_vars('ecard', array(
    478         'U_ECARD' => $picture['current']['url']
    479       ));
    480 }
    481 
     489  $template->assign_block_vars(
     490    'ecard',
     491    array('U_ECARD' => $picture['current']['url']));
     492}
     493// display a high quality link if present
     494if (isset($picture['current']['high']))
     495{
     496  $template->assign_block_vars(
     497    'high',
     498    array('U_HIGH' => $picture['current']['high']));
     499}
    482500//------------------------------------------------------- favorite manipulation
    483501if ( !$user['is_the_guest'] )
Note: See TracChangeset for help on using the changeset viewer.