Working with the new thumb2, thumb3,etc

3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 25, 2008   (RSS)

By kkegans - August 24, 2008

Greetings!

What changes need to be made to this code to look and display the "THUMB2" or "THUMB3" images?



<?php if ($upload['hasThumbnail']): ?>
<a href="<?php echo $upload['urlPath'] ?>" rel= "lightbox[model]">
<img border="0" src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" />



Thanks,



Kurt
CMSB Rocks!



Thanks,



Kurt

Re: [kkegans] Working with the new thumb2, thumb3,etc

By Dave - August 25, 2008

Hi Kurt,

Just add the number (2, 3, or 4) on the end and test for thumbUrlPathX instead of hasThumbnail. If there's no thumbnail thumbUrlPathX will be blank and test as false.

<?php if ($upload['thumbUrlPath2']): ?>
<a href="<?php echo $upload['urlPath2'] ?>" rel= "lightbox[model]">
<img border="0" src="<?php echo $upload['thumbUrlPath2'] ?>"
width="<?php echo $upload['thumbWidth2'] ?>"
height="<?php echo $upload['thumbHeight2'] ?>" alt="" />
<?php endif ?>


Hope that helps (and makes sense!). Let me know if you have any questions about that.
Dave Edis - Senior Developer
interactivetools.com