Problem with Lightbox

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 19, 2012   (RSS)

Re: [NigelGordijk] Problem with Lightbox

By Damon - April 19, 2012

Hi Nigel,

The issue appears to be with the image URL.

The broken images has this code:
<A HREF="bw-products-600_002.png" TITLE="Product shot" REL="lightbox[roadtrip]">
<IMG SRC="thumb/bw-products-600_002.png" WIDTH="200" HEIGHT="152" BORDER="3" ALIGN="middle" CLASS="imgGalleryThumbnail" /></A>


What they should have is this:
<A HREF="/cmsAdmin/uploads/bw-products-600_002.png" TITLE="Product shot" REL="lightbox[roadtrip]">
<IMG SRC="/cmsAdmin/uploads/thumb/bw-products-600_002.png" WIDTH="200" HEIGHT="152" BORDER="3" ALIGN="middle" CLASS="imgGalleryThumbnail" /></A>


To fix the issue, check that the Upload Folder URL in the CMS Builder admin is set to:
/cmsAdmin/uploads/

Alternatively, you could add the missing part of the URL to your publish code:
<?php if ($upload['hasThumbnail']): ?>
<A HREF="/cmsAdmin/uploads/<?php echo $upload['urlPath'] ?>" TITLE="<?php echo $upload['info1'] ?>" REL="lightbox[roadtrip]">
<IMG SRC="/cmsAdmin/uploads/<?php echo $upload['thumbUrlPath'] ?>" WIDTH="<?php echo $upload['thumbWidth'] ?>" HEIGHT="<?php echo $upload['thumbHeight']?>" BORDER="3" ALIGN="middle" CLASS="imgGalleryThumbnail" /></A>


Let me know if that fixes it.
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Damon] Problem with Lightbox

Perfect! Thanks so much, Damon.

http://www.primenutrients.ca/dealersDetails.php?This-is-a-test-1
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net