Problem with thumb images
Posted: Sat Aug 20, 2005 12:11 pm
Hi,
If you look at this page http://www.moganpuerto.com/results.php you will see 3 properties on the right hand side. Each of these properties should have thumbnail images associated with them but as you can see the top one is the only one that has. I’m at a loss as to why but I suspect it is something to do with a loop that I’m using to retrieve the thumbs. You can see from the source code too that the string within the missing images is populated but doesn’t have an ‘ID’ associated with it and as I say I can’t figure this out.
I have the images in a separate table and have a relationship query with the table that contains the property details. This works fine for the first so I presume that the table are ok. I have made sure that there are no images missing or the ext’s are ok.
Below is the code I’m using to retrieve the thumbs and I appreciate it is a big bit but hopefully you might be able to show me what is missing. It might not seem it but I’m really new to this stuff and although this site is for a relation it is a big challenge for me and any help will be more than appreciated.
Many thanks for your time on this.
B
If you look at this page http://www.moganpuerto.com/results.php you will see 3 properties on the right hand side. Each of these properties should have thumbnail images associated with them but as you can see the top one is the only one that has. I’m at a loss as to why but I suspect it is something to do with a loop that I’m using to retrieve the thumbs. You can see from the source code too that the string within the missing images is populated but doesn’t have an ‘ID’ associated with it and as I say I can’t figure this out.
I have the images in a separate table and have a relationship query with the table that contains the property details. This works fine for the first so I presume that the table are ok. I have made sure that there are no images missing or the ext’s are ok.
Below is the code I’m using to retrieve the thumbs and I appreciate it is a big bit but hopefully you might be able to show me what is missing. It might not seem it but I’m really new to this stuff and although this site is for a relation it is a big challenge for me and any help will be more than appreciated.
Many thanks for your time on this.
B
Code: Select all
<?php do { ?>
<?PHP
if (isset($row_rstThumbs['ThumbName']) && file_exists('images/apartments/'.$row_rstThumbs['ThumbName'])) {
$image_info_1 = getimagesize('images/apartments/'.$row_rstThumbs['ThumbName']);
}$dims_1 = isset($image_info_1) ? $image_info_1[3] : '';
if (isset($row_rstThumbs['ImageName']) && file_exists('images/apartments/'.$row_rstThumbs['ImageName'])) {
$image_info_large = getimagesize('images/apartments/'.$row_rstThumbs['ImageName']);
}$dims_2 = isset($image_info_large) ? $image_info_large[3] : '';
if ($dims_1) { ?><!-- Add +20 to get the image to center in pop up and show close button-->
<a href="gallery_pop.php?image_id=<?php echo $row_rstThumbs['id']; ?>" title="Mogan Puerto"><img src="images/apartments/<?php echo $row_rstThumbs['ThumbName']; ?>" <?php echo $dims_1; }?> alt="Click for a larger image" border="0" onClick="dpSmartLink('gallery_pop.php?image_id=<?php echo $row_rstThumbs['id']; ?>','newWin','<?php echo $image_info_large[0]+ '20'; ?>','<?php echo $image_info_large[1]+ '50'; ?>','100:0',0);return document.MM_returnValue"></a>
<?php } while ($row_rstThumbs = mysql_fetch_assoc($rstThumbs)); ?>