Some thumbnail/image problems
2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 19, 2010 (RSS)
A few issues that I can't seem to resolve.
1. Link: I have a listings page where I have added the link to go to the detailed page. The code used is <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a>. The problem is, it's not displaying the page - the URL it's displaying is http://www.fordland.com.au/lease.php%20%20?Unit-4-199-Parramatta-Road-1 when it should be displaying http://www.fordland.com.au/lease.php?Unit-4-199-Parramatta-Road-1 - it's adding %php20%php20? - any ideas?
2. Thumbnail: how can I get the thumbnail on the listing page to link to the detailed page? ie, when you click on the thumbnail image on http://www.fordland.com.au/leasesummary.php you get to the detailed page for that specific listing?
3. Thumbnail/images - I have a main top right image on the detailed page, which I am using as the thumbnail image on the listing page. I get how to create the thumbnail and can get that to display, but it's now changed the main top right image to a thumbnail as well when in fact it should be the larger sized image. For example, see http://www.fordland.com.au/lease.php?Unit-4-199-Parramatta-Road-1 The code I am using is <!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($lease_warehouseRecord['property_image_right'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
Any ideas?
Thanks in advance.
1. Link: I have a listings page where I have added the link to go to the detailed page. The code used is <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a>. The problem is, it's not displaying the page - the URL it's displaying is http://www.fordland.com.au/lease.php%20%20?Unit-4-199-Parramatta-Road-1 when it should be displaying http://www.fordland.com.au/lease.php?Unit-4-199-Parramatta-Road-1 - it's adding %php20%php20? - any ideas?
2. Thumbnail: how can I get the thumbnail on the listing page to link to the detailed page? ie, when you click on the thumbnail image on http://www.fordland.com.au/leasesummary.php you get to the detailed page for that specific listing?
3. Thumbnail/images - I have a main top right image on the detailed page, which I am using as the thumbnail image on the listing page. I get how to create the thumbnail and can get that to display, but it's now changed the main top right image to a thumbnail as well when in fact it should be the larger sized image. For example, see http://www.fordland.com.au/lease.php?Unit-4-199-Parramatta-Road-1 The code I am using is <!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
<?php foreach ($lease_warehouseRecord['property_image_right'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php else: ?>
<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>
<?php endif ?>
<?php endforeach ?>
Any ideas?
Thanks in advance.
Re: [degreesnorth] Some thumbnail/image problems
By Jason - August 19, 2010
Hi,
I think we can take care of all of these.
1) %20 is the way a web browser represents a space character in the url string. To fix this, go into your section editor and click on "Viewer Urls". In the boxes "List Page Url" and "Detail Page Url" make sure there are no spaces after the name of the page (ie lease.php). That should take care of that problem for you.
2) You can add <a> tags around your <img> tag for your thumbnail. Here is an example of how it may look. (Note: you'll probably have to change names based on the variables you're using on your page and the names in your database)
3) For this part, all we need to do is remove the code that will display a thumbnail. Try replacing it with this:
Hope this helps.
I think we can take care of all of these.
1) %20 is the way a web browser represents a space character in the url string. To fix this, go into your section editor and click on "Viewer Urls". In the boxes "List Page Url" and "Detail Page Url" make sure there are no spaces after the name of the page (ie lease.php). That should take care of that problem for you.
2) You can add <a> tags around your <img> tag for your thumbnail. Here is an example of how it may look. (Note: you'll probably have to change names based on the variables you're using on your page and the names in your database)
<?php foreach ($record['images'] as $upload): ?>
<?php if($upload['hasThumbnail']): ?>
<a href="<?php echo $record['_link'];?>"><img src="<?php echo $upload['thumbUrlPath']; ?>" height="<?php echo $upload['thumbHeight']; ?>" width="<?php echo $upload['thumbWidth']; ?>" /></a>
<?php endif ?>
<?php endforeach ?>
3) For this part, all we need to do is remove the code that will display a thumbnail. Try replacing it with this:
<?php foreach ($lease_warehouseRecord['property_image_right'] as $upload): ?>
<?php if ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>
<?php endif ?>
<?php endforeach ?>
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/