diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index 57a1f6e0b..0e1418181 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -153,6 +153,10 @@ $current_rank = 1; while ($row = pwg_db_fetch_assoc($result)) { $src = get_thumbnail_url($row); + + list($thumbnail_width, $thumbnail_height) = getimagesize($src); + $thumbnail_x_center = $thumbnail_width/2; + $thumbnail_y_center = $thumbnail_height/2; $template->append( 'thumbnails', @@ -160,6 +164,10 @@ while ($row = pwg_db_fetch_assoc($result)) 'ID' => $row['id'], 'TN_SRC' => $src, 'RANK' => $current_rank * 10, + 'CLIP_TOP' => round($thumbnail_y_center - 96/2), + 'CLIP_RIGHT' => round($thumbnail_x_center + 96/2), + 'CLIP_BOTTOM' => round($thumbnail_y_center + 96/2), + 'CLIP_LEFT' => round($thumbnail_x_center - 96/2) ) ); diff --git a/admin/themes/default/template/element_set_ranks.tpl b/admin/themes/default/template/element_set_ranks.tpl index 08921fb48..b45ca5d19 100644 --- a/admin/themes/default/template/element_set_ranks.tpl +++ b/admin/themes/default/template/element_set_ranks.tpl @@ -34,8 +34,12 @@ {if !empty($thumbnails)}