Ignore:
Timestamp:
Jan 26, 2011, 12:52:35 PM (13 years ago)
Author:
cljosse
Message:

[Autosize][beta] compatibility whith piwigo 2.2


File:
1 edited

Legend:

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

    r8729 r8911  
    2525   PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'
    2626);
     27if (!defined('ROOT_URL'))
     28define(  'ROOT_URL',  get_root_url().'/' );
     29if (!defined('AUTOSIZE_PATH_ABS'))
     30define(
     31  'AUTOSIZE_PATH_ABS',
     32   dirname(__FILE__).'/'
     33);
     34
     35
    2736
    2837class autosize_controler {
     
    3746                $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
    3847                if ($ma_page=='thePiwiShackControllerPage') return ;
     48
    3949            $my_path = dirname(__FILE__).'/';
    4050                $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) );   
     
    4252                $autosize_parametres =   cl_autosize_Get_Options() ;                   
    4353                $theme=$user['theme'];
    44                 $url = get_root_url();                   
     54                $url = get_root_url();   
     55        $AUTOSIZE_PATH=AUTOSIZE_PATH;   
     56     
     57
    4558                $template->assign(
    4659                                                array(   
     
    4962                                                'cl_version' => $cl_plugin['version'] ,
    5063                                                'name' => $cl_plugin['name'] ,                                           
    51                                                 'MY_ROOT' => $url,
    5264                                                'theme' => $theme  ,
    5365                                                'DEBUG' => $DEBUG   ,
    54                                                 'AUTOSIZE_PATH' => AUTOSIZE_PATH)
     66                         'AUTOSIZE_PATH' => AUTOSIZE_PATH  ,
     67                         'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
     68                         'ROOT_URL' => $url  ,
     69                                                )
    5570                                                 );
    5671 
     
    6378 static public function cl_autosize_script_2()
    6479 {
    65            global  $template,$user,$conf,$picture ,$page, $cl_plugin ;
     80           global  $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ;
    6681                        $my_path = dirname(__FILE__).'/';
    6782                        $DEBUG =  isset($conf['cl_debug']) ? $conf['cl_debug'] : "false"  ;
     
    109124        static public function cl_autosize_affiche()
    110125        {
    111                 global $user, $picture, $template,$page;
     126                global $user, $picture, $template,$page,$known_script;
    112127                global $content, $element_info;   
    113128                global $infos_message,$erreur_message;
     
    119134                        if ( isset($picture['current'])){       
    120135                                $autosize_parametres = cl_autosize_Get_Options();
    121                                 include (AUTOSIZE_PATH."include/affiche.php");         
     136                                include (AUTOSIZE_PATH."include/affiche.php");
     137                               
    122138                                if($autosize_parametres->check_icon_v == 'on'){                         
    123139                                                $template->assign('cl_autosize_button',
Note: See TracChangeset for help on using the changeset viewer.