Issue with Lightbox

10 posts by 4 authors in: Forums > CMS Builder
Last Post: January 25, 2011   (RSS)

No matter what I do, I cannot get lightbox.js to work on my page. It opens a window when you click on the image (under project images), but not a lightbox window.

I am also getting a browser error.

----------------------------------
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; GTB6.6; SearchToolbar 1.2; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729; .NET4.0C; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)
Timestamp: Mon, 24 Jan 2011 17:58:53 UTC


Message: Object doesn't support this property or method
Line: 3974
Char: 9
Code: 0
URI: http://www.axislighting.com/CMS/lightbox/js/prototype.js

--------------------------------------

At one point, it did work nicely. I am not sure what the issue is now. I am attaching the page.
Attachments:

itemsdetail_002.php 19K

Re: [Jason] Issue with Lightbox

I added just greybox.js

Re: [dccreatives] Issue with Lightbox

By Jason - January 24, 2011

Hi,

I'm not familiar with this script, so I'm not sure how they interact. If you remove greybox does lightbox work?
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Issue with Lightbox

NO, even if I remove Greybox - I still can't get lightbox to work.

Re: [dccreatives] Issue with Lightbox

By Jason - January 24, 2011

Hi,

Okay, it seems like this issue will require some more troubleshooting.

Here are some things you can try:
1) re-upload your javascript files.
2) create a test html page that uses lightbox to confirm that the script can work.

We don't offer free support for 3rd party scripts, but if you would like us to look into this further, please send an email to consulting@interactivetools.com

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/

Re: [Jason] Issue with Lightbox

By gkornbluth - January 24, 2011 - edited: January 24, 2011

Hi,

The CMSB Cookbook http://www.thecmsbcookbook.com has some very specific recipes on how to implement lightbox and other slide show scripts, like milkbox, fancy zoom and Slide Show Pro.

Here's one of the recipes from the series that might help:

INTEGRATING LIGHTBOX WITH CMSB


Here’s the basic code that lightbox requires:
<?xml version="1.0" encoding="UTF-8" ?>
<gallery>
<album lgPath="album1/images/" tnPath="album1/thumb/" title="Album title" description="Album description" tn="album1/preview.jpg">
<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
<img src="1.jpg" title="" caption="" link="" target="_blank" pause="" />
</album>
</gallery>


Where:

lgPath = path to the large version of the photos
tnPath = path to the thumbnails (or preview photo in case of video)
caption = this would show on mouseover of the image
link = if the image is clicked it would follow this link

The one thing CMS Builder doesn't do is put it's thumbnails in a different directory. It puts them in the same directory and adds a _thumb extension. I've just used the main upload dir for both lgPath and tnPath.

Here's some code for a page viewer. Ideally you'd have a list viewer that would list albums and then you'd click through to this one to display an album. You could also direct link to a specific album. This one assumes you have some fields defined called: title, and description. Also you'll need to change the Table name and the require_once path to match your server.

<?PHP echo "<?xml version='1.0' encoding='UTF-8'?>\n";
require_once "../lib/viewer_functions.php";
$options = array(); $options['Table name'] = 'news';
$options['recordNum'] = '';
$options['where'] = '';
$record = getRecord($options);
?>
<gallery>
<album lgPath="<?PHP echo $SETTINGS['uploadUrl']; ?>
tnPath="<?PHP echo $SETTINGS['uploadUrl']; ?>"
title="<?PHP echo htmlspecialchars($record['title']); ?>"
description="<?PHP echo htmlspecialchars($record['description']); ?>" tn="album1/preview.jpg">

<?PHP if ($record): ?>
<?PHP foreach (getUploads($options['Table name'], 'uploads', $record['num']) as $upload): ?>
<img src="<?PHP echo htmlspecialchars($upload['filename']); ?>"
title="<?PHP echo htmlspecialchars($upload['info1']); ?>"
caption="<?PHP echo htmlspecialchars($upload['info2']); ?>"
link="<?PHP echo $upload['urlPath'] ?>"
target="_blank"
pause="" />
<?PHP endforeach ?>
<?PHP endif ?>
</album>
</gallery>

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Issue with Lightbox

By Damon - January 24, 2011

Hi,


The one thing CMS Builder doesn't do is put it's thumbnails in a different directory. It puts them in the same directory and adds a _thumb extension. I've just used the main upload dir for both lgPath and tnPath.


You may be referring to a really old version on CMS Builder. Since at least 1.22, when you upload images with CMS Builder, they go in the uploads directory and the thumbnails are created in the thumb directories depending on how many different sizes of thumbnails you have it setup to create:
/uploads/
/uploads/thumb/
/uploads/thumb2/
/uploads/thumb3/
/uploads/thumb4/
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] Issue with Lightbox

Thanks Damon,

That's what I get for not reading my own recipes.

I'll update that right away.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Issue with Lightbox

OK, seems that header had popeye.js in it and they do not work together. I took it out and it works nicely.