[6912] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | Plugin Name: AutoSize |
---|
[18716] | 4 | Version: auto |
---|
[6912] | 5 | Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation |
---|
[6932] | 6 | Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448 |
---|
[6912] | 7 | Author: cljosse |
---|
| 8 | Author URI:http://cljosse.free.fr |
---|
[18127] | 9 | */ |
---|
[18716] | 10 | /***************************************** |
---|
| 11 | *Ajouter .contentWithMenu{ margin-left:0 } dans themes montblanc |
---|
| 12 | * |
---|
| 13 | *****************************************/ |
---|
[6912] | 14 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 15 | if (!defined('AUTOSIZE_PATH')) |
---|
[7193] | 16 | define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); |
---|
[11461] | 17 | if (!defined('ROOT_URL')) |
---|
| 18 | define( 'ROOT_URL', get_root_url().'/' ); |
---|
| 19 | |
---|
| 20 | if (!defined('AUTOSIZE_PATH_ABS')) |
---|
| 21 | define( |
---|
| 22 | 'AUTOSIZE_PATH_ABS', realpath(AUTOSIZE_PATH)."/" |
---|
| 23 | ); |
---|
[10347] | 24 | |
---|
[18716] | 25 | if (isset($_GET['cl_debug']) && $_GET['cl_debug']=="NO"){ |
---|
[11461] | 26 | |
---|
[18716] | 27 | }else{ |
---|
[7886] | 28 | //================================================================== |
---|
[8627] | 29 | include(AUTOSIZE_PATH."include/constants.php"); |
---|
| 30 | include_once(AUTOSIZE_PATH.'autosize.inc.php'); |
---|
| 31 | //================================================================== |
---|
[18115] | 32 | global $page,$autosize_controler; |
---|
[10308] | 33 | if (!isset( $page['start'])) { |
---|
| 34 | $page['start']=0; |
---|
| 35 | } |
---|
[7673] | 36 | $autosize_controler = new autosize_controler(); |
---|
[8070] | 37 | add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); |
---|
[7673] | 38 | |
---|
[16931] | 39 | |
---|
[17503] | 40 | // init cl_autosize_script_1 cl_autosize_affiche |
---|
[18716] | 41 | //Important avant pamooramics |
---|
| 42 | add_event_handler('render_element_content', array(&$autosize_controler, 'autosize_calcContent'),40,2); |
---|
| 43 | /**/ |
---|
[18115] | 44 | add_event_handler('render_element_content', array(&$autosize_controler,'init'),EVENT_HANDLER_PRIORITY_NEUTRAL-1,2 ); |
---|
[18716] | 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') ); |
---|
[17503] | 49 | add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL +21 ); |
---|
[18716] | 50 | } |
---|
[17503] | 51 | |
---|
[18725] | 52 | |
---|
| 53 | |
---|
| 54 | |
---|
[6912] | 55 | ?> |
---|