Ignore:
Timestamp:
Oct 7, 2010, 1:00:14 PM (14 years ago)
Author:
cljosse
Message:

[Autosize][beta]Improvement theme compatibility.


File:
1 edited

Legend:

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

    r7013 r7124  
    22/*
    33Plugin Name: AutoSize
    4 Version: 1.1.21
     4Version: 1.1.22
    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
     
    2323    global $infos_message,$erreur_message;
    2424    global  $conf,$lang ,$user;
     25  load_language('lang', AUTOSIZE_PATH);
     26
    2527    if ( $page['body_id']=='thePicturePage'  ) {
    2628   if ( isset($picture['current'])){
     
    2830    $autosize_parametres = cl_autosize_Get_Options();
    2931    include (AUTOSIZE_PATH."include/affiche.php");             
     32   
     33    $template->assign('cl_autosize_button', array(
     34    'cl_autosize_info' => 'cl_autosize_info' ,
     35    'cl_autosize_info_2' => 'cl_autosize_info_2' ,
     36   
     37    'URL' => $_SERVER['REQUEST_URI'] ,
     38     'ICON2' => AUTOSIZE_PATH . 'icons/button-maximize.png',
     39    'ICON' => AUTOSIZE_PATH . 'icons/button-minimize.png'
     40    ));
     41 
     42$template->set_filenames(array('cl_bp' => $my_path. '/template/picture.tpl'));
     43$template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true));
    3044
    3145    $template->set_filenames(
     
    131145$infos_message .=l10n("cl_autosize_save_config")."<br>";
    132146 $autosize_parametres=cl_autosize_Set_Options();
    133  
     147
    134148 if ( isset($autosize_parametres) )
    135149        {
     
    145159 }
    146160 //=======================================================================
    147 //add_event_handler('render_element_content', 'cl_autosize_script', 98, 2 );
     161 add_event_handler('loc_end_section_init', 'cl_autosize_script', 60 );
     162 
     163 
     164function cl_autosize_script()
     165{
     166    $my_path = dirname(__FILE__).'/';
    148167
    149 function cl_autosize_script($content, $image)
    150 {
    151    global $user, $picture, $template,$page;
     168   global  $template;
    152169 
    153     global  $element_info;   
    154     global $infos_message,$erreur_message;
    155     global  $conf,$lang ,$user;
    156 
    157     $my_path = dirname(__FILE__).'/';
    158170    $template->set_filenames(
    159171        array('autosize_cl_init'=> $my_path.'template/cl_conflit.tpl')
     
    164176                                        )
    165177                     );
    166        return  $content;
     178       return $template->parse( 'autosize_cl_init', false);
    167179       
    168180}
Note: See TracChangeset for help on using the changeset viewer.