Changeset 27155


Ignore:
Timestamp:
Feb 4, 2014, 10:23:58 AM (6 years ago)
Author:
JanisV
Message:

Added navigation
Added translation

Location:
extensions/Fotorama
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/admin.php

    r27148 r27155  
    1919  if (isset($_POST['transition']))
    2020    $conf['Fotorama']['transition'] = $_POST['transition'];
     21  if (isset($_POST['nav']))
     22    $conf['Fotorama']['nav'] = $_POST['nav'];
    2123
    2224  conf_update_param('Fotorama', serialize($conf['Fotorama']));
  • extensions/Fotorama/language/en_UK/plugin.lang.php

    r27034 r27155  
    22
    33$lang['stop the slideshow'] = 'stop the slideshow';
     4$lang['Allows fullscreen'] = 'Allows fullscreen';
     5$lang['How to fit an image'] = 'How to fit an image';
     6$lang['What transition to use'] = 'What transition to use';
     7$lang['Navigation style'] = 'Navigation style';
     8$lang['Enables shadows'] = 'Enables shadows';
     9$lang['Enables autoplay'] = 'Enables autoplay';
     10$lang['Stops slideshow at any user action with the fotorama'] = 'Stops slideshow at any user action with the fotorama';
     11$lang['Enables loop'] = 'Enables loop';
    412
    513?>
  • extensions/Fotorama/language/ru_RU/plugin.lang.php

    r27034 r27155  
    22
    33$lang['stop the slideshow'] = 'остановить слайдшоу';
     4$lang['Allows fullscreen'] = 'Разворачивать на весь экран';
     5$lang['How to fit an image'] = 'Как уместить изображение';
     6$lang['What transition to use'] = 'Используемыйстиль перехода';
     7$lang['Navigation style'] = 'Стиль навигации';
     8$lang['Enables shadows'] = 'Включить тени';
     9$lang['Enables autoplay'] = 'Включить автозапуск';
     10$lang['Stops slideshow at any user action with the fotorama'] = 'Останавливать слайдшоу при любом действии пользователя с Fotorama';
     11$lang['Enables loop'] = 'Показывать в цикле';
    412
    513?>
  • extensions/Fotorama/main.inc.php

    r27148 r27155  
    8484      if ($row['derivative_big'] == null)
    8585      {
    86         $row['derivative'] = $row['src_image'];
     86        $row['derivative_big'] = $row['src_image'];
     87      }
     88      $row['derivative_thumb'] = DerivativeImage::get_one(IMG_SQUARE, $row['src_image']);
     89      if ($row['derivative_thumb'] == null)
     90      {
     91        $row['derivative_thumb'] = $row['src_image'];
    8792      }
    8893
  • extensions/Fotorama/maintain.inc.php

    r27148 r27155  
    1515    'stopautoplayontouch' => false,
    1616    'loop' => true,
     17    'nav' => 'false',
    1718  );
    1819
  • extensions/Fotorama/template/admin.tpl

    r27148 r27155  
    1010  <li>
    1111    <label for="allowfullscreen">
    12       <b>{'allowfullscreen'|@translate}</b>
     12      <b>{'Allows fullscreen'|@translate}</b>
    1313    </label>
    1414    <select class="categoryDropDown" id="allowfullscreen" name="allowfullscreen">
     
    2020  <li>
    2121    <label for="fit">
    22       <b>{'fit'|@translate}</b>
     22      <b>{'How to fit an image'|@translate}</b>
    2323    </label>
    2424    <select class="categoryDropDown" id="fit" name="fit">
     
    3131  <li>
    3232    <label for="transition">
    33       <b>{'transition'|@translate}</b>
     33      <b>{'What transition to use'|@translate}</b>
    3434    </label>
    3535    <select class="categoryDropDown" id="transition" name="transition">
     
    4040  </li>
    4141  <li>
     42    <label for="nav">
     43      <b>{'Navigation style'|@translate}</b>
     44    </label>
     45    <select class="categoryDropDown" id="nav" name="nav">
     46      <option value="false"{if $Fotorama.nav == 'false'} selected{/if}>{'false'|@translate}</option>
     47      <option value="dots"{if $Fotorama.nav == 'dots'} selected{/if}>{'dots'|@translate}</option>
     48      <option value="thumbs"{if $Fotorama.nav == 'thumbs'} selected{/if}>{'thumbs'|@translate}</option>
     49    </select>
     50  </li>
     51  <li>
    4252    <input type="checkbox" id="shadows" name="shadows"{if $Fotorama.shadows} checked="checked"{/if}>
    4353    <label for="shadows">
    44       <b>{'shadows'|@translate}</b>
     54      <b>{'Enables shadows'|@translate}</b>
    4555    </label>
    4656  </li>
     
    4858    <input type="checkbox" id="autoplay" name="autoplay"{if $Fotorama.autoplay} checked="checked"{/if}>
    4959    <label for="autoplay">
    50       <b>{'autoplay'|@translate}</b>
     60      <b>{'Enables autoplay'|@translate}</b>
    5161    </label>
    5262  </li>
     
    5464    <input type="checkbox" id="stopautoplayontouch" name="stopautoplayontouch"{if $Fotorama.stopautoplayontouch} checked="checked"{/if}>
    5565    <label for="stopautoplayontouch">
    56       <b>{'stopautoplayontouch'|@translate}</b>
     66      <b>{'Stops slideshow at any user action with the fotorama'|@translate}</b>
    5767    </label>
    5868  </li>
     
    6070    <input type="checkbox" id="loop" name="loop"{if $Fotorama.loop} checked="checked"{/if}>
    6171    <label for="loop">
    62       <b>{'loop'|@translate}</b>
     72      <b>{'Enables loop'|@translate}</b>
    6373    </label>
    6474  </li>
  • extensions/Fotorama/template/slideshow.tpl

    r27148 r27155  
    1818        <div id="content">
    1919        <div id="theImage">
    20       <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-fit="{$Fotorama['fit']}" data-auto="false"
    21         data-width="100%" data-maxheight="100%" data-minheight="200" data-height="{$item_height}" data-shadows="{$Fotorama['shadows']}"
    22         data-allowfullscreen="{$Fotorama['allowfullscreen']}" data-autoplay="{if $Fotorama['autoplay']}true{else}false{/if}" data-transition="{$Fotorama['transition']}"
    23         data-stopautoplayontouch="{$Fotorama['stopautoplayontouch']}" data-loop="{$Fotorama['stopautoplayontouch']}" data-nav=false>
     20      <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-auto="false"
     21        data-width="100%" data-maxheight="100%" data-minheight="200" data-height="{$item_height}"
     22        data-shadows="{$Fotorama['shadows']}" data-nav="{$Fotorama['nav']}" data-fit="{$Fotorama['fit']}"
     23        data-allowfullscreen="{$Fotorama['allowfullscreen']}" data-autoplay="{if $Fotorama['autoplay']}true{else}false{/if}"
     24        data-transition="{$Fotorama['transition']}" data-stopautoplayontouch="{$Fotorama['stopautoplayontouch']}"
     25        data-loop="{$Fotorama['stopautoplayontouch']}">
    2426      {foreach from=$items item=thumbnail}
    25         <a href="{$thumbnail['derivative']->get_url()}" data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-title="{$thumbnail['TITLE']}"></a>
     27        <a href="{$thumbnail['derivative']->get_url()}"
     28          data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-title="{$thumbnail['TITLE']}">
     29          {if $Fotorama['nav'] == 'thumbs'}<img src="{$thumbnail['derivative_thumb']->get_url()}">{/if}
     30        </a>
    2631      {/foreach}
    2732      </div>
Note: See TracChangeset for help on using the changeset viewer.