Ignore:
Timestamp:
Sep 17, 2010, 10:23:58 AM (14 years ago)
Author:
cljosse
Message:

[Autosize]IImprovement pamooramic compatibility


File:
1 edited

Legend:

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

    r6936 r6953  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.0.4
     4Version: 1.0.5
    55Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448
     
    1616);
    1717
    18 
    19 //add_event_handler('render_element_content', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL+1);
    20 //add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL);
    21 //add_event_handler('loc_begin_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL);
    22 add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL);
    23 
     18add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL+10);
    2419function cl_autosize_affiche()
    2520{
    26     global $user, $picture, $template;
    27     global $content, $element_info;
    28     $my_path = dirname(__FILE__).'/';
    29  
    30    
     21    global $user, $picture, $template,$page;
     22    global $content, $element_info;   
    3123    global $infos_message,$erreur_message;
    3224    global  $conf,$lang ;
     25    if ( $page['body_id']=='thePicturePage'  ) {
     26   if ( isset($picture['current'])){
     27    $my_path = dirname(__FILE__).'/';
    3328    $autosize_parametres = cl_autosize_Get_Options();
    34  include (AUTOSIZE_PATH."include/affiche.php");                 
     29    include (AUTOSIZE_PATH."include/affiche.php");             
    3530 
    36   $template->set_filenames(
    37     array('default_content'=> $my_path.'template/picture.tpl')
     31    $template->set_filenames(
     32        array('autosize_content'=> $my_path.'template/autosize.tpl')
    3833    );
    39        return $template->parse( 'default_content', true);
     34
     35       return $template->parse( 'autosize_content', false);
     36       }
     37       }
    4038}
    4139
     
    5048    return $menu;
    5149}
    52 
    53 
    54 
     50//===================================================================
    5551function cl_autosize_aff_infos_plus()
    5652{
Note: See TracChangeset for help on using the changeset viewer.