PDA

View Full Version : Thubs not showing correct!


darvida
08-19-2005, 03:10 PM
I´m using the latest version on Pixelpost.
With some pictures the thumbnails are not shown correct!
I´ve choosen to show 11 Thumbs below the picture.
But for e.g. here:
http://www.x-posure.fotografisches.at/index.php?showimage=46
only 8 are shown.
Onepicture before 9 are shown:
http://www.x-posure.fotografisches.at/index.php?showimage=38
Again one picture previous 10 ae shown...
http://www.x-posure.fotografisches.at/index.php?showimage=36
Why´s that?
Any suggestions?
Thanks
Christina

Connie
08-19-2005, 04:06 PM
could it be that some of the thumbnails have the same timestamp????

then it happens

darvida
08-19-2005, 05:38 PM
Yes they had, but different date. But allthough I´ve changed the time to different it does not work correct...
lg
Christina

GeoS
08-19-2005, 11:59 PM
Can you give as code which you use to display this thumbs (PHP code generating output for it)??

darvida
08-20-2005, 07:38 AM
Ok, I´m using the light_white template and in the code I use:
<div id="thumbrow"><IMAGE_THUMBNAIL_ROW></div>

The code in the index.php I guess is the one generating the IMAGE_THUMBNAIL_ROW:

