Changeset 3484


Ignore:
Timestamp:
Jul 1, 2009, 9:19:24 PM (12 years ago)
Author:
vdigital
Message:

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
  • branches/2.0/include/category_default.inc.php

    r3137 r3484  
    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.