Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > MISCELLANEOUS > Archives > Bug Report 1.4.x

Thread Closed
 
Thread Tools
  #1  
Old 04-15-2005, 05:44 AM
derevaun Offline
pp regular
 
Join Date: Mar 2005
Location: oly, wa
Posts: 47
Return of odd thumbnail problem, plus quirky categories

I took the opportunity to totally redo my site (http://asiftosay.com) with the 1.4 upgrade. Mostly I wanted to better organize my categories so I could use the IMAGE_CATEGORY tag to give basic camera info (e.g. "Brownie Starflex, Velvia, Cross processed"). And I wanted to shake off the weird behavior of my thumbnails in which there were fewer of them with some images.

1.4 is like a dream come true, but the thumbnail problem is back :cry:

I thought it was because I'd originally uploaded a bunch of images and then rearranged them back in time. But this time I just uploaded them a few hours apart and left them with their initial dates, but the problem persists. The third-to-last image only shows 8 (of 9) thumbnails, and the previous one only shows 7.

And, I'm having a hard time figuring out how to list the categories in their numerical order. I purposely made some unused categories (named "-") for future use amid the current categories so that all the cameras are before the lenses which are before the films. But when they're displayed, they're not in that order. In fact, I can't tell what order they're in. I've looked over the part of index.php that seems to retrieve them, but I don't know enough SQL to recognize any sorting going on.

These are minor problems that I can live with, but I'd appreciate any help just the same.
  #2  
Old 04-15-2005, 06:25 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
categories are ordered to their index id.

about thumbnails. ) I found it at last! I think it is inside the code where Punk has tried to calculate the number of thums ahead and before of the current image. I'll check this.

I move this Topic to v1.4 Bug report.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #3  
Old 04-15-2005, 06:57 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
change line 207-214 of index.php to this
Code:
        if($aheadnumb <= $aheadlimit) {
            $behindlimit = ($cfgrow['thumbnumber']-1)-$aheadnumb;
            $aheadlimit = $aheadnumb;
            }
        if($behindnumb <= $behindlimit) {
            $aheadlimit = ($cfgrow['thumbnumber']-1)-$behindnumb;
            $behindlimit = $behindnumb;
            }
the old bugged code was
Code:
        if($aheadnumb <= "1") {
            $behindlimit = ($cfgrow['thumbnumber']-1)-$aheadnumb;
            $aheadlimit = $aheadnumb;
            }
        if($behindnumb <= "1") {
            $aheadlimit = ($cfgrow['thumbnumber']-1)-$behindnumb;
            $behindlimit = $behindnumb;
            }
thank you for bug report I'll send this to Connie too to update the official release. ( I think it could be v1.4.01 now )
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #4  
Old 04-15-2005, 03:24 PM
Anonymous Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 810
Categories aren't ordered by id. They're ordered depending on which category you edited last, or however MySQL sees fit since there is no order by specified in the select.

Do a search for the string "Modified from Mark Lewin's hack" around line 790 of index.php and change the $querystr to look like this:

Code:
$querystr = "select t1.cat_id,t2.name from ".$pixelpost_db_prefix."catassoc as t1 inner join ".$pixelpost_db_prefix."categories t2 on t1.cat_id = t2.id where t1.image_id = '$image_id' order by t1.cat_id";
  #5  
Old 04-15-2005, 07:52 PM
Anonymous Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 810
Success on both counts Wow! That was incredibly fast. Thanks guys!!!
Thread Closed


Thread Tools




All times are GMT. The time now is 08:49 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs