aboutsummaryrefslogtreecommitdiffstats
path: root/comments.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-01-20 05:36:58 +0000
committerrvelices <rv-github@modusoptimus.com>2012-01-20 05:36:58 +0000
commitb7fff52095e774c9e905aafe980fec251ee3eaca (patch)
treee6b8c2fdad5d490749832f709d75f94a2ceaf659 /comments.php
parent99b58aef93c2a681ded76d2ba44a28cdef397291 (diff)
feature 2548 multisize
- comments thumbnails + no more hard coded thumbnail sizes in css - removed admin thumbnail page + language cleanup git-svn-id: http://piwigo.org/svn/trunk@12930 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'comments.php')
-rw-r--r--comments.php21
1 files changed, 12 insertions, 9 deletions
diff --git a/comments.php b/comments.php
index a2582eb2d..d1f1a27ec 100644
--- a/comments.php
+++ b/comments.php
@@ -116,7 +116,7 @@ if (isset($_GET['cat']) and 0 != $_GET['cat'])
{
$category_ids = array(-1);
}
-
+
$page['where_clauses'][] =
'category_id IN ('.implode(',', $category_ids).')';
}
@@ -413,7 +413,7 @@ if (count($comments) > 0)
// retrieving element informations
$elements = array();
$query = '
-SELECT id, name, file, path, representative_ext
+SELECT *
FROM '.IMAGES_TABLE.'
WHERE id IN ('.implode(',', $element_ids).')
;';
@@ -455,7 +455,7 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id
}
// source of the thumbnail picture
- $thumbnail_src = DerivativeImage::thumb_url( $elements[$comment['image_id']] );
+ $src_image = new SrcImage($elements[$comment['image_id']]);
// link to the full size picture
$url = make_picture_url(
@@ -469,7 +469,7 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id
$tpl_comment = array(
'ID' => $comment['comment_id'],
'U_PICTURE' => $url,
- 'TN_SRC' => $thumbnail_src,
+ 'src_image' => $src_image,
'ALT' => $name,
'AUTHOR' => trigger_event('render_comment_author', $comment['author']),
'DATE'=>format_date($comment['date'], true),
@@ -509,11 +509,11 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id
if (isset($edit_comment) and ($comment['comment_id'] == $edit_comment))
{
- $tpl_comment['IN_EDIT'] = true;
- $key = get_ephemeral_key(2, $comment['image_id']);
- $tpl_comment['KEY'] = $key;
- $tpl_comment['IMAGE_ID'] = $comment['image_id'];
- $tpl_comment['CONTENT'] = $comment['content'];
+ $tpl_comment['IN_EDIT'] = true;
+ $key = get_ephemeral_key(2, $comment['image_id']);
+ $tpl_comment['KEY'] = $key;
+ $tpl_comment['IMAGE_ID'] = $comment['image_id'];
+ $tpl_comment['CONTENT'] = $comment['content'];
}
}
@@ -534,6 +534,9 @@ SELECT c.id, name, permalink, uppercats, com.id as comment_id
}
}
+$derivative_params = trigger_event('get_comments_derivative_params', ImageStdParams::get_by_type(IMG_THUMB) );
+$template->assign( 'derivative_params', $derivative_params );
+
// include menubar
$themeconf = $template->get_template_vars('themeconf');
if (!isset($themeconf['hide_menu_on']) OR !in_array('theCommentsPage', $themeconf['hide_menu_on']))