Changeset 29593 for extensions


Ignore:
Timestamp:
Sep 17, 2014, 4:19:47 PM (10 years ago)
Author:
JanisV
Message:

Added new parameter for thumbnails height

Location:
extensions/Fotorama
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/admin.php

    r29384 r29593  
    2525  if (isset($_POST['fullscreen_nav']))
    2626    $conf['Fotorama']['fullscreen_nav'] = $_POST['fullscreen_nav'];
     27  if (isset($_POST['thumbheight']))
     28    $conf['Fotorama']['thumbheight'] = $_POST['thumbheight'];
    2729
    2830  conf_update_param('Fotorama', serialize($conf['Fotorama']));
  • extensions/Fotorama/language/ru_RU/plugin.lang.php

    r29384 r29593  
    1313$lang['Only fullscreen mode'] = 'Только полноэкранный режим';
    1414$lang['Show caption with image title'] = 'Показывать заголовок с названием изображения';
     15$lang['Tumbnail height (when present)'] = 'Высота миниатюр (когда присутствуют)';
    1516
    1617?>
  • extensions/Fotorama/main.inc.php

    r29399 r29593  
    3131
    3232  $conf['Fotorama'] = unserialize($conf['Fotorama']);
     33
     34  // Upgrade params from 2.7.j
     35  if (!isset($conf['Fotorama']['thumbheight'])) {
     36        $conf['Fotorama']['thumbheight'] = 64;
     37  }
    3338
    3439  add_event_handler('loc_end_picture', 'Fotorama_end_picture');
     
    8792        $row['derivative_big'] = $row['src_image'];
    8893      }
    89       $row['derivative_thumb'] = DerivativeImage::get_one(IMG_SQUARE, $row['src_image']);
     94//      $row['derivative_thumb'] = DerivativeImage::get_one(IMG_SQUARE, $row['src_image']);
     95      $thumb_params = ImageStdParams::get_custom($conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight'], 1, $conf['Fotorama']['thumbheight'], $conf['Fotorama']['thumbheight']);
     96      $row['derivative_thumb'] = new DerivativeImage($thumb_params, $row['src_image']);;
    9097      if ($row['derivative_thumb'] == null)
    9198      {
  • extensions/Fotorama/maintain.inc.php

    r29384 r29593  
    1919    'only_fullscreen' => false,
    2020    'enable_caption' => false,
     21    'thumbheight' => 64,
    2122  );
    2223
  • extensions/Fotorama/template/admin.tpl

    r29387 r29593  
    4646  </li>
    4747  <li>
    48     <label for="nav">
    49       <b>{'Navigation style'|@translate}</b>
     48    <label for="fullscreen_nav">
     49      <b>{'Fullscreen navigation style'|@translate}</b>
    5050    </label>
    51     <select class="categoryDropDown" id="nav" name="nav">
    52       <option value="false"{if $Fotorama.nav == 'false'} selected{/if}>{'false'|@translate}</option>
    53       <option value="dots"{if $Fotorama.nav == 'dots'} selected{/if}>{'dots'|@translate}</option>
    54       <option value="thumbs"{if $Fotorama.nav == 'thumbs'} selected{/if}>{'thumbs'|@translate}</option>
     51    <select class="categoryDropDown" id="fullscreen_nav" name="fullscreen_nav">
     52      <option value="false"{if $Fotorama.fullscreen_nav == 'false'} selected{/if}>{'false'|@translate}</option>
     53      <option value="dots"{if $Fotorama.fullscreen_nav == 'dots'} selected{/if}>{'dots'|@translate}</option>
     54      <option value="thumbs"{if $Fotorama.fullscreen_nav == 'thumbs'} selected{/if}>{'thumbs'|@translate}</option>
    5555    </select>
    5656  </li>
     
    6464      <option value="thumbs"{if $Fotorama.fullscreen_nav == 'thumbs'} selected{/if}>{'thumbs'|@translate}</option>
    6565    </select>
     66  </li>
     67  <li>
     68    <label for="thumbheight">
     69      <b>{'Tumbnail height (when present)'|@translate}</b>
     70    </label>
     71    <input type="number" size="2" maxlength="3" name="thumbheight" value="{$Fotorama.thumbheight}" min="5" max="300" style="width: 50px;">&nbsp;px
    6672  </li>
    6773  <li>
  • extensions/Fotorama/template/slideshow.tpl

    r29592 r29593  
    3030        data-allowfullscreen="{$Fotorama['allowfullscreen']}" data-autoplay="{if $Fotorama['autoplay']}true{else}false{/if}"
    3131        data-transition="{$Fotorama['transition']}" data-stopautoplayontouch="{if $Fotorama['stopautoplayontouch']}true{else}false{/if}"
    32         data-loop="{if $Fotorama['loop']}true{else}false{/if}" data-captions="false">
     32        data-loop="{if $Fotorama['loop']}true{else}false{/if}" data-captions="false" data-thumbheight="{$Fotorama['thumbheight']}" data-thumbwidth="{$Fotorama['thumbheight']}">
    3333      {foreach from=$items item=thumbnail}
    3434        <a href="{$thumbnail['derivative']->get_url()}"
Note: See TracChangeset for help on using the changeset viewer.