Page 1 of 1
Thickbox not working in Album
Posted: Fri Sep 22, 2006 1:45 am
by MayDay
Hello:: I have a new install of Hawaii 1.0 (i know I should upgrade) with Php 4.4.2 on a Linux server. I installed Album via the Module Manager. I have set the template to Thickbox under Content:Photo Albums:Properties and have uploaded several jpg images. Added the default photo album to the menu and also created a new content page and put in the {cms_module module='album'} call. The default works ok on both pages but when I switch to thickbox, nothing happens on the page. It is like the javascript is not working correctly. Tested in Firefox and IE6 on a PC and Firefox on a Mac. I also went to someone's cms page that had Album and their thickbox effect works for me.
Any thoughts as to what I might do?
Robert
Re: Thickbox not working in Album
Posted: Fri Sep 22, 2006 9:09 am
by Russ
Are you loading the Javascript? Thickbox should be set in Album admin on the gallery you want - in options I think. If this fails can you post you template code.
Russ
Re: Thickbox not working in Album
Posted: Fri Sep 22, 2006 11:34 am
by Greg
I found that I had to put the loading of the javascript files directly in the template to get thickbox to work consistently.
In the head section of your template
Code: Select all
<!--Thickbox stuff-->
<__script__ type="text/javascript" src="modules/Album/templates/db/js/jquery.js"></__script>
<__script__ type="text/javascript" src="modules/Album/templates/db/js/thickbox.js"></__script>
Re: Thickbox not working in Album
Posted: Fri Sep 22, 2006 1:17 pm
by Russ
To be honest I load them in my main tempalte and use it for other no-album stuff as well. So this seems like a good idea.
Russ
Re: Thickbox not working in Album
Posted: Fri Sep 22, 2006 3:35 pm
by MayDay
This is what I have found:
1. In Content>>Photo Albums in the Templates tab and edit the Thickbox template:
{* Include JS files. You can move this to the head of your page template if you want *}
{* Album List *}
{if !$album}
{foreach from=$albums item=album}
link}">
thumbnail}" alt="{$album->name}" title="{$album->name} - {$album->comment}" />
{$album->name}
({$album->picturecount} images)
{$album->comment}
{/foreach}
{else}
{* Photo List *}
{$album->name}
{$album->comment}
Click on a thumbnail to view a larger image. Click on the larger image, to close it. {if $returnlink}Return to the album index page{/if}
{if $pagecount>1}
<<
{if $link.page.previous}< {/if}
page {$pagenumber}/{$pagecount}
{if $link.page.next} >{/if}
>>
{/if}
{foreach from=$pictures item=picturesrow}
{foreach from=$picturesrow item=onepicture}
picture}" class="thickbox" title="{$onepicture->name} - {$onepicture->comment}"> thumbnail}" alt="{$onepicture->name} - {$onepicture->comment}" title="{$onepicture->name} - {$onepicture->comment}" />
{if ($onepicture->number==$picturenumber and !$picture)}{assign var=picture value=$onepicture}{/if}
{/foreach}
{/foreach}
{if $picturecount==0}No image{/if}
{/if}
{if $picture->id>0}
{/if}
So the 2 js references are there and the paths are correct. I have the photo albums set to the Thickbox template. BUT, when I look at the page source of the published page, they are not.
2. I added the js lines of code to the page template and confirmed they were there in the published page source, BUT the effect still does not work in Firefox on a Mac. Others pages do work ie.
http://jquery.com/demo/thickbox/

??
Re: Thickbox not working in Album
Posted: Fri Sep 22, 2006 4:08 pm
by Dr.CSS
It works here...
http://www.multiintech.com/CMSMSDemo/admin/login.php
login:
Name: adman
Password: adman
Re: Thickbox not working in Album
Posted: Sat Sep 23, 2006 7:02 pm
by Russ
Which version of Thickbox are you using?
Russ