Changeset 3485 for trunk


Ignore:
Timestamp:
Jul 1, 2009, 9:22:53 PM (15 years ago)
Author:
vdigital
Message:

merge r3484 from branch 2.0 to trunk
New: Extend of available fields within a category page for a template-extension simple usage.
Add thumbnail dimensions to remove as much as possible some PHP in tpl extensions.

{$thumbnails.FILE_TN_WIDTH}
{$thumbnails.FILE_TN_HEIGHT}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/category_default.inc.php

    r3282 r3485  
    104104        array('start')
    105105      );
    106 
     106  $tn_src = get_thumbnail_url($row);
     107  list($tn_width, $tn_height, $tn_type) = @getimagesize($tn_src);
    107108  $tpl_var =
    108109    array(
    109110      'ID'        => $row['id'],
    110       'TN_SRC'    => get_thumbnail_url($row),
     111      'TN_SRC'    => $tn_src,
    111112      'TN_ALT'    => $row['file'],
    112113      'TN_TITLE'  => get_thumbnail_title($row),
     
    127128      'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?
    128129                true:false, /* lack of include/functions_picture.inc.php */
     130      'FILE_TN_WIDTH'  => $tn_width,
     131      'FILE_TN_HEIGHT' => $tn_height,
     132      'FILE_TN_TYPE'   => $tn_type,
    129133    );
    130134
Note: See TracChangeset for help on using the changeset viewer.