Changeset 27148


Ignore:
Timestamp:
Feb 3, 2014, 3:41:41 PM (7 years ago)
Author:
JanisV
Message:

Added basic customization

Location:
extensions/Fotorama
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Fotorama/main.inc.php

    r27039 r27148  
    22/*
    33Plugin Name: Fotorama
    4 Version: 2.6.a
     4Version: 2.6.d
    55Description: Fotorama based full-screen slideshow
    66Author: JanisV
     
    1313if (mobile_theme()) return;
    1414
    15 define('FOTORAMA_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
     15define('FOTORAMA_ID',       basename(dirname(__FILE__)));
     16define('FOTORAMA_PATH' ,    PHPWG_PLUGINS_PATH . FOTORAMA_ID . '/');
     17define('FOTORAMA_ADMIN',    get_root_url() . 'admin.php?page=plugin-' . FOTORAMA_ID);
    1618
    1719add_event_handler('init', 'Fotorama_init');
     20if (defined('IN_ADMIN'))
     21{
     22  add_event_handler('get_admin_plugin_menu_links', 'Fotorama_admin_menu');
     23}
    1824
    1925function Fotorama_init()
    2026{
    21   global $conf, $user, $page;
     27  global $conf;
    2228 
     29  load_language('plugin.lang', FOTORAMA_PATH);
     30
     31  $conf['Fotorama'] = unserialize($conf['Fotorama']);
     32
    2333  add_event_handler('loc_end_picture', 'Fotorama_end_picture');
    2434  add_event_handler('loc_end_page_header', 'Fotorama_end_page_header');
    2535}
     36
    2637function Fotorama_end_picture()
    2738{
     
    94105    $template->assign('items', $picture);
    95106    $template->assign('current_rank', $page['current_rank']);
     107    $template->assign(array('Fotorama' => $conf['Fotorama']));
    96108    $template->set_filenames( array('slideshow' => realpath(FOTORAMA_PATH.'template/slideshow.tpl')));
    97109  }
     
    112124}
    113125
     126function Fotorama_admin_menu($menu)
     127{
     128  $menu[] = array(
     129    'NAME' => 'Fotorama',
     130    'URL'  => FOTORAMA_ADMIN,
     131  );
     132
     133  return $menu;
     134}
     135
    114136?>
  • extensions/Fotorama/template/slideshow.tpl

    r27039 r27148  
    1818        <div id="content">
    1919        <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>
    2224      {foreach from=$items item=thumbnail}
    2325        <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.