Changeset 29945


Ignore:
Timestamp:
Oct 9, 2014, 12:08:55 PM (10 years ago)
Author:
JanisV
Message:

compatibility with Panoramas

File:
1 edited

Legend:

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

    r29944 r29945  
    2727  if ($conf['light_slideshow'])
    2828  {
     29    add_event_handler('render_element_content', 'Fotorama_element_content');
    2930    add_event_handler('loc_end_picture', 'Fotorama_end_picture');
    3031    add_event_handler('loc_end_page_header', 'Fotorama_end_page_header');
     
    6364}
    6465
     66function Fotorama_is_replace_picture()
     67{
     68  global $conf;
     69
     70  return ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])));
     71}
     72
     73function Fotorama_element_content()
     74{
     75  global $page;
     76
     77  if (Fotorama_is_replace_picture())
     78  {
     79    $page['slideshow'] = true;
     80  }
     81}
     82
    6583function Fotorama_end_picture()
    6684{
    6785  global $template, $conf, $user, $page;
    6886
    69   if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])))
    70   {
    71     $page['slideshow'] = true;
    72 
     87  if (Fotorama_is_replace_picture())
     88  {
    7389    $url_up = duplicate_index_url(
    7490      array(
     
    194210function Fotorama_end_page_header()
    195211{
    196   global $template, $conf, $page;
    197 
    198   if ($conf['Fotorama']['replace_picture'] and (!$conf['Fotorama']['replace_picture_only_users'] or !is_admin()) and (!isset($_GET['slidestop'])))
    199   {
    200     $page['slideshow'] = true;
    201   }
     212  global $template, $page;
    202213
    203214  if (isset($page['slideshow']) and $page['slideshow'])
Note: See TracChangeset for help on using the changeset viewer.