Changeset 7899
- Timestamp:
- Nov 28, 2010, 11:06:31 AM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/admin_autosize.php
r6978 r7899 130 130 131 131 $version = $plugin['version'] ; 132 $cl_plugin=$plugin['description']; 132 133 $autosize_parametres = cl_autosize_Get_Options(); 133 134 135 134 136 135 if (isset($_POST['submit'])) { 137 136 if ($_POST['submit'] == l10n('cl_autosize_save')) { -
extensions/Autosize/autosize.inc.php
r7872 r7899 134 134 static public function cl_autosize_script_3($content) 135 135 { 136 global $template,$user,$conf,$picture ,$page ;136 global $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ; 137 137 //userDefManage ?? 138 138 $my_path = basename(dirname(__FILE__)).'/' ; 139 139 $my_path = dirname(__FILE__).'/'; 140 141 140 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 141 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ; 142 142 143 143 $ThePicture = $template->get_template_vars('current'); … … 159 159 160 160 return $content ; 161 //==================================================================== 162 $template->set_filenames( 163 array('autosize_init'=>$my_path. "template/cl_conflit3.tpl" 164 ) 165 ); 166 167 168 $theme=$user['theme']; 169 170 $template->assign( 171 array( 172 'cl_conflit' => $cl_conflit , 173 'theme' => $theme , 174 'DEBUG' => $debug , 175 'AUTOSIZE_PATH' => AUTOSIZE_PATH) 176 ); 177 178 if( $page['body_id'] == 'theAdminPage' ) return ; 179 180 return $template->parse( 'autosize_init', false); 161 181 162 182 163 }// function cl_autosize_script_3 … … 184 165 static public function cl_autosize_script_2() 185 166 { 186 global $template,$user,$conf,$picture ,$page ;167 global $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ; 187 168 //userDefManage ?? 188 169 $my_path = basename(dirname(__FILE__)).'/' ; … … 192 173 $theme=$user['theme']; 193 174 $template->assign( 194 array('ma_page' => $page['body_id'], 175 array( 176 'cl_plugin' => $cl_version['id'] , 177 'version' => $cl_version['version'] , 178 'ma_page' => $page['body_id'], 195 179 'cl_conflit' => $cl_conflit , 196 180 'theme' => $theme , … … 198 182 'AUTOSIZE_PATH' => AUTOSIZE_PATH) 199 183 ); 200 184 global $cl_plugin; 185 201 186 $autoscript="<script type='text/javascript'> 202 187 if (typeof (save_framework) == 'function') … … 205 190 $template->append('footer_elements',$autoscript); 206 191 return ; 207 208 209 192 $template->set_filenames( 210 193 array('autosize_init'=>$my_path. "template/cl_conflit.tpl" 211 194 ) 212 195 ); 213 214 215 216 217 218 219 196 if( $page['body_id'] == 'theAdminPage' ) return ; 220 197 … … 228 205 static public function cl_autosize_script() 229 206 { 230 global $template,$user,$conf,$picture ,$page,$cl_version ;207 global $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ; 231 208 $my_path = basename(dirname(__FILE__)).'/' ; 232 209 $my_path = dirname(__FILE__).'/'; … … 237 214 238 215 $template->assign( 239 array( 'version' => $cl_version['version'] , 216 array( 217 'cl_plugin' => $cl_version['id'] , 218 'version' => $cl_version['version'] , 240 219 'cl_conflit' => $cl_conflit , 241 220 'theme' => $theme , … … 253 232 static public function cl_ajuste_data($content){ 254 233 global $template,$user,$conf,$picture ; 255 234 $my_path = realpath(AUTOSIZE_PATH .'/'); 256 235 $userdata=$user; 257 236 $fields = array( 'maxwidth', 'maxheight' ); -
extensions/Autosize/include/affiche.php
r7725 r7899 4 4 $img_width=isset($picture['current']['width'])?$picture['current']['width']:480; 5 5 $img_height=isset($picture['current']['height'])?$picture['current']['height']:320; 6 6 7 $version=isset($version)?$version:""; 8 $cl_plugin=isset($cl_plugin)?$cl_plugin:""; 7 9 $theme=$user['theme']; 8 10 $user_status = $user['status'] ; 9 11 10 12 $template->assign( 11 array( 13 array( 14 'version' => $version, 15 'cl_plugin' => $cl_plugin, 16 12 17 'fade_in' =>$autosize_parametres->fade_in, 13 18 'thumbnail' => $conf['prefix_thumbnail'], 14 19 'visible' => $visible, 15 'version' => $version, 20 16 21 'AUTOSIZE_PATH' => AUTOSIZE_PATH, 17 22 'theme' => $theme, -
extensions/Autosize/js/conflit.js
r7884 r7899 13 13 // jQuery est chargé 14 14 } 15 try { 16 Conflit = { version: Version }; 17 } catch (e) { 18 19 } 15 20 16 //=================================================== 21 17 var detect = navigator.userAgent.toLowerCase(); … … 309 305 var e_message = e.message; 310 306 var e_stack = e.stack; 307 var state_ff = ""; 311 308 if (e_stack) { //Firefox Opera 3.6 312 309 //=== test fichier source ============= … … 348 345 break; 349 346 } 350 if (Src_Match.match("jQuery" )) {347 if (Src_Match.match("jQuery", "gi")) { 351 348 callstack.push("jQuery"); 352 349 isCallstackPopulated = true; 350 353 351 break; 354 352 } … … 356 354 } 357 355 //callstack.shift(); 356 state_ff = callstack.join('\n'); 358 357 isCallstackPopulated = false; 359 358 } … … 391 390 392 391 currentFunction = currentFunction.caller; 392 var fn2 = currentFunction.toString(); // fonction d'appel local (conflit) 393 393 currentFunction = currentFunction.caller; 394 394 //$family … … 412 412 if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) { 413 413 states.push('jQuery'); 414 414 break; 415 415 } 416 416 if (fn.match(RegExp("dialog..open", "gi"))) { 417 417 states.push('GMaps'); 418 418 break; 419 419 } 420 420 if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) { 421 421 states.push('GMaps'); 422 422 break; 423 423 } 424 424 //====================== … … 426 426 427 427 states.push('paMOOramics'); 428 429 } 430 if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { 428 break; 429 } 430 //window_1290934905697_top 431 if (fn.match(RegExp("window_|WindowUtilities", "gi"))) { 432 states.push('rv_gmaps'); 433 break; 434 } 435 if (fn.match(RegExp("that.overlayOpacity", "gi"))) { 436 states.push('rv_gmaps'); 437 break; 438 } 439 if (fn.match(RegExp("For backward compatibility like win", "gi"))) { 440 states.push('rv_gmaps'); 441 break; 442 } 443 if (fn.match(RegExp("overlay_modal|HTMLDivElement|constraintPad", "gi"))) { 444 states.push('rv_gmaps'); 445 break; 446 } 447 448 if (fn.match(RegExp("__content|__method|observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { 431 449 states.push('rv_gmaps'); 432 450 break; 433 451 } 434 452 //? bubble … … 438 456 439 457 states.push('Luciano'); 440 458 break; 441 459 } 442 460 } 461 // "window.fireEvent('domready')" 462 Expression = new RegExp("window.fireEvent", "gi") 463 if (fn.match(Expression)) { //luciano 464 // "window.fireEvent('domready')" 465 Expression = new RegExp("window.fireEvent..domready..", "gi") 466 if (fn.match(Expression)) { 467 states.push('Luciano'); 468 break; 469 } 470 } 443 471 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano 444 472 445 473 states.push('Luciano'); 446 447 } 448 449 if (all_functions.length > 50) break; 474 break; 475 } 476 477 if (all_functions.length > 50) 478 break; 450 479 451 480 … … 454 483 455 484 } 485 // state_ff + "|" + 456 486 state = states.join('\n'); 487 if (state == "") { 488 if (DEBUG == "true") { 489 Fn = all_functions.join('\n'); 490 alert("non trouvé:" + Fn + "\n" + fn2 + "\n Firefox:" + state_ff); 491 } 492 state = state_ff; 493 } 494 457 495 Fn = all_functions; 458 return { state: state, fn: callstack.join('\n') };496 return { state: state, fn: callstack.join('\n'),fn1:fn2 }; 459 497 } 460 498 //==================================== … … 468 506 }); 469 507 //============================================== 508 librairies=[]; 470 509 jQuery.extend(jQuery.expr[':'], { 471 510 // Nom du sélecteur personnalisé … … 502 541 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) { 503 542 jQuery.noop; 504 543 librairies.push(a.src); 505 544 } 506 545 … … 514 553 * 515 554 */ 516 517 518 519 520 521 522 555 })(jQuery); 523 556 … … 539 572 540 573 } 541 if (typeof ($fn) != "function") { 542 $.fn = function (options) { 543 return jQuery.fn(options); 544 } 545 546 547 } 574 548 575 if (typeof ($.get) != "function") { 549 576 $.get = function (options) { … … 555 582 $_ = $; 556 583 function save_framework(page) { 557 Conflit = { version: Version }; 584 try { 585 Conflit = { version: Version, name: cl_plugin }; 586 } catch (e) { 587 588 } 589 558 590 $_ = $; 559 591 return -
extensions/Autosize/js/jquery.dimensions.js
r7867 r7899 145 145 } 146 146 if (elem == window) { 147 Position = { Top: 0, Left: 0 };147 Cl_Position = { Top: 0, Left: 0 }; 148 148 } else { 149 Position = jQuery(elem).position();150 } 151 Left = Position.left;152 Top = Position.top;149 Cl_Position = jQuery(elem).position(); 150 } 151 Left = Cl_Position.left; 152 Top = Cl_Position.top; 153 153 154 154 results = { … … 171 171 }, 172 172 /* 173 * Position de l'object elem173 * Cl_Position de l'object elem 174 174 */ 175 175 position: function () { -
extensions/Autosize/main.inc.php
r7886 r7899 13 13 //================================================================================= 14 14 $path = AUTOSIZE_PATH; 15 $plg_data = implode( '', file($path.'main.inc.php') );16 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )17 {18 $plugin['name'] = trim( $val[1] );19 }20 if (preg_match("|Version: (.*)|", $plg_data, $val))21 {22 $plugin['version'] = trim($val[1]);23 }24 if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )25 {26 $plugin['uri'] = trim($val[1]);27 }28 if ($desc = load_language('description.txt', $path.'/', array('return' => true)))29 {30 $plugin['description'] = trim($desc);31 }32 elseif ( preg_match("|Description: (.*)|", $plg_data, $val) )33 {34 $plugin['description'] = trim($val[1]);35 }36 if ( preg_match("|Author: (.*)|", $plg_data, $val) )37 {38 $plugin['author'] = trim($val[1]);39 }40 if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )41 {42 $plugin['author uri'] = trim($val[1]);43 }44 if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))45 {46 list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);47 if (is_numeric($extension)) $plugin['extension'] = $extension;48 }49 50 $plugin = array_map('htmlspecialchars', $plugin);51 15 //================================================================== 52 global $cl_version ;16 global $cl_version , $cl_plugin ; 53 17 $cl_version = $plugin; 18 $cl_plugin = $plugin; 54 19 include_once(AUTOSIZE_PATH.'autosize.inc.php'); 55 20 //================================================================== -
extensions/Autosize/template/autosize.tpl
r7867 r7899 7 7 8 8 <script type="text/javascript"> 9 var visible = '{$visible}'; 10 11 var DEBUG = '{$DEBUG}'; 12 var theme = '{$theme}'; 13 var Version = '{$version}'; 14 var cl_plugin = '{$cl_plugin}'; 15 9 16 var fade_in = '{$fade_in}'; 10 17 var cl_visible = "{$cl_visible}" =="true"; 11 var DEBUG = '{$DEBUG}';18 12 19 var thumbnail = '{$thumbnail}'; 13 var theme = '{$theme}'; 14 var visible = '{$visible}'; 15 var version = '{$version}'; 20 21 16 22 17 23 var scaled_width = '{$SCALED_WIDTH}'; // valeur par defaut -
extensions/Autosize/template/conflit.tpl
r7872 r7899 12 12 var theme = '{$theme}'; 13 13 var Version = '{$version}'; 14 var cl_plugin = '{$cl_plugin}'; 14 15 </script> 15 16 <!---FIN Autosize/template/confilt.tpl (/head) --->
Note: See TracChangeset
for help on using the changeset viewer.