Changeset 29918


Ignore:
Timestamp:
Oct 7, 2014, 5:01:31 PM (10 years ago)
Author:
JanisV
Message:

Added info button

Location:
extensions/Fotorama
Files:
3 added
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/admin.php

    r29915 r29918  
    1919    'close_button' => isset($_POST['close_button']),
    2020    'resize' => isset($_POST['resize']),
     21    'info_button' => isset($_POST['info_button']),
    2122    );
    2223  if (isset($_POST['allowfullscreen']))
  • extensions/Fotorama/language/en_UK/plugin.lang.php

    r29916 r29918  
    2121$lang['Waiting time before loading a new image'] = 'Waiting time before loading a new picture';
    2222$lang['milliseconds'] = 'milliseconds';
     23$lang['Add image info button'] = 'Add image info button';
    2324
    2425?>
  • extensions/Fotorama/language/ru_RU/plugin.lang.php

    r29916 r29918  
    2121$lang['Waiting time before loading a new image'] = 'Ждать перед сменой изображения';
    2222$lang['milliseconds'] = 'миллисекунд';
     23$lang['Add image info button'] = 'Добавить кнопку информации об изображении';
    2324
    2425?>
  • extensions/Fotorama/main.inc.php

    r29917 r29918  
    5555  if (!isset($conf['Fotorama']['period'])) {
    5656        $conf['Fotorama']['period'] = 4000;
     57    $conf['Fotorama']['info_button'] = false;
    5758  }
    5859}
     
    6162{
    6263  global $template, $conf, $user, $page;
    63  
    64   if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()))
     64
     65  if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])))
    6566  {
    6667    $page['slideshow'] = true;
     
    8586    $template->assign('replace_picture', true);
    8687  }
    87 
     88 
    8889  if ($page['slideshow'] and $conf['light_slideshow'])
    8990  {
     
    184185  global $template, $conf, $page;
    185186
    186   if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()))
     187  if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])))
    187188  {
    188189    $page['slideshow'] = true;
  • extensions/Fotorama/maintain.inc.php

    r29915 r29918  
    2626    'resize' => false,
    2727    'period' => 4000,
     28    'info_button' => false,
    2829  );
    2930
  • extensions/Fotorama/template/admin.tpl

    r29916 r29918  
    3434    <label for="close_button">
    3535      <b>{'Add close button'|translate}</b>
     36    </label>
     37  </li>
     38  <li>
     39    <input type="checkbox" id="info_button" name="info_button"{if $Fotorama.info_button} checked="checked"{/if}>
     40    <label for="info_button">
     41      <b>{'Add image info button'|translate}</b>
    3642    </label>
    3743  </li>
  • extensions/Fotorama/template/close_button.css

    r29730 r29918  
    1414@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 2dppx) {
    1515  .fotorama__close-icon {
    16     background: url('plugins/Fotorama/fotorama/fotorama@2x.png') no-repeat scroll -64px 0;
     16    background: url('../fotorama/fotorama@2x.png') no-repeat scroll -64px 0;
    1717    background-size: 96px 160px;
    1818  }
  • extensions/Fotorama/template/fotorama-content.tpl

    r29915 r29918  
    44{if $Fotorama.close_button}
    55{combine_css path="plugins/Fotorama/template/close_button.css"}
     6{/if}
     7{if $Fotorama.info_button}
     8{combine_css path="plugins/Fotorama/template/info_button.css"}
    69{/if}
    710
     
    2528<a href="{$U_SLIDESHOW_STOP}" class="fotorama__close-icon"></a>
    2629{/if}
     30<a class="fotorama__info-icon"></a>
    2731
    2832{footer_script require='jquery'}
     
    4044                jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
    4145                {/if}
     46
     47                jQuery('a.fotorama__info-icon').attr('href', fotorama.activeFrame['url']+'&slidestop=');
    4248
    4349                jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']);
     
    116122  });
    117123  {/if}
     124  {if $Fotorama.info_button}
     125  jQuery('.fotorama').on('fotorama:ready', function (e, fotorama) {
     126    jQuery('.fotorama__info-icon').detach().insertAfter('.fotorama__fullscreen-icon');
     127  });
     128  {/if}
    118129 
    119130  {if $Fotorama.autoplay}
Note: See TracChangeset for help on using the changeset viewer.