if(function_exists(gd_info)) {
$gd_info = gd_info();
if($gd_info != "") { // check that gd is here before this
$aheadnumb = sql_array("select count(*) as count from ".$pixelpost_db_prefix."pixelpost where (datetime > '$image_datetime') and (datetime<='$cdate')");
$aheadnumb = $aheadnumb['count'];
$behindnumb = sql_array("select count(*) as count from ".$pixelpost_db_prefix."pixelpost where (datetime < '$image_datetime') and (datetime<='$cdate')");
$behindnumb = $behindnumb['count'];
$aheadlimit = round(($cfgrow['thumbnumber']-1)/2);
$behindlimit = round(($cfgrow['thumbnumber']-1)/2);
if($aheadnumb <= "1") {
$behindlimit = ($cfgrow['thumbnumber']-1)-$aheadnumb;
$aheadlimit = $aheadnumb;
}
if($behindnumb <= "1") {
$aheadlimit = ($cfgrow['thumbnumber']-1)-$behindnumb;
$behindlimit = $behindnumb;
}
$totalthumbcounter = 0; // will count up to four no matter what
$ahead_thumbs = "";
$thumbs_ahead = mysql_query("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime > '$image_datetime') and (datetime<='$cdate') order by datetime asc limit 0,$aheadlimit");
while(list($id,$headline,$image) = mysql_fetch_row($thumbs_ahead)) {
$headline = pullout($headline);
list($local_width,$local_height,$type,$attr) = getimagesize("thumbnails/thumb_$image_name");
$ahead_thumbs .= "<a href='$showprefix$id'><img src='thumbnails/thumb_$image' alt='$headline' title='$headline' class='thumbnails' width='$local_width' height='$local_height' /></a>";
$totalthumbcounter++;
}
$behind_thumbs = "";
$thumbs_behind = mysql_query("select id,headline,image from ".$pixelpost_db_prefix."pixelpost where (datetime < '$image_datetime') and (datetime<='$cdate') order by datetime desc limit 0,$behindlimit");
while(list($id,$headline,$image) = mysql_fetch_row($thumbs_behind)) {
$headline = pullout($headline);
list($local_width,$local_height,$type,$attr) = getimagesize("thumbnails/thumb_$image_name");
$behind_thumbs = "<a href='$showprefix$id'><img src='thumbnails/thumb_$image' alt='$headline' title='$headline' class='thumbnails' width='$local_width' height='$local_height' /></a>$behind_thumbs";
}
list($local_width,$local_height,$type,$attr) = getimagesize("thumbnails/thumb_$image_name");
$thumbnail_row = "$behind_thumbs<a href='$showprefix$image_id'><img src='thumbnails/thumb_$image_name' alt='$image_title' title='$image_title' class='current-thumbnail' width='$local_width' height='$local_height' /></a>$ahead_thumbs";
$tpl = str_replace("<IMAGE_THUMBNAIL_ROW>",$thumbnail_row,$tpl);

I post every day one single picture.
I´ve upload more picture at the same time and have then "post one day after the last post" checked, so the time is always the same, but with different date.
I hope that is what you asked me to post, if not please tell me.
Thanks a lot,
lg
Christina

GeoS
08-22-2005, 12:01 AM
Now links which you gave to us are correct.

Code which you show up to us is so strange and there are some logical mistakes.

You are only checking if there are 0 or 1 image before/after current and changing for it limit in correct way. In other condition you are trying to take 5 images before and 5 after curret - here is big uppppssssss!!

Here you got link which shows your miastake:
http://www.x-posure.fotografisches.at/index.php?showimage=3

You should have here 2 images before current and 8 after but you have 2 before (correct) and 5 after (correct numer is 8).

Your logical conditions are bad :/

darvida
08-22-2005, 09:25 AM
But I did change nothing in that code.
I use the code that comes with pixelpost.
Mhh...how can I fix that?
And why its working with some pictures and with others not?
Thanks
Christina

Connie
08-22-2005, 09:57 AM
Christina,

I just looked into the code of index.php / version 1.4.2

and the code is like that:
$aheadlimit = round(($cfgrow['thumbnumber']-1)/2);
$behindlimit = round(($cfgrow['thumbnumber']-1)/2);
if($aheadnumb <= $aheadlimit) {
$behindlimit = ($cfgrow['thumbnumber']-1)-$aheadnumb;
$aheadlimit = $aheadnumb;
}
if($behindnumb <= $behindlimit) {
$aheadlimit = ($cfgrow['thumbnumber']-1)-$behindnumb;
$behindlimit = $behindnumb;
$totalthumbcounter = 1;
}

but your code is like this:
$aheadlimit = round(($cfgrow['thumbnumber']-1)/2);
$behindlimit = round(($cfgrow['thumbnumber']-1)/2);
if($aheadnumb <= "1") {
$behindlimit = ($cfgrow['thumbnumber']-1)-$aheadnumb;
$aheadlimit = $aheadnumb;
}
if($behindnumb <= "1") {
$aheadlimit = ($cfgrow['thumbnumber']-1)-$behindnumb;
$behindlimit = $behindnumb;
}
$totalthumbcounter = 0; // will count up to four no matter what

so there are differences
where did you download this script and which version is PixelPost?

the code differs from the code which is in the original version... (kopfkratzend...)

darvida
08-22-2005, 12:13 PM
Hello,
I´ve changed the above codesegment and now it seems to work.
It tells me:
You are running version 1.4 of Pixelpost. Released 5 April 2005.
Ok, Ive seen there is a newer version. I downloaded the 1.4.2 Version and now want to upgrade.
In den upgrade read me the part 5 (upgrade from 1.4 to 1.4.2 is missing)
How do I upgrade?
Or do I have to upgrade first to version 1.4.1?
The code was from the index file of the 1.4 Version.
Thanks for your help, lg
Christina

darvida
08-22-2005, 12:34 PM
Ok, I did the upgrade from 1.4 to 1.4.1 and everything worked ok.
Then I upgraded from 1.4.1 to 1.4.2 like described in the docs, but now I get the alert message:
Redirection limit for this url exceeded. unable to load the requested page. This may be caused ba cookies that are blocked!
when I try to get into the admin.
And now?
Thanks for help,
lg
Christina

darvida
08-22-2005, 12:44 PM
Now I get the message:
Fatal error: Call to undefined function: upgradeto141() in /home/www/web71/html/pixelpost/admin/install.php on line 140

I´ve uploaded the 1.4 version again, but now the admin still does not work....

darvida
08-22-2005, 12:49 PM
After deleting everything and setting it up new it works and tells me:
You are running version 1.4.2 of Pixelpost. Released 18 July 2005.
Thank you so much for your help,
lg
Christina

Connie
08-22-2005, 01:44 PM
Christina,

I am glad it works for you now.

schön dass es jetzt funktioniert. Manchmal ist es nicht leicht, aber Fehler sind oft hartnäckig....

jetzt kannst du dich ja auf die Fotos konzentrieren, und das ist das Wichtigste!

Liebe Grüsse, Connie