Changeset 29615
- Timestamp:
- Sep 18, 2014, 12:22:53 PM (10 years ago)
- Location:
- extensions/Fotorama
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Fotorama/admin.php
r29593 r29615 14 14 'loop' => isset($_POST['loop']), 15 15 'enable_caption' => isset($_POST['enable_caption']), 16 'replace_picture' => isset($_POST['replace_picture']), 17 'replace_picture_only_users' => isset($_POST['replace_picture_only_users']), 16 18 ); 17 19 if (isset($_POST['allowfullscreen'])) -
extensions/Fotorama/language/ru_RU/plugin.lang.php
r29593 r29615 14 14 $lang['Show caption with image title'] = 'Показывать заголовок с названием изображения'; 15 15 $lang['Tumbnail height (when present)'] = 'Высота миниатюр (когда присутствуют)'; 16 $lang['Replace picture page'] = 'Заменить страницы с фотографиями'; 17 $lang['except an administrator'] = 'кроме администратора'; 16 18 17 19 ?> -
extensions/Fotorama/main.inc.php
r29596 r29615 36 36 $conf['Fotorama']['thumbheight'] = 64; 37 37 } 38 // Upgrade params from 2.7.l 39 if (!isset($conf['Fotorama']['replace_picture'])) { 40 $conf['Fotorama']['replace_picture'] = false; 41 $conf['Fotorama']['replace_picture_only_users'] = false; 42 } 38 43 39 44 add_event_handler('loc_end_picture', 'Fotorama_end_picture'); … … 44 49 { 45 50 global $template, $conf, $user, $page; 51 52 if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin())) 53 { 54 $page['slideshow'] = true; 55 56 $url_up = duplicate_index_url( 57 array( 58 'start' => 59 floor($page['current_rank'] / $page['nb_image_page']) 60 * $page['nb_image_page'] 61 ), 62 array( 63 'start', 64 ) 65 ); 66 //slideshow end 67 $template->assign( 68 array( 69 'U_SLIDESHOW_STOP' => $url_up, 70 ) 71 ); 72 73 $template->assign('replace_picture', true); 74 } 46 75 47 76 if ($page['slideshow'] and $conf['light_slideshow']) … … 134 163 global $template, $conf, $page; 135 164 165 if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin())) 166 { 167 $page['slideshow'] = true; 168 } 169 136 170 if (isset($page['slideshow']) and $page['slideshow'] and $conf['light_slideshow']) 137 171 { -
extensions/Fotorama/maintain.inc.php
r29593 r29615 20 20 'enable_caption' => false, 21 21 'thumbheight' => 64, 22 'replace_picture' => false, 23 'replace_picture_only_users' => false, 22 24 ); 23 25 -
extensions/Fotorama/template/admin.tpl
r29597 r29615 101 101 </label> 102 102 </li> 103 <li> 104 <input type="checkbox" id="replace_picture" name="replace_picture"{if $Fotorama.replace_picture} checked="checked"{/if}> 105 <label for="replace_picture"> 106 <b>{'Replace picture page'|@translate}</b> 107 </label> 108 </li> 109 <li> 110 <input type="checkbox" id="replace_picture_only_users" name="replace_picture_only_users"{if $Fotorama.replace_picture_only_users} checked="checked"{/if}> 111 <label for="replace_picture_only_users"> 112 <b>{'except an administrator'|@translate}</b> 113 </label> 114 </li> 103 115 </ul> 104 116 </fieldset> -
extensions/Fotorama/template/slideshow.tpl
r29593 r29615 50 50 function (e, fotorama, extra) { 51 51 if (!fullscreen) { 52 {/literal}{if isset($replace_picture)}{literal} 53 history.replaceState(null, null, fotorama.activeFrame['url']); 54 {/literal}{else}{literal} 52 55 history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow='); 53 56 jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']); 57 {/literal}{/if}{literal} 58 54 59 jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']); 55 60 jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal}); … … 85 90 }); 86 91 92 {/literal}{if isset($replace_picture)}{literal} 93 history.replaceState(null, null, fotorama.activeFrame['url']); 94 {/literal}{else}{literal} 87 95 history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow='); 88 96 jQuery('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']); 97 {/literal}{/if}{literal} 98 89 99 jQuery('#slideshow .showtitle').text(fotorama.activeFrame['caption']); 90 100 jQuery('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{/literal}{count($items)}{literal});
Note: See TracChangeset
for help on using the changeset viewer.