Changeset 27148
- Timestamp:
- Feb 3, 2014, 3:41:41 PM (10 years ago)
- Location:
- extensions/Fotorama
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Fotorama/main.inc.php
r27039 r27148 2 2 /* 3 3 Plugin Name: Fotorama 4 Version: 2.6. a4 Version: 2.6.d 5 5 Description: Fotorama based full-screen slideshow 6 6 Author: JanisV … … 13 13 if (mobile_theme()) return; 14 14 15 define('FOTORAMA_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/'); 15 define('FOTORAMA_ID', basename(dirname(__FILE__))); 16 define('FOTORAMA_PATH' , PHPWG_PLUGINS_PATH . FOTORAMA_ID . '/'); 17 define('FOTORAMA_ADMIN', get_root_url() . 'admin.php?page=plugin-' . FOTORAMA_ID); 16 18 17 19 add_event_handler('init', 'Fotorama_init'); 20 if (defined('IN_ADMIN')) 21 { 22 add_event_handler('get_admin_plugin_menu_links', 'Fotorama_admin_menu'); 23 } 18 24 19 25 function Fotorama_init() 20 26 { 21 global $conf , $user, $page;27 global $conf; 22 28 29 load_language('plugin.lang', FOTORAMA_PATH); 30 31 $conf['Fotorama'] = unserialize($conf['Fotorama']); 32 23 33 add_event_handler('loc_end_picture', 'Fotorama_end_picture'); 24 34 add_event_handler('loc_end_page_header', 'Fotorama_end_page_header'); 25 35 } 36 26 37 function Fotorama_end_picture() 27 38 { … … 94 105 $template->assign('items', $picture); 95 106 $template->assign('current_rank', $page['current_rank']); 107 $template->assign(array('Fotorama' => $conf['Fotorama'])); 96 108 $template->set_filenames( array('slideshow' => realpath(FOTORAMA_PATH.'template/slideshow.tpl'))); 97 109 } … … 112 124 } 113 125 126 function Fotorama_admin_menu($menu) 127 { 128 $menu[] = array( 129 'NAME' => 'Fotorama', 130 'URL' => FOTORAMA_ADMIN, 131 ); 132 133 return $menu; 134 } 135 114 136 ?> -
extensions/Fotorama/template/slideshow.tpl
r27039 r27148 18 18 <div id="content"> 19 19 <div id="theImage"> 20 <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-fit="scaledown" data-auto="false" 21 data-width="100%" data-maxheight="100%" data-minheight="200" data-height="{$item_height}" data-allowfullscreen="native" data-autoplay=true data-stopautoplayontouch=false data-loop=true data-nav=false> 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> 22 24 {foreach from=$items item=thumbnail} 23 25 <a href="{$thumbnail['derivative']->get_url()}" data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-title="{$thumbnail['TITLE']}"></a>
Note: See TracChangeset
for help on using the changeset viewer.