Changeset 30029


Ignore:
Timestamp:
Oct 13, 2014, 1:16:50 PM (10 years ago)
Author:
JanisV
Message:

Compatibility with VideoJS

File:
1 edited

Legend:

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

    r29981 r30029  
    2727  if ($conf['light_slideshow'])
    2828  {
    29     add_event_handler('render_element_content', 'Fotorama_element_content');
     29    add_event_handler('render_element_content', 'Fotorama_element_content', EVENT_HANDLER_PRIORITY_NEUTRAL-10);
    3030    add_event_handler('loc_end_picture', 'Fotorama_end_picture');
    3131    add_event_handler('loc_end_page_header', 'Fotorama_end_page_header');
     
    7676}
    7777
    78 function Fotorama_element_content()
     78function Fotorama_element_content($content, $picture)
    7979{
    8080  global $page;
     
    8484    $page['slideshow'] = true;
    8585  }
     86
     87  return $content;
    8688}
    8789
     
    124126
    125127    $current = $template->get_template_vars('current');
    126     $type = $current['selected_derivative']->get_type();
     128    if (isset($current['selected_derivative']))
     129    {
     130      $type = $current['selected_derivative']->get_type();
     131    }
     132
    127133    $defined = ImageStdParams::get_defined_type_map();
    128     if (!isset($defined[$type]))
     134    if (!isset($type) or !isset($defined[$type]))
    129135    {
    130136      $type = pwg_get_session_var('picture_deriv', $conf['derivative_default_size']);
Note: See TracChangeset for help on using the changeset viewer.