From 0971ce48d217b7cc8081ae70c4b041ab23fdf29c Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 22 Mar 2006 01:01:47 +0000 Subject: URL rewriting: capable of fully working with urls without ? URL rewriting: works with image file instead of image id (change make_picture_url to generate urls with file name instead of image id) URL rewriting: completely works with category/best_rated and picture/best_rated/534 (change 'category.php?' to 'category' in make_index_url and 'picture.php?' to 'picture' in make_picture_url to see it) fix: picture category display in upper bar fix: function rate_picture variables and use of the new user type fix: caddie icon appears now on category page fix: admin element_set sql query was using storage_category_id column (column has moved to #image_categories) fix: replaced some old $_GET[xxx] with $page[xxx] fix: pictures have metadata url (use ? parameter - might change later) git-svn-id: http://piwigo.org/svn/trunk@1092 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/calendar_monthly.class.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'include/calendar_monthly.class.php') diff --git a/include/calendar_monthly.class.php b/include/calendar_monthly.class.php index 0d70ea4c6..1f26e1275 100644 --- a/include/calendar_monthly.class.php +++ b/include/calendar_monthly.class.php @@ -224,7 +224,7 @@ function build_global_calendar() $query.= $this->get_date_where(); $query.= ' GROUP BY period - ORDER BY YEAR('.$this->date_field.') DESC'; + ORDER BY YEAR('.$this->date_field.') DESC, MONTH('.$this->date_field.')'; $result = pwg_query($query); $items=array(); @@ -350,7 +350,9 @@ SELECT file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as do $row = mysql_fetch_array(pwg_query($query)); $items[$day]['tn_path'] = get_thumbnail_src($row['path'], @$row['tn_ext']); - $items[$day]['tn_file'] = $row['file']; + $items[$day]['file'] = $row['file']; + $items[$day]['path'] = $row['path']; + $items[$day]['tn_ext'] = @$row['tn_ext']; $items[$day]['width'] = $row['width']; $items[$day]['height'] = $row['height']; $items[$day]['dow'] = $row['dow']; @@ -445,7 +447,10 @@ SELECT file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as do } else {// item not an image (tn is either mime type or an image) - $tn_size = @getimagesize($items[$day]['tn_path']); + $thumb = get_thumbnail_src( + $items[$day]['path'], @$items[$day]['tn_ext'], false + ); + $tn_size = @getimagesize($thumb); } $tn_width = $tn_size[0]; $tn_height = $tn_size[1]; @@ -548,7 +553,7 @@ SELECT file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as do 'thumbnails.line.thumbnail', array( 'IMAGE'=>$data['tn_path'], - 'IMAGE_ALT'=>$data['tn_file'], + 'IMAGE_ALT'=>$data['file'], 'IMAGE_TITLE'=>$thumbnail_title, 'U_IMG_LINK'=>$url ) -- cgit v1.2.3