From f1494f18931ad354a05755c2c8dbfef1d51bfe87 Mon Sep 17 00:00:00 2001 From: vdigital Date: Sun, 29 Apr 2007 19:04:57 +0000 Subject: Bug 0000684: History [Search] - Add a thumbnail display. git-svn-id: http://piwigo.org/svn/trunk@1991 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/history.php | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'admin/history.php') diff --git a/admin/history.php b/admin/history.php index 0c8f34c33..cdfe5ee81 100644 --- a/admin/history.php +++ b/admin/history.php @@ -413,7 +413,10 @@ SELECT id, IF(name IS NULL, file, name) AS label, filesize, - high_filesize + high_filesize, + file, + path, + tn_ext FROM '.IMAGES_TABLE.' WHERE id IN ('.implode(',', array_keys($image_ids)).') ;'; @@ -421,7 +424,10 @@ SELECT $label_of_image = array(); $filesize_of_image = array(); $high_filesize_of_image = array(); - + $file_of_image = array(); + $path_of_image = array(); + $tn_ext_of_image = array(); + $result = pwg_query($query); while ($row = mysql_fetch_array($result)) { @@ -436,6 +442,10 @@ SELECT { $high_filesize_of_image[ $row['id'] ] = $row['high_filesize']; } + + $file_of_image[ $row['id'] ] = $row['file']; + $path_of_image[ $row['id'] ] = $row['path']; + $tn_ext_of_image[ $row['id'] ] = $row['tn_ext']; } // echo '
'; print_r($high_filesize_of_image); echo '
'; @@ -551,9 +561,29 @@ SELECT ) ); - $image_string = ''; - $image_string.= '('.$line['image_id'].')'; - + // (1258) + $element = array( + 'id' => $line['image_id'], + 'file' => $file_of_image[$line['image_id']], + 'path' => $path_of_image[$line['image_id']], + 'tn_ext' => $tn_ext_of_image[$line['image_id']], + ); + $image_string = ''; + if (!isset($conf['history_no_thumb']) or $conf['history_no_thumb']) { + $thumb_mode = "over"; + if (isset($conf['history_no_hover']) and $conf['history_no_hover']) { + $thumb_mode = "thumbnail"; + } + $image_string = '' + .'('.$line['image_id'].') '; + } + else { + $image_string= ''; + $image_string.= '('.$line['image_id'].')'; + } + if (isset($label_of_image[$line['image_id']])) { $image_string.= ' '.$label_of_image[$line['image_id']]; -- cgit v1.2.3