Page 1 of 1

<SOLVED> Album - Hyphen after picture title

Posted: Wed Oct 15, 2008 12:22 pm
by luctay
I am nearly finished on a gallery using Album for an artists studio I belong to but I have one little niggle - a hyphen appears after the title in the pop-up picture and I can't seem to find where is coming from on the template.  I don't need it as I am not entering anything in the comment field - it just looks a little odd.  I am using Album 0.9.3 with the default template.

The url for the gallery is: http://www.redherringstudios.org/index. ... lerytest02

The code in the template is:

{if $pictureid !=0}

{* Big Picture *}

{$picture->name}

   {$picture->comment}     


{if $link.picture.previous}< Previous{/if}
( Picture {$picturenumber}/{$picturecount} )
{if $link.picture.next}Next >{/if}

picture}" alt="{$picture->name|escape:'html'} -  {$picture->comment|escape:'html'}"  title="{$picture->name|escape:'html'} -  {$picture->comment|escape:'html'}" />

{/if}

{* Album List *}
{if !$album}

{foreach from=$albums item=album}

link}">
thumbnail}" alt="{$album->name|escape:'html'}" title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}"{$album->autothumbnailsize} />

{$album->name}

({$album->picturecount} images)

{$album->comment}

{/foreach}


{else}

{* Photo List
Click on a thumbnail to view a larger image. Click anywhere on the larger image or use the 'Esc' (escape) key to close it. Use the 'next' and 'previous' links or the '<' or '>' (more than/less than keys) to navigate the larger images. {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}
{$album->name}
{$album->comment}*}

{foreach from=$pictures item=picturesrow}
    {foreach from=$picturesrow item=onepicture}
    picture}" rel="{$album->name|escape:'html'}" class="thickbox" title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}"> thumbnail}" alt="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}" title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}"{$onepicture->autothumbnailsize} />
       

      {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}



If anyone has any such suggestions I would be very grateful.

Lucian

Re: Album - Hyphen after picture title

Posted: Wed Oct 15, 2008 2:06 pm
by Russ
Mmm luctay, you could searching for ' - ' or indeed 'title' in the template?

{* Big Picture *}
title="{$picture->name|escape:'html'} -  {$picture->comment|escape:'html'}"

{* Album List *}

title="{$album->name|escape:'html'} - {$album->comment|escape:'html'}"

{* Picture List..
title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}"

A better way maybe to change the code to check for empty comments and then add or not the ' - '?
The Smarty manual is your friend...
http://www.smarty.net/docs.php

Re: Album - Hyphen after picture title

Posted: Wed Oct 15, 2008 10:26 pm
by luctay
Thanks for your comment Russ - it prompted me to mess with the template again - I had tried to removing the hyphen from

{* Big Picture *}
title="{$picture->name|escape:'html'} -  {$picture->comment|escape:'html'}"

(it seemed the obvious choice)

The solution was to remove it from

{* Picture List..
title="{$onepicture->name|escape:'html'} - {$onepicture->comment|escape:'html'}"

(slightly less obvious)

So problem solved!

Lucian