Display: inline for albums in Album

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
kanjigirl
Forum Members
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Display: inline for albums in Album

Post by kanjigirl »

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
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

Re: Display: inline for albums in Album

Post by Greg »

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
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Re: Display: inline for albums in Album

Post by kanjigirl »

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
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

Re: Display: inline for albums in Album

Post by Greg »

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
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Re: Display: inline for albums in Album

Post by kanjigirl »

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
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Display: inline for albums in Album

Post by Russ »

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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Display: inline for albums in Album

Post by Dr.CSS »

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
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Re: Display: inline for albums in Album

Post by kanjigirl »

I'll check this and see - and report back. Thanks.
kanjigirl
Forum Members
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Re: Display: inline for albums in Album

Post by kanjigirl »

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> 
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Display: inline for albums in Album

Post by Dr.CSS »

I meant in the template you use for that page, the album template only effects the album itself...
kanjigirl
Forum Members
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Re: Display: inline for albums in Album

Post by kanjigirl »

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
Power Poster
Posts: 813
Joined: Fri Nov 25, 2005 5:02 pm
Location: North West England

Re: Display: inline for albums in Album

Post by Russ »

Very curious, what version of Album and CMSMS are you on?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Display: inline for albums in Album

Post by Dr.CSS »

You aren't by chance using a Content Type of album that came with older ver. of cmsms?...
kanjigirl
Forum Members
Forum Members
Posts: 52
Joined: Fri Aug 01, 2008 11:23 pm

Re: Display: inline for albums in Album

Post by kanjigirl »

Not that I know of - this is my first time using CMSms and I downloaded the Album files a few weeks ago.
Post Reply

Return to “Modules/Add-Ons”