Ignore:
Timestamp:
Oct 31, 2012, 12:58:54 PM (12 years ago)
Author:
cljosse
Message:

[extensions] Autosize fix compatibility with 2.4 (compatible gvideo)

File:
1 edited

Legend:

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

    r18731 r18823  
    22/*
    33Plugin Name: AutoSize
    4 Version: 2.11.0
     4Version: 2.11.1
    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
     
    3030        include_once(AUTOSIZE_PATH.'autosize.inc.php');
    3131//==================================================================
    32 global $page,$autosize_controler;
     32global $page,$autosize_ctrl;
    3333if (!isset( $page['start'])) {
    3434 $page['start']=0;
    3535 }
    36 $autosize_controler = new autosize_controler();
    37 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin')  );
     36$autosize_ctrl = new autosize_ctrl();
     37add_event_handler('get_admin_plugin_menu_links', array(&$autosize_ctrl,'cl_autosize_admin')  );
    3838
     39  if( isset($_GET['cl_debug']) && $_GET['cl_debug'] =='false') {
     40      $DEBUG_autosize="";
     41  }else{
     42    $DEBUG_autosize = isset($_POST['cl_debug']) ? $_POST['cl_debug'] : "" ;
     43    $DEBUG_autosize = isset($_GET['cl_debug']) ? $_GET['cl_debug'] :  $DEBUG_autosize ;
     44    $DEBUG_autosize = isset($conf['cl_debug']) ? $conf['cl_debug']."," . $DEBUG_autosize : $DEBUG_autosize ;
     45 //===============================================================
     46}
     47if(!preg_match("|NO|", $DEBUG_autosize, $val)) { 
    3948
    4049// init cl_autosize_script_1 cl_autosize_affiche
    41 //Important avant pamooramics
    42 add_event_handler('render_element_content', array(&$autosize_controler, 'autosize_calcContent'),40,2);
     50//Important avant pamooramics, gvideo
     51
     52add_event_handler('render_element_content', array(&$autosize_ctrl, 'autosize_calcContent'),EVENT_HANDLER_PRIORITY_NEUTRAL-11,2);
     53
    4354/**/
    44 add_event_handler('render_element_content',  array(&$autosize_controler,'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2  );
    45 add_event_handler('render_element_content',  array(&$autosize_controler,'init2'),EVENT_HANDLER_PRIORITY_NEUTRAL+1,2  );
    46 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1') );
    47 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_2')  );
    48 add_event_handler('loc_after_page_header',array(&$autosize_controler, 'cl_autosize_script_3')  );
    49 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL +21    );
     55add_event_handler('render_element_content',  array(&$autosize_ctrl,'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2  );
     56add_event_handler('render_element_content',  array(&$autosize_ctrl,'init2'),EVENT_HANDLER_PRIORITY_NEUTRAL+1,2  );
     57add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_script_1') );
     58add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_script_2')  );
     59add_event_handler('loc_after_page_header',array(&$autosize_ctrl, 'cl_autosize_script_3')  );
     60add_event_handler('loc_after_page_header', array(&$autosize_ctrl, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL +21    );
    5061}
     62} ;
    5163
    5264
Note: See TracChangeset for help on using the changeset viewer.