Re: [SMARTY] Smarty engine help

Chris Arnold <[email protected]> Tue, 14 Aug 2007 08:44:00 -0400 (EDT)
Newsgroups gmane.comp.php.smarty.general
Message-ID <25931029.21187095440462.JavaMail.root@mail>
So I guess you'll need to find the template that is used for the individual
photo display page, and either modify your thumbnail listing template or the
lightbox script.

I think i have found that file. Here it is:
{if !empty($theme.imageViews)}
{assign var="image" value=$theme.imageViews[$theme.imageViewsIndex]}
{/if}

<h2>{$theme.item.title|markup}</h2>

{if !empty($theme.imageViews)}
  {capture name="fallback"}
    <a href="{g->url arg1="view=core.DownloadItem" arg2="itemId=`$theme.item.id`"
		     forceFullUrl=true forceSessionId=true}">
      {g->text text="Download %s" arg1=$theme.sourceImage.itemTypeName.1}
    </a>
  {/capture}

  {if ($image.viewInline)}
    <div class="gallery-photo">
      {if $theme.params.enableImageMap}{strip}
	{if isset($theme.navigator.back)}
	  <a href="{g->url params=$theme.navigator.back.urlParams}"
	     id="prevArrow" style="position: absolute; margin: 30px 0 0 30px; visibility: hidden"
	     onmouseover="document.getElementById('prevArrow').style.visibility='visible'"
	     onmouseout="document.getElementById('prevArrow').style.visibility='hidden'"
	  ><img src="{g->theme url="images/arrow-left.gif"}" alt="" width="20" height="17"
	  /></a>{/if}
	{g->image item=$theme.item image=$image class="gallery-photo"
	    fallback=$smarty.capture.fallback usemap=#prevnext}
	{if isset($theme.navigator.next)}
	  <a href="{g->url params=$theme.navigator.next.urlParams}"
	     id="nextArrow" style="position:absolute; margin: 30px 0 0 -50px; visibility: hidden"
	     onmouseover="document.getElementById('nextArrow').style.visibility='visible'"
	     onmouseout="document.getElementById('nextArrow').style.visibility='hidden'"
	   ><img src="{g->theme url="images/arrow-right.gif"}" alt="" width="20" height="17"
	   /></a>{/if}
      {/strip}{else}
        {g->image item=$theme.item image=$image class="gallery-photo"
	 fallback=$smarty.capture.fallback}
      {/if}
    </div>
  {else}
    {$smarty.capture.fallback}
  {/if}
{else}
  {g->text text="There is nothing to view for this item."}
{/if}

{* Navigation image map *}
{if $theme.params.enableImageMap && !empty($image.width) && !empty($image.height)}
<map id="prevnext" name="prevnext">
{if isset($theme.navigator.back)}
  <area shape="rect" coords="0,0,{math equation="round(x/2-1)" x=$image.width},{$image.height}"
   href="{g->url params=$theme.navigator.back.urlParams}"
   alt="{$theme.item.title|markup:strip|default:$theme.item.pathComponent}"
   onmouseover="document.getElementById('prevArrow').style.visibility='visible'"
   onmouseout="document.getElementById('prevArrow').style.visibility='hidden'"/>
{/if}
{if isset($theme.navigator.next)}
  <area shape="rect" coords="{math equation="round(x/2)"
				   x=$image.width},0,{$image.width},{$image.height}"
   href="{g->url params=$theme.navigator.next.urlParams}"
   alt="{$theme.item.title|markup:strip|default:$theme.item.pathComponent}"
   onmouseover="document.getElementById('nextArrow').style.visibility='visible'"
   onmouseout="document.getElementById('nextArrow').style.visibility='hidden'"/>
{/if}
</map>
{/if}


<br style="clear: both;" />


{* Navigator *}
{if !empty($theme.navigator)}
  {g->callback type="core.LoadPeers" item=$theme.item windowSize=1}
  {g->block type="core.Navigator" navigator=$theme.navigator prefix="&laquo; " suffix=" &raquo;"
      currentItem=$block.core.LoadPeers.thisPeerIndex totalItems=$block.core.LoadPeers.peerCount}
{/if}

<hr/>

{* Description *}
{if !empty($theme.item.description) && ($theme.item.description != $theme.item.title)}
  <p>{$theme.item.description|markup}</p>
{/if}

{* Download *}
{if !empty($theme.sourceImage) &&

Not sure if i should be looking for <img src> or href tags?

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php