Ignore:
Timestamp:
06/06/13 14:29:14 (7 years ago)
Author:
plg
Message:

add 2 configuration settings to let the webmaster decide of errors margins.

(margins can be negative)

bug fixed: do not hide the check sign in front of "Automatic" option in size
list when the user selects another size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/automatic_size/main.inc.php

    r23033 r23074  
    6666      if ($size) 
    6767      { 
    68         // echo $type.' => '.$size[0].' x '.$size[1].'<br>'; 
    6968        if ($size[0] <= $available_size[0] and $size[1] <= $available_size[1]) 
    7069        { 
     
    128127      'ALT_IMG' => $element_info['file'], 
    129128      'COOKIE_PATH' => cookie_path(), 
     129      'asize_width_margin' => isset($conf['automatic_size_width_margin']) ? $conf['automatic_size_width_margin'] : 12, 
     130      'asize_height_margin' => isset($conf['automatic_size_height_margin']) ? $conf['automatic_size_height_margin'] : 40, 
    130131      ) 
    131132    ); 
     
    141142  $pattern = '#\{foreach from=\$current\.unique_derivatives#'; 
    142143  $replacement = ' 
    143 <span class="switchCheck" id="aSizeChecked"{if !$is_automatic_size} style="visibility:hidden"{/if}>&#x2714; </span> <a id="aSize" href="{$ASIZE_URL}" title="{$ASIZE_TITLE}" data-checked="{if $is_automatic_size}yes{else}no{/if}">{\'Automatic\'|@translate}</a> 
     144<span id="aSizeChecked"{if !$is_automatic_size} style="visibility:hidden"{/if}>&#x2714; </span> <a id="aSize" href="{$ASIZE_URL}" title="{$ASIZE_TITLE}" data-checked="{if $is_automatic_size}yes{else}no{/if}">{\'Automatic\'|@translate}</a> 
    144145<br><br> 
    145146{foreach from=$current.unique_derivatives'; 
Note: See TracChangeset for help on using the changeset viewer.