From eacd53fb971857692f8eb295b3257a079dc0de09 Mon Sep 17 00:00:00 2001 From: flop25 Date: Sat, 26 Mar 2011 15:53:38 +0000 Subject: use of tiptip for the name of the picture, and this name is now in the alt attribute. git-svn-id: http://piwigo.org/svn/trunk@9868 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/element_set_ranks.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'admin/element_set_ranks.php') diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index 6c7a759ad..da2ace70e 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -197,8 +197,10 @@ $template->assign( $query = ' SELECT id, + file, path, tn_ext, + name, rank FROM '.IMAGES_TABLE.' JOIN '.IMAGE_CATEGORY_TABLE.' ON image_id = id @@ -216,7 +218,17 @@ while ($row = pwg_db_fetch_assoc($result)) $src = get_thumbnail_url($row); $thumbnail_size = getimagesize($src); + if ( !empty( $row['name'] ) ) + { + $thumbnail_name = $row['name']; + } + else + { + $file_wo_ext = get_filename_wo_extension($row['file']); + $thumbnail_name = str_replace('_', ' ', $file_wo_ext); + } $thumbnail_info[] = array( + 'name' => $thumbnail_name, 'width' => $thumbnail_size[0], 'height' => $thumbnail_size[1], 'id' => $row['id'], @@ -242,6 +254,7 @@ foreach ($thumbnail_info as $thumbnails_info) 'thumbnails', array( 'ID' => $thumbnails_info['id'], + 'NAME' => $thumbnails_info['name'], 'TN_SRC' => $thumbnails_info['tn_src'], 'RANK' => $thumbnails_info['rank'], 'CLIPING' => round($clipping), -- cgit v1.2.3