Ignore:
Timestamp:
Apr 4, 2012, 5:47:23 PM (12 years ago)
Author:
flop25
Message:

updated for 2.4 :
-deleted timthumb
-deleted config for auto-generation

features added :
-representative thumbs can be big : always, as the "Every x thumb" config or never

bug corrected :
-big thumbs didn't have rounded corners

Translations uk_UA needed for new keys

Location:
extensions/stripped_black_bloc/template
Files:
2 edited

Legend:

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

    r11709 r13894  
    1   {foreach from=$category_thumbnails item=cat}
    2         <div class="bloc album">
    3                         <a href="{$cat.URL}" style="background: url({$cat.TN_SRC}) no-repeat scroll center center transparent; height: {$cat.TN_HEIGHT}px; width: {$cat.TN_WIDTH}px; opacity: 0.75;" >
     1{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
     2{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
     3{foreach from=$category_thumbnails item=cat}
     4  {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
     5    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
     6  {elseif $stripped_black_bloc.catthumb=="all"}
     7    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
     8  {else}
     9    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
     10  {/if}
     11  {assign var='size' value=$derivative->get_size()}
     12        <div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} album">
     13                        <a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" >
    414                                {$cat.NAME}
    515                        </a>
  • extensions/stripped_black_bloc/template/thumbnails.tpl

    r12048 r13894  
     1{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
     2{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
    13{if !empty($thumbnails)}
    24  {foreach from=$thumbnails item=thumbnail}
    3   <div class="{$thumbnail.TN_CLASS}">
    4         <a href="{$thumbnail.URL}" style="background: url({$thumbnail.TN_SRC}) no-repeat scroll center center transparent; height: {$thumbnail.TN_HEIGHT}px; width: {$thumbnail.TN_WIDTH}px; opacity: 0.75;" >
    5           {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
    6         </a>
    7         <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
    8         </div>
     5    {if $thumbnail.TN_CLASS=="bloc"}
     6      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
     7    {else}
     8      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
     9    {/if}
     10    {assign var='size' value=$derivative->get_size()}
     11 <div class="{$thumbnail.TN_CLASS}">
     12    <a href="{$thumbnail.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" >
     13      {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
     14    </a>
     15    <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
     16  </div>
    917  {/foreach}
    1018{/if}
Note: See TracChangeset for help on using the changeset viewer.