aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2009-07-01 19:22:53 +0000
committervdigital <vdigital@piwigo.org>2009-07-01 19:22:53 +0000
commited23132fc788b0833def52bc4d8372026c64e039 (patch)
tree9c529578140dfc653a44d5d7a296afec5319e9c0
parent731cb8940c2fe220f2d1b5ea16abc3a594746b21 (diff)
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} git-svn-id: http://piwigo.org/svn/trunk@3485 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index ae24adec1..772865518 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -103,11 +103,12 @@ foreach ($pictures as $row)
),
array('start')
);
-
+ $tn_src = get_thumbnail_url($row);
+ list($tn_width, $tn_height, $tn_type) = @getimagesize($tn_src);
$tpl_var =
array(
'ID' => $row['id'],
- 'TN_SRC' => get_thumbnail_url($row),
+ 'TN_SRC' => $tn_src,
'TN_ALT' => $row['file'],
'TN_TITLE' => get_thumbnail_title($row),
'icon_ts' => get_icon($row['date_available']),
@@ -126,6 +127,9 @@ foreach ($pictures as $row)
'FILE_METADATE' => $row['date_metadata_update'],
'FILE_HAS_HD' => ($row['has_high'] and $user['enabled_high']=='true') ?
true:false, /* lack of include/functions_picture.inc.php */
+ 'FILE_TN_WIDTH' => $tn_width,
+ 'FILE_TN_HEIGHT' => $tn_height,
+ 'FILE_TN_TYPE' => $tn_type,
);
if ($user['show_nb_hits'])