Changeset 8627
- Timestamp:
- Jan 12, 2011, 3:22:40 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r8070 r8627 27 27 28 28 class autosize_controler { 29 /* 30 * 31 */ 32 29 //============================================================ 30 /* 31 * cl_autosize_script_1 32 */ 33 static public function cl_autosize_script_1() 34 { 35 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 36 if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; 37 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 38 if ($ma_page=='thePiwiShackControllerPage') return ; 39 $my_path = dirname(__FILE__).'/'; 40 $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) ); 41 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 42 $autosize_parametres = cl_autosize_Get_Options() ; 43 $theme=$user['theme']; 44 $url = get_root_url(); 45 $template->assign( 46 array( 47 'autosize_parametres' => $autosize_parametres , 48 'cl_plugins' => $cl_plugin , 49 'cl_version' => $cl_plugin['version'] , 50 'name' => $cl_plugin['name'] , 51 'MY_ROOT' => $url, 52 'theme' => $theme , 53 'DEBUG' => $DEBUG , 54 'AUTOSIZE_PATH' => AUTOSIZE_PATH) 55 ); 56 57 return $template->parse( 'autosize_init', false); 58 }// function cl_autosize_script_1 59 //=========================================================== 60 /* 61 * cl_autosize_script_2 62 */ 63 static public function cl_autosize_script_2() 64 { 65 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 66 $my_path = dirname(__FILE__).'/'; 67 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 68 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 69 $theme=$user['theme']; 70 if ($ma_page=='thePiwiShackControllerPage') return ; 71 72 $template->assign( 73 array( 74 'cl_version' => $cl_plugin['version'] , 75 'name' => $cl_plugin['name'] , 76 'ma_page' => $ma_page, 77 78 'theme' => $theme , 79 'DEBUG' => $DEBUG , 80 'AUTOSIZE_PATH' => AUTOSIZE_PATH 81 ) 82 ); 83 84 $autoscript="<script type='text/javascript'> 85 /* cl_autosize_script_2 */ 86 if (typeof (save_framework) == 'function') 87 save_framework('".$ma_page."'); 88 </script>"; 89 $template->append('footer_elements',$autoscript); 90 return ; 91 }// function cl_autosize_script_2 92 93 //================================================================ 94 /* 95 * cl_autosize_admin 96 */ 97 static public function cl_autosize_admin($menu) 98 { 99 global $lang ; 100 array_push($menu, array('NAME' => 'Autosize', 101 'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php'))); 102 return $menu; 103 } //function cl_autosize_admin 104 105 //=============================================================== 106 /* 107 * 108 */ 33 109 static public function cl_autosize_affiche() 34 110 { … … 40 116 load_language('lang', AUTOSIZE_PATH); 41 117 $my_path = dirname(__FILE__).'/'; 42 43 44 45 118 if (isset( $page['body_id']) && $page['body_id']=='thePicturePage' ) { 46 119 if ( isset($picture['current'])){ 47 48 49 50 51 120 $autosize_parametres = cl_autosize_Get_Options(); 52 include (AUTOSIZE_PATH."include/affiche.php"); 53 54 121 include (AUTOSIZE_PATH."include/affiche.php"); 55 122 if($autosize_parametres->check_icon_v == 'on'){ 56 123 $template->assign('cl_autosize_button', … … 62 129 ) 63 130 64 ); 65 131 ); 66 132 $template->set_filenames(array('cl_bp' => $my_path. 'template/picture.tpl')); 67 133 $template->concat('PLUGIN_PICTURE_ACTIONS', $template->parse('cl_bp', true)); … … 76 142 77 143 } //public function cl_autosize_affiche 78 /* 79 * 80 */ 81 static public function cl_autosize_admin($menu) 82 { 83 global $lang ; 84 array_push($menu, array('NAME' => 'Autosize', 85 'URL' => get_admin_plugin_menu_link(AUTOSIZE_PATH . 'admin/admin_autosize.php'))); 86 return $menu; 87 } //function cl_autosize_admin 88 /* 144 //=============================================================== 145 /* 89 146 * 90 147 */ … … 92 149 { 93 150 global $template,$infos_message,$erreur_message, $user ; 94 global $conf,$lang ;151 global $conf,$lang ; 95 152 96 153 //============================================================== … … 118 175 119 176 } // function cl_autosize_aff_infos_plus 120 121 122 123 /* 124 * conflit ============================================= 125 */ 126 static public function cl_autosize_script_3($content) 127 { 128 global $template,$user,$conf,$picture ,$page,$cl_plugin; 129 130 $my_path = basename(dirname(__FILE__)).'/' ; 131 $my_path = dirname(__FILE__).'/'; 132 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 133 134 $ThePicture = $template->get_template_vars('current'); 135 $tpl_name = $user['theme'] ; 136 137 $autosizejs ='<!--- cl_autosize_script_3 -->'; 138 $autosizejs = $autosizejs.'<script type="text/javascript" id="jquery" charset="utf-8" src="'; 139 $autocss = $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n"; 140 // $template->append('head_elements',$autocss); 141 142 $autocss="<script type='text/javascript'> 143 /* cl_autosize_script_3 */ 144 var DEBUG=\"".$DEBUG."\" ; 145 if (fade_in !=0) jQuery('#theImage').css({opacity:'0.0'}); 146 if (fade_in !=0) jQuery('#theImage').css({opacity:'1.0'}); 177 //=============================================================== 178 /* 179 * 180 */ 181 static public function cl_ajuste_data($content){ 182 global $template,$user,$conf,$picture ; 183 $my_path = realpath(AUTOSIZE_PATH .'/'); 184 $userdata=$user; 185 $fields = array( 'maxwidth', 'maxheight' ); 147 186 148 </script>"; 149 150 // $template->append('footer_elements',"\n".$autocss); 151 152 if ( !empty($content) ) { return $content; } 153 if ($ThePicture['is_picture'] <> 1 ) { 154 return $content; ; 155 } 156 157 158 return $content ; 159 160 }// function cl_autosize_script_3 161 //================================================================================= 162 static public function cl_autosize_script_2() 163 { 164 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 165 166 $my_path = basename(dirname(__FILE__)).'/' ; 167 $my_path = dirname(__FILE__).'/'; 168 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 169 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 170 $theme=$user['theme']; 171 $template->assign( 172 array( 173 'cl_version' => $cl_plugin['version'] , 174 'name' => $cl_plugin['name'] , 175 'ma_page' => $ma_page, 176 177 'theme' => $theme , 178 'DEBUG' => $DEBUG , 179 'AUTOSIZE_PATH' => AUTOSIZE_PATH 180 ) 181 ); 182 183 $autoscript="<script type='text/javascript'> 184 /* cl_autosize_script_2 */ 185 var DEBUG=\"".$DEBUG."\" ; 186 if (typeof (save_framework) == 'function') 187 save_framework('".$ma_page."'); 188 </script>"; 189 $template->append('footer_elements',$autoscript); 190 return ; 191 192 }// function cl_autosize_script_2 193 //============================================================ 194 /* 195 * cl_autosize_script 196 */ 197 static public function cl_autosize_script() 198 { 199 global $template,$user,$conf,$picture ,$page, $cl_plugin ; 200 if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ; 201 202 $my_path = dirname(__FILE__).'/'; 203 $template->set_filenames(array('autosize_init'=>$my_path. "template/conflit.tpl" ) ); 204 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 205 $autosize_parametres = cl_autosize_Get_Options() ; 206 $theme=$user['theme']; 207 $url = get_root_url(); 187 $ThePicture = $template->get_template_vars('current'); 188 $data = array(); 189 return $content; 190 191 $data['maxwidth'] = '1200'; 192 $data['maxheight'] ='250'; 193 $data['user_id'] = $userdata['id']; 194 foreach ($fields as $field) 195 { 196 if (isset($_POST[$field])) 197 { 198 $data[$field] = $_POST[$field]; 199 } 200 } 201 202 if($data['maxwidth'] != "" ) 203 { 204 $picture['current']['scaled_width']=$data['maxwidth']; 205 $picture['current']['scaled_height']=$data['maxheight']; 206 mass_updates(USER_INFOS_TABLE, 207 array('primary' => array('user_id'), 'update' => $fields), 208 array($data)); 209 } 208 210 209 $template->assign( 210 array( 211 'autosize_parametres' => $autosize_parametres , 212 'cl_plugins' => $cl_plugin , 213 'cl_version' => $cl_plugin['version'] , 214 'name' => $cl_plugin['name'] , 215 216 'MY_ROOT' => get_root_url(), 217 'theme' => $theme , 218 'DEBUG' => $DEBUG , 219 'AUTOSIZE_PATH' => AUTOSIZE_PATH) 220 ); 221 222 return $template->parse( 'autosize_init', false); 223 }// function cl_autosize_script 224 //=============================================================== 225 /* 226 * 227 */ 228 static public function cl_ajuste_data($content){ 229 global $template,$user,$conf,$picture ; 230 $my_path = realpath(AUTOSIZE_PATH .'/'); 231 $userdata=$user; 232 $fields = array( 'maxwidth', 'maxheight' ); 233 234 $ThePicture = $template->get_template_vars('current'); 235 $data = array(); 236 return $content; 237 238 $data['maxwidth'] = '1200'; 239 $data['maxheight'] ='250'; 240 $data['user_id'] = $userdata['id']; 241 foreach ($fields as $field) 242 { 243 if (isset($_POST[$field])) 244 { 245 $data[$field] = $_POST[$field]; 246 } 247 } 248 249 if($data['maxwidth'] != "" ) 250 { 251 $picture['current']['scaled_width']=$data['maxwidth']; 252 $picture['current']['scaled_height']=$data['maxheight']; 253 mass_updates(USER_INFOS_TABLE, 254 array('primary' => array('user_id'), 'update' => $fields), 255 array($data)); 256 } 257 258 return $content; 259 } 211 return $content; 212 } 260 213 261 214 } // class -
extensions/Autosize/include/constants.php
r7912 r8627 2 2 global $prefixeTable; 3 3 if (!defined('CL_AUTOSIZE_TABLE')) define('CL_AUTOSIZE_TABLE', $prefixeTable.'cl_autosize'); 4 $path = AUTOSIZE_PATH;4 $path = AUTOSIZE_PATH; 5 5 $plg_data = implode( '', file($path.'main.inc.php') ); 6 6 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) ) -
extensions/Autosize/js/Affiche_script.js
r8588 r8627 1 if (typeof jQuery == 'undefined') {2 // jQuery n'est pas chargé3 } else {4 // jQuery est chargé5 }6 1 7 2 //Chrome,Firefox,safari diaporama + GMaps incompatible pas de load. -
extensions/Autosize/js/conflit.js
r8588 r8627 72 72 function conflit(element, nc) { 73 73 //--- cl_conflit 74 if (typeof MooTools=="undefined" && typeof Prototype=="undefined") {75 ret_element = jQuery(element);74 if (typeof MooTools == "undefined" && typeof Prototype == "undefined") { 75 ret_element = jQuery(element); 76 76 return ret_element; 77 77 } … … 82 82 return ret_element; 83 83 } 84 84 85 85 } 86 86 … … 94 94 } 95 95 else if (retour.match(RegExp("rv_gmaps", "gi"))) { 96 try{ 97 ret_element = myjQuery().$Prototype(element); 98 } 99 catch(e) 100 { 101 102 ret_element = myjQuery().$Prototype(element); 103 104 } 105 } else if (retour.match(RegExp("GMaps", "gi"))) { 96 try { 97 ret_element = myjQuery().$Prototype(element); 98 } 99 catch (e) { 100 101 ret_element = myjQuery().$Prototype(element); 102 103 } 104 } else if (retour.match(RegExp("GMaps", "gi"))) { 106 105 107 106 ret_element = jQuery(element); … … 113 112 114 113 } 115 114 116 115 117 116 } else if (retour.match(RegExp("luciano", "gi"))) { 118 117 119 118 120 119 ret_element = jQuery().$Luciano(element, nc); … … 168 167 //====================================================== 169 168 jQuery(document).ready( 170 function (jQuery) { 171 jQuery(window).load(function () { 172 //============================================================ 173 jQuery("#icon_gmaps").bind('click', function () { 174 175 jQuery('html,body').stop().scrollTop(0); 176 jQuery('html,body').stop().scrollLeft(0); 177 jQuery(".ui-widget-overlay").css("opacity", "0.75"); 178 179 l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2; 180 h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2; 181 182 jQuery(".gmapsPopup").css("left", l1 + "px"); 183 jQuery(".gmapsPopup").css("top", h1 + "px"); 184 }) 185 //============================================================= 186 if (typeof (Parent) == "undefined") 187 Parent = "#theImage"; 188 info_image = jQuery(Parent).infos(); 189 p0 = jQuery(Parent); 190 if (p0.length > 0) { 191 //====================================================== 192 if (info_image.position != "static") { 193 try { 194 if (theme.match("gally", "gi")) { 195 if (typeof gallyPP != "undefined") { 196 197 } else if (jQuery.isFunction(inittoolbar)) { 198 if (typeof (currentTab) == "undefined") inittoolbar(); 199 else initializeImageMode("resize"); 200 }; 201 //==== compatibilité Gally/LLGBO === 202 //--- passage relative ==> static ===/ 203 jQuery(Parent).css({ position: "static" }); 204 jQuery("#imageToolBar").css({ position: "relative", top: "0px" }); 205 206 } 207 } catch (e) { 208 } 209 210 } 211 } 212 // jQuery(window).resize(); 213 }); 214 //============================================================= 215 // $ = _$2; ; 216 }); 169 function (jQuery) { 170 jQuery(window).load(function () { 171 //============================================================ 172 jQuery("#icon_gmaps").bind('click', function () { 173 174 jQuery('html,body').stop().scrollTop(0); 175 jQuery('html,body').stop().scrollLeft(0); 176 jQuery(".ui-widget-overlay").css("opacity", "0.75"); 177 178 l1 = (jQuery(window).width() - (jQuery(".gmapsPopup").width())) / 2; 179 h1 = (jQuery(window).height() - (jQuery(".gmapsPopup").height())) / 2; 180 181 jQuery(".gmapsPopup").css("left", l1 + "px"); 182 jQuery(".gmapsPopup").css("top", h1 + "px"); 183 }) 184 //============================================================= 185 186 // jQuery(window).resize(); 187 }); 188 //============================================================= 189 // $ = _$2; ; 190 }); 217 191 218 192 … … 222 196 jQuery.fn.extend({ 223 197 224 //---------------- luciano -------------------------------225 $Luciano: function (el, nc) {226 return document.id(el, nc, this.document);227 },228 //=============== PaMOOramics ===========================229 230 $Pamoorama: function (B) {198 //---------------- luciano ------------------------------- 199 $Luciano: function (el, nc) { 200 return document.id(el, nc, this.document); 201 }, 202 //=============== PaMOOramics =========================== 203 204 $Pamoorama: function (B) { 231 205 232 206 … … 345 319 callstack.push("jQuery"); 346 320 isCallstackPopulated = true; 347 321 348 322 break; 349 323 } … … 448 422 449 423 states.push('paMOOramics'); 450 break;451 }452 //window_1290934905697_top453 if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) {454 states.push('rv_gmaps');455 break;456 }457 if (fn.match(RegExp("that.overlayOpacity", "gi"))) {458 states.push('rv_gmaps');459 break;460 }461 if (fn.match(RegExp("For backward compatibility like win", "gi"))) {462 states.push('rv_gmaps');463 break;464 }465 if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) {466 states.push('rv_gmaps');467 break;468 }424 break; 425 } 426 //window_1290934905697_top 427 if (fn.match(RegExp("window_..|WindowUtilities", "gi"))) { 428 states.push('rv_gmaps'); 429 break; 430 } 431 if (fn.match(RegExp("that.overlayOpacity", "gi"))) { 432 states.push('rv_gmaps'); 433 break; 434 } 435 if (fn.match(RegExp("For backward compatibility like win", "gi"))) { 436 states.push('rv_gmaps'); 437 break; 438 } 439 if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) { 440 states.push('rv_gmaps'); 441 break; 442 } 469 443 470 444 if (fn.match(RegExp("__content|__method|observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { … … 474 448 475 449 476 if (all_functions.length > 50) 477 break;450 if (all_functions.length > 50) 451 break; 478 452 479 453 … … 482 456 483 457 } 484 // state_ff + "|" +458 // state_ff + "|" + 485 459 state = states.join('\n'); 486 460 if (state == "") { 487 461 488 462 if (DEBUG == "true") { 489 463 Fn = all_functions.join('\n'); … … 494 468 } 495 469 496 470 497 471 state = state_ff; 498 472 } 499 473 500 474 Fn = all_functions; 501 return { state: state, fn: callstack.join('\n'), fn1:fn2 };475 return { state: state, fn: callstack.join('\n'), fn1: fn2 }; 502 476 } 503 477 //==================================== 504 478 test_conflit = false; 505 librairies =new Array;479 librairies = new Array; 506 480 507 481 … … 509 483 $_ = $; 510 484 function save_framework(page) { 485 // theGategoryPage,theRegisterPage 486 // thePicturePage 487 // si admin.php page = "",theIdentificationPage 511 488 try { 512 489 Conflit = { version: cl_version, name: cl_plugin }; … … 514 491 515 492 } 516 $_2 = $; 493 if (typeof (Parent) == "undefined") 494 Parent = "#theImage"; 495 info_image = jQuery(Parent).infos(); 496 p0 = jQuery(Parent); 497 if (p0.length > 0) { 498 //====================================================== 499 if (info_image.position != "static") { 500 try { 501 if (theme.match("gally", "gi")) { 502 if (typeof gallyPP != "undefined") { 503 504 } else if (jQuery.isFunction(inittoolbar)) { 505 if (typeof (currentTab) == "undefined") inittoolbar(); 506 else initializeImageMode("resize"); 507 }; 508 //==== compatibilité Gally/LLGBO === 509 jQuery(Parent).css({ position: "static" }); 510 511 } 512 } catch (e) { 513 } 514 515 } 516 } 517 518 $_2 = $; 517 519 return 518 520 } 519 521 520 522 (function ($) { 521 $(document).ready(function () { 522 //================================================= 523 if (typeof jQuery.fn.infos !="function") 524 { 525 jQuery=myjQuery; 526 $=my$ ; 527 } 528 }); 523 $(document).ready(function () { 524 //================================================= 525 if (typeof jQuery.fn.infos != "function") { 526 jQuery = myjQuery; 527 $ = my$; 528 } 529 }); 529 530 530 531 })(jQuery); 531 532 532 if(test_conflit!=true) 533 { 534 //-------------------------------------------------------------- 535 $_0 = $; 536 537 function $(element, nc0) { 538 if (typeof jQuery.fn.infos !="function") 539 if (typeof myjQuery !="undefined") 540 jQuery=myjQuery; 541 a = conflit(element, nc0); 542 return a; 543 } 544 545 if (typeof ($.ajax) != "function") { 546 $.ajax = function (origSettings) { 547 jQuery.ajax(origSettings); 548 } 549 550 551 $.parseJSON = function (msg) { 552 return jQuery.parseJSON(msg); 553 } 554 555 556 } 557 //============================================ 558 /* url (String): URl de la page à charger 559 * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 560 * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 561 * type (String): (optionnel) format des données renvoyées à la fonction de callback 562 */ 563 if (typeof ($.get) != "function") { 564 $.get = function ( a, b, c, d) { 565 return jQuery.get(a, b, c,d ); 566 } 567 } 568 if (typeof ($.post) != "function") { 569 570 $.post = function (a, b, c,d) { 571 return jQuery.post(a, b, c, d); 572 } 573 ; 574 575 } 576 577 578 533 if (test_conflit != true) { 534 //-------------------------------------------------------------- 535 $_0 = $; 536 537 function $(element, nc0) { 538 if (typeof jQuery.fn.infos != "function") 539 if (typeof myjQuery != "undefined") 540 jQuery = myjQuery; 541 a = conflit(element, nc0); 542 return a; 543 } 544 545 if (typeof ($.ajax) != "function") { 546 $.ajax = function (origSettings) { 547 jQuery.ajax(origSettings); 548 } 549 550 551 $.parseJSON = function (msg) { 552 return jQuery.parseJSON(msg); 553 } 554 555 556 } 557 //============================================ 558 /* url (String): URl de la page à charger 559 * params (Map): (optionnel) paires de clé/valeur qui seront envoyées au serveur. 560 * callback (Fonction): (optionnel) fonction qui sera éxécutée quand les données sera chargées. 561 * type (String): (optionnel) format des données renvoyées à la fonction de callback 562 */ 563 if (typeof ($.get) != "function") { 564 $.get = function (a, b, c, d) { 565 return jQuery.get(a, b, c, d); 566 } 567 } 568 if (typeof ($.post) != "function") { 569 570 $.post = function (a, b, c, d) { 571 return jQuery.post(a, b, c, d); 572 } 573 ; 574 575 } 576 579 577 } 580 578 //-------------------------------------------------------------- -
extensions/Autosize/js/jquery.dimensions.js
r8588 r8627 19 19 */ 20 20 jQuery.each(['Height', 'Width'], 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 21 function (i, name) { 22 jQuery.fn['inner' + name] = function () { 23 if (!this[0]) return; 24 var torl = name == 'Height' ? 'Top' : 'Left', 25 borr = name == 'Height' ? 'Bottom' : 'Right'; 26 return this.is(':visible') ? this[0]['client' + name] : num(this, name.toLowerCase()) + num(this, 'padding' + torl) + num(this, 'padding' + borr); 27 }; 28 29 jQuery.fn['outer' + name] = function (options) { 30 if (!this[0]) return; 31 var torl = name == 'Height' ? 'Top' : 'Left', 32 borr = name == 'Height' ? 'Bottom' : 'Right'; 33 options = options || false; 34 options = jQuery.extend({ margin: options }); 35 36 var val = this.is(':visible') ? this[0]['offset' + name] : 37 num(this, 38 name.toLowerCase()) + 39 num(this, 'border' + torl + 'Width') + 40 num(this, 'border' + borr + 'Width') + 41 num(this, 'padding' + torl) + 42 num(this, 'padding' + borr) 43 44 ; 45 return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0); 46 }; 47 }); 48 48 /* 49 49 * 50 50 */ 51 51 jQuery.each(['Left', 'Top'], 52 53 54 55 56 57 58 59 60 61 52 function (i, name) { 53 jQuery.fn['scroll' + name] = function (val) { 54 if (!this[0]) return; 55 return val != undefined ? this.each(function () { 56 this == window || this == document ? window.scrollTo(name == 'Left' ? val : $(window)['scrollLeft'](), 57 name == 'Top' ? val : $(window)['scrollTop']()) : this['scroll' + name] = val; 58 }) : this[0] == window || this[0] == document ? self[(name == 'Left' ? 'pageXOffset' : 'pageYOffset')] || jQuery.boxModel && document.documentElement['scroll' + name] || document.body['scroll' + name] : this[0]['scroll' + name]; 59 }; 60 61 }); 62 62 jQuery.fn.extend({ 63 63 … … 106 106 if (elem.nodeName) nodeName = elem.nodeName; 107 107 108 108 109 109 if (elem == window) { 110 110 -
extensions/Autosize/main.inc.php
r8536 r8627 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.4.2. 54 Version: 1.4.2.6 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448 … … 8 8 Author URI:http://cljosse.free.fr 9 9 */ 10 10 11 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 11 12 if (!defined('AUTOSIZE_PATH')) 12 13 define( 'AUTOSIZE_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); 13 //================================================================================= 14 15 include(AUTOSIZE_PATH."include/constants.php"); 16 include_once(AUTOSIZE_PATH.'autosize.inc.php'); 14 //================================================================== 15 include(AUTOSIZE_PATH."include/constants.php"); 16 include_once(AUTOSIZE_PATH.'autosize.inc.php'); 17 17 //================================================================== 18 18 $autosize_controler = new autosize_controler(); 19 19 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 20 20 21 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL ); 21 22 22 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL ); 23 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script'), EVENT_HANDLER_PRIORITY_NEUTRAL , 2); 24 25 add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_2'), EVENT_HANDLER_PRIORITY_NEUTRAL ); 26 add_event_handler('render_element_content', 27 array(&$autosize_controler, 'cl_autosize_script_3'), EVENT_HANDLER_PRIORITY_NEUTRAL-1, 2 ); 28 29 30 23 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL+20 , 2); 24 add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_2'), EVENT_HANDLER_PRIORITY_NEUTRAL ); 31 25 ?> -
extensions/Autosize/template/autosize.tpl
r8536 r8627 46 46 </script> 47 47 48 48 {known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"} 49 49 <link href="{$AUTOSIZE_PATH}css/autosize.css" rel="stylesheet" type="text/css" /> 50 50 <!-- << autosize/template/autosize.tpl --> 51 51 {/html_head} 52 53 54 {known_script id="Affiche_script" src=$AUTOSIZE_PATH|@cat:"js/Affiche_script.js"}55 52 <script type="text/javascript"> 56 var DEBUG = '{$DEBUG}'; 57 var visible = '{$visible}'; 53 var visible = '{$visible}'; 58 54 </script> 59 55 {if $DEBUG == "true"} -
extensions/Autosize/template/conflit.tpl
r8185 r8627 1 1 {html_head} 2 <!--- cl_conflit/template/confilt.tpl ---> 2 3 {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1} 3 4 {known_script id="dimensions" src=$AUTOSIZE_PATH|@cat:"js/jquery.dimensions.js"} 4 5 {known_script id="conflit_script" src=$AUTOSIZE_PATH|@cat:"js/conflit.js"} 5 6 {/html_head} 6 7 <script type="text/javascript"> 7 var DEBUG = '{$DEBUG}'; 8 var DEBUG = '{$DEBUG}'; 9 var theme = '{$theme}'; 10 var cl_version = '{$cl_version}'; 11 var cl_plugin = '{$name}'; 12 {if $DEBUG == "true"} 13 var cl_query = '{$autosize_parametres->query}'; 14 var cl_type = '{$autosize_parametres->type}'; 15 var cl_plugins=new Array(); 16 {if not empty($cl_plugins )} 17 {foreach from=$cl_plugins item=cl_plug } 18 value="{$cl_plug}";cl_plugins.push(value); 19 {/foreach} 20 {/if} 21 {/if} 8 22 </script> 9 23 10 24 11 <script type="text/javascript">12 var theme = '{$theme}';13 var cl_version = '{$cl_version}';14 var cl_plugin = '{$name}';15 var cl_query = '{$autosize_parametres->query}';16 var cl_type = '{$autosize_parametres->type}';17 var cl_plugins=new Array();18 {if $DEBUG}19 {if not empty($cl_plugins )}20 {foreach from=$cl_plugins item=cl_plug }21 value="{$cl_plug}";cl_plugins.push(value);22 {/foreach}23 {/if}24 {/if}25 </script>26 27 {/html_head}28 25
Note: See TracChangeset
for help on using the changeset viewer.