Problem with Lightbox

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

By NigelGordijk - April 19, 2012 - edited: April 19, 2012

I've run into a problem with Lightbox on my client's site: http://www.primenutrients.ca/dealersDetails.php?This-is-a-test-1

I've uploaded one picture to the gallery, but the thumbnail is showing up as a broken image. Also, when you click on the broken image icon, the full size picture doesn't show up. Any idea why, please?

Here's my code:

<?php echo "<?xml version='1.0'?>\n"; ?>
<DIV ALIGN="CENTER">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- STEP1: Load Record (Paste this above other step) -->
<?php
require_once "cmsAdmin/lib/viewer_functions.php";
$options = array(); // NOTE: see online documentation for more details on these options
$options['tableName'] = 'dealers'; // (REQUIRED) MySQL tablename to list record from. Example: "article";
$options['recordNum'] = ''; // (optional) Record number to display. Example: "1"; Defaults to number on end of url, then 1
$options['where'] = ''; // (ADVANCED) MySQL WHERE conditions to use INSTEAD of recordNum to look up record. Example: "fieldname = 'value'"
$record = getRecord($options);
?>
<!-- /STEP1: Load Record -->

<!-- STEP2: Display Record (Paste this where you want your record displayed and re-arrange fields) -->
<?php if ($record): ?>
<?php endif ?>

<?php if (empty($record)): ?>
<!-- Display "No Records Found" Message -->
<?php endif ?>
<!-- STEP2: /Display Record -->

<!-- STEP3: Display Uploads from 'content' (Paste this where you want your uploads displayed) -->
<?php foreach (getUploads($options['tableName'], 'images', $record['num']) as $upload): ?>

<?php if ($upload['hasThumbnail']): ?>
<A HREF="<?php echo $upload['urlPath'] ?>" TITLE="<?php echo $upload['info1'] ?>" REL="lightbox[roadtrip]">
<IMG SRC="<?php echo $upload['thumbUrlPath'] ?>" WIDTH="<?php echo $upload['thumbWidth'] ?>" HEIGHT="<?php echo $upload['thumbHeight']?>" BORDER="3" ALIGN="middle" CLASS="imgGalleryThumbnail" /></A>

<?php elseif ($upload['isImage']): ?>
<A HREF="<?php echo $upload['urlPath'] ?>" TITLE="<?php echo $upload['info1'] ?>" REL="lightbox[roadtrip]">
<IMG SRC="<?php echo $upload['urlPath'] ?>" WIDTH="<?php echo $upload['width'] ?>" HEIGHT="<?php echo $upload['height'] ?>" BORDER="3" ALIGN="middle" CLASS="imgGalleryThumbnail" /></span></A>

<?php else: ?><?php endif ?>
<?php endforeach ?>
</DIV>

Thanks!
Nigel Gordijk

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

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