Ignore:
Timestamp:
Sep 9, 2012, 4:36:02 PM (8 years ago)
Author:
flop25
Message:

adding a new option : restrict heigth by using the 'thumbnail width' parameter
auto managment of pano photos : set pano on three columns
Thx to JJF and his work on White S&C
ToDo : medium pano on 2 columns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/template/thumbnails.tpl

    r17740 r17828  
    33{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
    44{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
     5{define_derivative name='derivative_stripped_black_bloc_wide' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width height=9999 crop=false}
     6{define_derivative name='derivative_stripped_black_bloc_vert' width=$stripped_black_bloc.thumbnail_width height=$stripped_black_bloc.thumbnail_width crop=false}
     7{define_derivative name='derivative_stripped_black_bloc_big_vert' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width crop=false}
    58{if !empty($thumbnails)}
    69  {foreach from=$thumbnails item=thumbnail}
    7     {if $thumbnail.TN_CLASS=="bloc"}
    8       {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
     10   {assign var=triplehigh value=$thumbnail.height+$thumbnail.height+$thumbnail.height}
     11   {if ($thumbnail.width > $triplehigh) }
     12    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $thumbnail.src_image)}
     13    {assign var='size' value=$derivative->get_size()}
     14  <div class="bloc bloc_wide">
     15    <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
     16    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
     17    </a>
     18    {if $SHOW_THUMBNAIL_CAPTION }
     19    <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
     20    {/if}
     21  </div>
     22  {else}
     23    {if (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.portrait_limitation=="yes")}
     24      {if $thumbnail.TN_CLASS=="bloc"}
     25        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $thumbnail.src_image)}
     26      {else}
     27        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)}
     28      {/if}
    929    {else}
    10       {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
    11     {/if}
    12     {assign var='size' value=$derivative->get_size()}
    13 <div class="{$thumbnail.TN_CLASS}">
    14   <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
     30      {if $thumbnail.TN_CLASS=="bloc"}
     31       {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
     32      {else}
     33       {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
     34      {/if}
     35  {/if}
     36     {assign var='size' value=$derivative->get_size()}
     37     <div class="{$thumbnail.TN_CLASS}">
     38<a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
    1539    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
    16   </a>
    17   {if $SHOW_THUMBNAIL_CAPTION }
     40    </a>
     41          {if $SHOW_THUMBNAIL_CAPTION }
    1842  <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
    1943  {/if}
    20 </div>
     44  </div>
     45   {/if}
    2146  {/foreach}
    2247{/if}
Note: See TracChangeset for help on using the changeset viewer.