Changeset 7895 for extensions/cl_conflit
- Timestamp:
- Nov 27, 2010, 6:14:46 PM (13 years ago)
- Location:
- extensions/cl_conflit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/cl_conflit/conflit.inc.php
r7880 r7895 33 33 static public function cl_conflit_script() 34 34 { 35 global $template,$user,$conf,$picture ,$page,$cl_ version;35 global $template,$user,$conf,$picture ,$page,$cl_plugin; 36 36 $my_path = basename(dirname(__FILE__)).'/' ; 37 37 $my_path = dirname(__FILE__).'/'; … … 40 40 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ; 41 41 $theme=$user['theme']; 42 42 43 43 $template->assign( 44 array( 'version' => $cl_version['version'] , 44 array( 45 'version' => $cl_plugin['version'] , 46 'name' => $cl_plugin['id'] , 45 47 'cl_conflit' => $cl_conflit , 46 48 'theme' => $theme , … … 58 60 static public function cl_conflit_script_2() 59 61 { 60 global $template,$user,$conf,$picture ,$page,$cl_ version;62 global $template,$user,$conf,$picture ,$page,$cl_plugin; 61 63 62 64 $my_path = basename(dirname(__FILE__)).'/' ; … … 67 69 68 70 $template->assign( 69 array('version' => $cl_version['version'] , 71 array( 72 'version' => $cl_plugin['version'] , 73 'name' => $cl_plugin['id'] , 70 74 'ma_page' => $page['body_id'], 71 75 'cl_conflit' => $cl_conflit , … … 92 96 static public function cl_conflit_script_3($content) 93 97 { 94 global $template,$user,$conf,$picture ,$page,$cl_ version;98 global $template,$user,$conf,$picture ,$page,$cl_plugin; 95 99 96 100 $my_path = basename(dirname(__FILE__)).'/' ; -
extensions/cl_conflit/include/affiche.php
r7880 r7895 1 1 <?php 2 3 $plg_data = implode( '', file($path.'main.inc.php') ); 4 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) ) 5 { 6 $plugin['name'] = trim( $val[1] ); 7 } 8 if (preg_match("|Version: (.*)|", $plg_data, $val)) 9 { 10 $plugin['version'] = trim($val[1]); 11 } 12 if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) ) 13 { 14 $plugin['uri'] = trim($val[1]); 15 } 16 if ($desc = load_language('description.txt', $path.'/', array('return' => true))) 17 { 18 $plugin['description'] = trim($desc); 19 } 20 elseif ( preg_match("|Description: (.*)|", $plg_data, $val) ) 21 { 22 $plugin['description'] = trim($val[1]); 23 } 24 if ( preg_match("|Author: (.*)|", $plg_data, $val) ) 25 { 26 $plugin['author'] = trim($val[1]); 27 } 28 if ( preg_match("|Author URI: (.*)|", $plg_data, $val) ) 29 { 30 $plugin['author uri'] = trim($val[1]); 31 } 32 if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid=')) 33 { 34 list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']); 35 if (is_numeric($extension)) $plugin['extension'] = $extension; 36 } 37 // IMPORTANT SECURITY ! 38 $plugin = array_map('htmlspecialchars', $plugin); 39 40 $version = $plugin['version'] ; 41 2 42 3 43 $visible=(isset($visible))?$visible:false; … … 6 46 $version=isset($version)?$version:""; 7 47 $theme=$user['theme']; 8 $user_status = $user['status'] ; 48 9 49 10 50 $template->assign( 11 51 array( 12 ' thumbnail' => $conf['prefix_thumbnail'],13 'visible' => $visible,52 'version' => $version, 53 'cl_plugin' => $cl_plugin, 14 54 'version' => $version, 15 55 'CONFLIT_PATH' => CONFLIT_PATH, 16 56 'theme' => $theme, 17 'SCALED_WIDTH' => $picture['current']['scaled_width'],18 'SCALED_HEIGHT' => $picture['current']['scaled_height'],19 'IMG_WIDTH' => $img_width,20 'IMG_HEIGHT' => $img_height,21 'MINI_HEIGHT' => $conflit_parametres->mini_height,22 'MINI_WIDTH' => $conflit_parametres->mini_width,23 'MARGE_BASSE' => $conflit_parametres->marge_basse,24 'ECHELLE_MAX' => $conflit_parametres->echelle_max,25 57 26 'check_auto_w' => ($conflit_parametres->check_auto_w == 'on') ? 'checked="checked"' : '' ,27 'check_icon_v' => ($conflit_parametres->check_icon_v == 'on') ? 'checked="checked"' : '' ,28 'check_desc_v' => ($conflit_parametres->check_desc_v == 'on') ? 'checked="checked"' : '' ,29 30 'webmaster_width' => $conflit_parametres->webmaster_width,31 'webmaster_height' => $conflit_parametres->webmaster_height,32 'webmaster_enabled' => ($conflit_parametres->webmaster_enabled == 'on') ? 'checked="checked"' : '' ,33 34 'admin_width' => $conflit_parametres->admin_width,35 'admin_height' => $conflit_parametres->admin_height,36 'admin_enabled' => ($conflit_parametres->admin_enabled == 'on') ? 'checked="checked"' : '' ,37 38 'generic_width' => $conflit_parametres->generic_width,39 'generic_height' => $conflit_parametres->generic_height,40 'generic_enabled' => ($conflit_parametres->generic_enabled == 'on') ? 'checked="checked"' : '' ,41 42 'guest_width' => $conflit_parametres->guest_width,43 'guest_height' => $conflit_parametres->guest_height,44 'guest_enabled' => ($conflit_parametres->guest_enabled == 'on') ? 'checked="checked"' : '' ,45 46 'normal_width' => $conflit_parametres->normal_width,47 'normal_height' => $conflit_parametres->normal_height,48 'normal_enabled' => ($conflit_parametres->normal_enabled == 'on') ? 'checked="checked"' : '' ,49 50 'user_status' => get_user_status($user_status)51 58 52 59 ) -
extensions/cl_conflit/js/conflit.js
r7880 r7895 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(); … … 145 141 } 146 142 } else if (element == document) { 143 144 ret_element = jQuery(element); 145 return ret_element; 146 147 148 } else if (element == window) { 147 149 148 150 ret_element = jQuery(element); … … 304 306 var e_message = e.message; 305 307 var e_stack = e.stack; 308 var state_ff = ""; 306 309 if (e_stack) { //Firefox Opera 3.6 307 310 //=== test fichier source ============= … … 343 346 break; 344 347 } 345 if (Src_Match.match("jQuery" )) {348 if (Src_Match.match("jQuery", "gi")) { 346 349 callstack.push("jQuery"); 347 350 isCallstackPopulated = true; 351 348 352 break; 349 353 } … … 351 355 } 352 356 //callstack.shift(); 357 state_ff = callstack.join('\n'); 353 358 isCallstackPopulated = false; 354 359 } … … 386 391 387 392 currentFunction = currentFunction.caller; 393 var fn2 = currentFunction.toString(); // fonction d'appel local (conflit) 388 394 currentFunction = currentFunction.caller; 389 395 //$family … … 407 413 if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) { 408 414 states.push('jQuery'); 409 415 break; 410 416 } 411 417 if (fn.match(RegExp("dialog..open", "gi"))) { 412 418 states.push('GMaps'); 413 419 break; 414 420 } 415 421 if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) { 416 422 states.push('GMaps'); 417 423 break; 418 424 } 419 425 //====================== … … 421 427 422 428 states.push('paMOOramics'); 423 429 break; 424 430 } 425 431 if (fn.match(RegExp("observe|responder|stopobserving|fireContentLoadedEvent", "gi"))) { 426 432 states.push('rv_gmaps'); 427 433 break; 428 434 } 429 435 //? bubble … … 433 439 434 440 states.push('Luciano'); 435 441 break; 436 442 } 437 443 } 444 // "window.fireEvent('domready')" 445 Expression = new RegExp("window.fireEvent", "gi") 446 if (fn.match(Expression)) { //luciano 447 // "window.fireEvent('domready')" 448 Expression = new RegExp("window.fireEvent..domready..", "gi") 449 if (fn.match(Expression)) { 450 states.push('Luciano'); 451 break; 452 } 453 } 438 454 if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) { //luciano 439 455 440 456 states.push('Luciano'); 441 442 } 443 444 if (all_functions.length > 50) break; 457 break; 458 } 459 460 if (all_functions.length > 50) 461 break; 445 462 446 463 … … 449 466 450 467 } 468 // state_ff + "|" + 451 469 state = states.join('\n'); 470 if (state == "") 471 state = state_ff; 472 452 473 Fn = all_functions; 453 474 return { state: state, fn: callstack.join('\n') }; … … 463 484 }); 464 485 //============================================== 486 librairies=[]; 465 487 jQuery.extend(jQuery.expr[':'], { 466 488 // Nom du sélecteur personnalisé … … 497 519 if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) { 498 520 jQuery.noop; 499 521 librairies.push(a.src); 500 522 } 501 523 … … 534 556 535 557 } 536 if (typeof ($fn) != "function") { 537 $.fn = function (options) { 538 return jQuery.fn(options); 539 } 540 541 542 } 558 543 559 if (typeof ($.get) != "function") { 544 560 $.get = function (options) { … … 550 566 $_ = $; 551 567 function save_framework(page) { 552 Conflit = { version: Version }; 568 try { 569 Conflit = { version: Version, name: cl_plugin }; 570 } catch (e) { 571 572 } 573 553 574 $_ = $; 554 575 return -
extensions/cl_conflit/main.inc.php
r7882 r7895 12 12 if (!defined('CONFLIT_PATH')) 13 13 define( 'CONFLIT_PATH', PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' ); 14 15 include_once(CONFLIT_PATH.'conflit.inc.php'); 16 global $cl_version,$cl_plugin ; 17 //=================================================================== 18 $path = CONFLIT_PATH; 19 $plg_data = implode( '', file($path.'main.inc.php') ); 20 if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) ) 21 { 22 $plugin['name'] = trim( $val[1] ); 23 } 24 if (preg_match("|Version: (.*)|", $plg_data, $val)) 25 { 26 $plugin['version'] = trim($val[1]); 27 } 28 if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) ) 29 { 30 $plugin['uri'] = trim($val[1]); 31 } 32 if ($desc = load_language('description.txt', $path.'/', array('return' => true))) 33 { 34 $plugin['description'] = trim($desc); 35 } 36 elseif ( preg_match("|Description: (.*)|", $plg_data, $val) ) 37 { 38 $plugin['description'] = trim($val[1]); 39 } 40 if ( preg_match("|Author: (.*)|", $plg_data, $val) ) 41 { 42 $plugin['author'] = trim($val[1]); 43 } 44 if ( preg_match("|Author URI: (.*)|", $plg_data, $val) ) 45 { 46 $plugin['author uri'] = trim($val[1]); 47 } 48 if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid=')) 49 { 50 list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']); 51 if (is_numeric($extension)) $plugin['extension'] = $extension; 52 } 53 54 $plugin = array_map('htmlspecialchars', $plugin); 14 15 $path = CONFLIT_PATH; 16 17 //============================================================================ 18 global $cl_version , $cl_plugin ; 55 19 $cl_version = $plugin; 56 //============================================================================ 57 58 20 $cl_plugin = $plugin; 21 //============================================================================ 22 include_once(CONFLIT_PATH.'conflit.inc.php'); 59 23 $conflit_controler = new conflit_controler(); 60 24 -
extensions/cl_conflit/template/conflit.tpl
r7880 r7895 8 8 var DEBUG = '{$DEBUG}'; 9 9 var theme = '{$theme}'; 10 var Version = '{$version}' ; 10 var Version = '{$version}'; 11 var cl_plugin = '{$cl_plugin}'; 11 12 </script>
Note: See TracChangeset
for help on using the changeset viewer.