Changeset 17858


Ignore:
Timestamp:
09/11/12 14:59:30 (7 years ago)
Author:
flop25
Message:

new value and name change of parameter : Display big thumbnails for landscape pictures (thumbnails.tpl&mainpage_categories.tpl)
all the parameters are applied to stuff thumbnails
mistake corrected in mainpage_categories.tpl

Location:
extensions/stripped_black_bloc
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/admin/admin.inc.php

    r17828 r17858  
    3333        $config_send['starting_to']=(isset($_POST['f_starting_to'])) ? $_POST['f_starting_to'] : 1; 
    3434        $config_send['catthumb']=(isset($_POST['f_catthumb'])) ? $_POST['f_catthumb'] : 'none'; 
    35         $config_send['portrait_limitation']=(isset($_POST['f_portrait_limitation'])) ? $_POST['f_portrait_limitation'] : 'none'; 
     35        $config_send['orientation_option']=(isset($_POST['f_orientation_option'])) ? $_POST['f_orientation_option'] : 'none'; 
    3636        conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config_send))); 
    3737 
  • extensions/stripped_black_bloc/admin/admin.tpl

    r17828 r17858  
    4545    <li> 
    4646      <br><br> 
    47       <label>{'About portrait pictures :'|@translate}</label> 
     47      <label>{'About portrait/landscape pictures :'|@translate}</label> 
    4848      <br><br> 
    4949     <label> 
    50         <input type="radio" name="f_portrait_limitation" id="portrait_limitation" value="none"  {if $options.portrait_limitation=="none"}checked{/if}> 
    51         &nbsp;{'No Maximum Height, the width is the one set above'|@translate}</label> 
     50        <input type="radio" name="f_orientation_option" id="orientation_option" value="none"  {if $options.orientation_option=="none"}checked{/if}> 
     51        &nbsp;{'No Maximum Height and the width is the one set above'|@translate}</label> 
    5252      <br> 
    5353      <label> 
    54         <input type="radio" name="f_portrait_limitation" id="portrait_limitation" value="yes" {if $options.portrait_limitation=="yes"}checked{/if}> 
     54        <input type="radio" name="f_orientation_option" id="orientation_option" value="max_heigth" {if $options.orientation_option=="max_heigth"}checked{/if}> 
    5555        &nbsp;{'Use the width parameter above as a maximum heigth'|@translate}</label> 
     56      <br> 
     57      <label> 
     58        <input type="radio" name="f_orientation_option" id="orientation_option" value="big_landscape" {if $options.orientation_option=="max_heigth"}checked{/if}> 
     59        &nbsp;{'Display big thumbnails for landscape pictures'|@translate}</label> 
    5660      <br> 
    5761    </li> 
  • extensions/stripped_black_bloc/admin/maintain.inc.php

    r17828 r17858  
    1414        'starting_to'                                           => 1, 
    1515  'catthumb'         => 'none', //none - same - all 
    16   'portrait_limitation'         => 'none' //none - yes 
     16  'orientation_option'         => 'none' //none - max_heigth - big_landscape 
    1717      ); 
    1818       
  • extensions/stripped_black_bloc/admin/upgrade.inc.php

    r17828 r17858  
    1414  'starting_to'           => 1, 
    1515  'catthumb'         => 'none', //none - same - all 
    16   'portrait_limitation'         => 'none' //none - yes 
     16  'orientation_option'         => 'none' //none - max_heigth -big_landscape 
    1717  ); 
    1818  $query = " 
     
    3232  'starting_to'           => (isset($conff['starting_to'])) ? $conff['starting_to'] :1, 
    3333  'catthumb'         => (isset($conff['catthumb'])) ? $conff['catthumb'] :'none', //none - same - all 
    34   'portrait_limitation'         => (isset($conff['portrait_limitation'])) ? $conff['portrait_limitation'] :'none' //none - yes 
     34  'orientation_option'         => (isset($conff['orientation_option'])) ? $conff['orientation_option'] :'none' //none - max_heigth -big_landscape 
    3535  ); 
    3636  conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config))); 
  • extensions/stripped_black_bloc/template/mainpage_categories.tpl

    r17845 r17858  
    1313    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)} 
    1414    {assign var=TN_CLASS value="twocol"} 
    15   {elseif $cat.representative.width < $cat.representative.height and $stripped_black_bloc.catthumb=="yes"} 
     15  {elseif $stripped_black_bloc.catthumb=="all"} 
     16    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)} 
     17    {assign var=TN_CLASS value="twocol"} 
     18  {elseif $cat.representative.width < $cat.representative.height and $stripped_black_bloc.orientation_option=="max_heigth"} 
    1619      {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"} 
    17         {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)} 
    18         {assign var=TN_CLASS value="twocol"} 
    19       {elseif $stripped_black_bloc.catthumb=="all"} 
    2020        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)} 
    2121        {assign var=TN_CLASS value="twocol"} 
     
    2424        {assign var=TN_CLASS value="onecol"} 
    2525      {/if} 
     26  {elseif $stripped_black_bloc.orientation_option=="big_landscape"} 
     27    {if (($cat.representative.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same") or $cat.representative.width > $cat.representative.height) and ($cat.representative.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width)} 
     28      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)} 
     29      {assign var=TN_CLASS value='twocol'} 
     30    {else} 
     31      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)} 
     32      {assign var=TN_CLASS value='onecol'} 
     33    {/if} 
    2634  {else} 
    2735    {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"} 
    2836      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)} 
    29       {assign var=TN_CLASS value="twocol"} 
    30     {elseif $stripped_black_bloc.catthumb=="all"} 
    31       {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}{assign var=TN_CLASS value="twocol"} 
    3237      {assign var=TN_CLASS value="twocol"} 
    3338    {else} 
  • extensions/stripped_black_bloc/template/stuffs_thumbnails.tpl

    r17843 r17858  
    55{if !empty($thumbnails)} 
    66  {foreach from=$thumbnails item=thumbnail} 
    7     {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 
    8     {assign var='size' value=$derivative->get_size()} 
    9 <div class="bloc {$thumbnail.TN_CLASS}"> 
     7    {assign var=triplehigh value=$thumbnail.height+$thumbnail.height+$thumbnail.height} 
     8    {if ($thumbnail.width > $triplehigh) and ($thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)} 
     9      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $thumbnail.src_image)} 
     10      {assign var=TN_CLASS value='threecol'} 
     11    {elseif ($thumbnail.width > $triplehigh) and ($thumbnail.width>$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)} 
     12      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 
     13      {assign var=TN_CLASS value='twocol'} 
     14    {elseif (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.orientation_option=="max_heigth")} 
     15      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width} 
     16        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)} 
     17        {assign var=TN_CLASS value='twocol'} 
     18      {else} 
     19        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $thumbnail.src_image)} 
     20        {assign var=TN_CLASS value='onecol'} 
     21      {/if} 
     22    {elseif $stripped_black_bloc.orientation_option=="big_landscape"} 
     23      {if ($thumbnail.TN_CLASS=="twocol" or $thumbnail.width > $thumbnail.height) and ($thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width)} 
     24        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 
     25        {assign var=TN_CLASS value='twocol'} 
     26      {else} 
     27        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 
     28        {assign var=TN_CLASS value='onecol'} 
     29      {/if} 
     30    {else} 
     31      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width} 
     32        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 
     33        {assign var=TN_CLASS value='twocol'} 
     34      {else} 
     35        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 
     36        {assign var=TN_CLASS value='onecol'} 
     37      {/if} 
     38    {/if} 
     39     {assign var='size' value=$derivative->get_size()} 
     40<div class="bloc {$TN_CLASS}"> 
    1041  <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}> 
    1142    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if} 
  • extensions/stripped_black_bloc/template/thumbnails.tpl

    r17844 r17858  
    1515      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 
    1616      {assign var=TN_CLASS value='twocol'} 
    17     {elseif (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.portrait_limitation=="yes")} 
     17    {elseif (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.orientation_option=="max_heigth")} 
    1818      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width} 
    1919        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)} 
     
    2121      {else} 
    2222        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $thumbnail.src_image)} 
     23        {assign var=TN_CLASS value='onecol'} 
     24      {/if} 
     25    {elseif $stripped_black_bloc.orientation_option=="big_landscape"} 
     26      {if ($thumbnail.TN_CLASS=="twocol" or $thumbnail.width > $thumbnail.height) and ($thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width)} 
     27        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)} 
     28        {assign var=TN_CLASS value='twocol'} 
     29      {else} 
     30        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)} 
    2331        {assign var=TN_CLASS value='onecol'} 
    2432      {/if} 
Note: See TracChangeset for help on using the changeset viewer.