diff options
author | plegall <plg@piwigo.org> | 2011-11-04 23:49:03 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2011-11-04 23:49:03 +0000 |
commit | ff8e5dc9e3555adda12b829db6b2d02ba19d33dc (patch) | |
tree | 23420a880e4cc8f009f0dfd1d8fe2bbaa34a816c /include/category_default.inc.php | |
parent | a9d3ee0e4db38c00cc2380b14616f338acd8e4ea (diff) |
feature 2397 added: add details about the album thumbnail for extra templates.
Algorithm changed for FILE_HAS_HD : we don't care about the $user['enabled_high']
Fields added in category_default : high_filesize, high_width, high_height, rating_score
We send the same fields on category_cats but for album thumbnail only.
git-svn-id: http://piwigo.org/svn/branches/2.3@12545 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/category_default.inc.php')
-rw-r--r-- | include/category_default.inc.php | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php index 77d915ae8..7204e1b4b 100644 --- a/include/category_default.inc.php +++ b/include/category_default.inc.php @@ -111,28 +111,31 @@ foreach ($pictures as $row) $name = get_picture_title($row); - $tpl_var = - array( - 'ID' => $row['id'], - 'TN_SRC' => get_thumbnail_url($row), - 'TN_ALT' => htmlspecialchars(strip_tags($name)), - 'TN_TITLE' => get_thumbnail_title($row), - 'URL' => $url, - - /* Fields for template-extension usage */ - 'FILE_PATH' => $row['path'], - 'FILE_POSTED' => $row['date_available'], - 'FILE_CREATED' => $row['date_creation'], - 'FILE_DESC' => $row['comment'], - 'FILE_AUTHOR' => $row['author'], - 'FILE_HIT' => $row['hit'], - 'FILE_SIZE' => $row['filesize'], - 'FILE_WIDTH' => $row['width'], - 'FILE_HEIGHT' => $row['height'], - '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 */ + $tpl_var = array( + 'ID' => $row['id'], + 'TN_SRC' => get_thumbnail_url($row), + 'TN_ALT' => htmlspecialchars(strip_tags($name)), + 'TN_TITLE' => get_thumbnail_title($row), + 'URL' => $url, + + // Extra fields for usage in extra themes + 'FILE_PATH' => $row['path'], + 'FILE_POSTED' => $row['date_available'], + 'FILE_CREATED' => $row['date_creation'], + 'FILE_DESC' => $row['comment'], + 'FILE_AUTHOR' => $row['author'], + 'FILE_HIT' => $row['hit'], + 'FILE_SIZE' => $row['filesize'], + 'FILE_WIDTH' => $row['width'], + 'FILE_HEIGHT' => $row['height'], + 'FILE_METADATE' => $row['date_metadata_update'], + 'FILE_HAS_HD' => $row['has_high'], + 'FILE_HD_WIDTH' => $row['high_width'], + 'FILE_HD_HEIGHT' => $row['high_height'], + 'FILE_HD_FILESIZE' => $row['high_filesize'], + 'FILE_RATING_SCORE' => $row['rating_score'], ); + if ($conf['index_new_icon']) { $tpl_var['icon_ts'] = get_icon($row['date_available']); |