Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Sun Sep 07, 2008 2:22 am
I'm using the Thickbox template for Album. I'd like my albums to line up horizontally across the page - not vertically as they are now:
http://www.redkitecreative.com/projects/naww/index.php?page=gallery
I tried making the ul display as 'inline' but that didn't work. I see that each album on this page is in its own ul set, and I'm not sure why that's happening - it looks to me like this code from Thickbox.tpl is set to use only one ul set and repeat the li instructions for each album found.
Code: Select all
{* Album List *}
{if !$album}
<ul class="albumlist">
{foreach from=$albums item=album}
<li class="thumb">
<a href="{$album->link}">
<img src="{$album->thumbnail}" alt="{$album->name|escape:'html'}" title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}" /></a>
<p class="albumname">{$album->name}<br />
<span class="albumpicturecount">({$album->picturecount} images)</span><br />
<span class="albumcomment">{$album->comment}</span></p>
</li>
{/foreach}
</ul>
Can someone help?
Greg
Power Poster
Posts: 598 Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada
Post
by Greg » Sun Sep 07, 2008 1:57 pm
The template and your css look correct. Looks like you are calling the module twice in your page, each call to a different album.
To show all albums on a page, just put this code in your page content:
{cms_module module='album'}
Greg
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Sun Sep 07, 2008 2:32 pm
This is all I have on that page:
NAWW Gallery
{cms_module module='album'}
I have no idea why it's calling it twice...
Greg
Power Poster
Posts: 598 Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada
Post
by Greg » Sun Sep 07, 2008 4:06 pm
Strange
Does your template have just the code you have listed or all of the following?
{* 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}" rel="{$album->name}" 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}
Greg
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Mon Sep 08, 2008 12:50 am
The template for Thickbox.tpl has all that - I just meant in the page itself, the only thing I've added is the H1 tag and the single call to Album.
Russ
Power Poster
Posts: 813 Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England
Post
by Russ » Mon Sep 08, 2008 8:30 am
It is being loaded twice? I'd also move the album js for this style out of the album template and into the header of the page with the album. It works better.
You don't need to have the Album declaration in tags!
{cms_module module='album'}
The template code looks fine if a little old.
Russ
Dr.CSS
Moderator
Posts: 12711 Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona
Post
by Dr.CSS » Mon Sep 08, 2008 9:25 am
You sure it's not called in the template and the page, because something is calling it twice, and take the s out it throws warnings...
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Mon Sep 08, 2008 1:52 pm
I'll check this and see - and report back. Thanks.
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Mon Sep 08, 2008 9:28 pm
I took the tags out of the Album declaration in the content of the page - I only have one Album declaration there.
Here's the full content of Thickbox.tpl:
Code: Select all
{* Include JS files. You can move this to the head of your page template if you want *}
<!--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>
{* Album List *}
{if !$album}
<ul class="albumlist">
{foreach from=$albums item=album}
<li class="thumb">
<a href="{$album->link}">
<img src="{$album->thumbnail}" alt="{$album->name|escape:'html'}" title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}" /></a>
<p class="albumname">{$album->name}<br />
<span class="albumpicturecount">({$album->picturecount} images)</span>
<span class="albumcomment">{$album->comment}</span></p>
</li>
{/foreach}
</ul>
{else}
{* Photo List *}
<h2>{$album->name}</h2>
{$album->comment}<br />
<p class="instructiontext">Click on a thumbnail to view a larger image. Click on the larger image to close it.<br>{if $returnlink}<a href="{$returnlink}">Return to the main Gallery page</a>.{/if}</p>
{if $pagecount>1}
<p class="albumnav">
<a href="{$link.page.first}" title="first page"><< </a>
{if $link.page.previous}<a href="{$link.page.previous}" title="previous page">< </a>{/if}
page {$pagenumber}/{$pagecount}
{if $link.page.next}<a href="{$link.page.next}" title="next page"> ></a>{/if}
<a href="{$link.page.last}" title="last page"> >></a>
</p>
{/if}
<ul class="picturelist">
{foreach from=$pictures item=picturesrow}
{foreach from=$picturesrow item=onepicture}
<li class="thumb"><a href="{$onepicture->picture}" class="thickbox" title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}"> <img src="{$onepicture->thumbnail}" alt="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" /></a>
</li>
{if ($onepicture->number==$picturenumber and !$picture)}{assign var=picture value=$onepicture}{/if}
{/foreach}
{/foreach}
</ul>
{if $picturecount==0}No image{/if}
{/if}
{if $picture->id>0}
{/if}
<div style="clear:both"></div>
Dr.CSS
Moderator
Posts: 12711 Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona
Post
by Dr.CSS » Mon Sep 08, 2008 10:20 pm
I meant in the template you use for that page, the album template only effects the album itself...
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Mon Sep 08, 2008 10:46 pm
Oh - sorry. No, it is not being called at any point in the template for the page, it's only present in the content for that page and only appears once there.
Russ
Power Poster
Posts: 813 Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England
Post
by Russ » Tue Sep 09, 2008 7:19 am
Very curious, what version of Album and CMSMS are you on?
Dr.CSS
Moderator
Posts: 12711 Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona
Post
by Dr.CSS » Tue Sep 09, 2008 7:56 am
You aren't by chance using a Content Type of album that came with older ver. of cmsms?...
kanjigirl
Forum Members
Posts: 52 Joined: Fri Aug 01, 2008 11:23 pm
Post
by kanjigirl » Tue Sep 09, 2008 2:38 pm
Not that I know of - this is my first time using CMSms and I downloaded the Album files a few weeks ago.