Changeset 7899


Ignore:
Timestamp:
Nov 28, 2010, 11:06:31 AM (13 years ago)
Author:
cljosse
Message:

[cl_conflit] fix conflict with rv_gmaps

Location:
extensions/Autosize
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/admin/admin_autosize.php

    r6978 r7899  
    130130
    131131$version = $plugin['version'] ;
     132$cl_plugin=$plugin['description'];
    132133         $autosize_parametres = cl_autosize_Get_Options();
    133 
    134 
    135          
     134         
    136135   if (isset($_POST['submit']))  { 
    137136          if ($_POST['submit'] == l10n('cl_autosize_save'))  { 
  • extensions/Autosize/autosize.inc.php

    r7872 r7899  
    134134 static public function cl_autosize_script_3($content)
    135135 {
    136            global  $template,$user,$conf,$picture ,$page;
     136           global  $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ;
    137137           //userDefManage ??
    138138                $my_path =  basename(dirname(__FILE__)).'/' ;
    139139            $my_path = dirname(__FILE__).'/';
    140                         $debug = isset($conf['debug']) ? $conf['debug'] : false ;
    141                         $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;
     140                $debug = isset($conf['debug']) ? $conf['debug'] : false ;
     141                $cl_conflit =  isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ;
    142142
    143143$ThePicture = $template->get_template_vars('current');
     
    159159
    160160                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
    181162
    182163 }// function cl_autosize_script_3
     
    184165 static public function cl_autosize_script_2()
    185166 {
    186            global  $template,$user,$conf,$picture ,$page;
     167           global  $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ;
    187168           //userDefManage ??
    188169                        $my_path =  basename(dirname(__FILE__)).'/' ;
     
    192173                        $theme=$user['theme'];
    193174                        $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'],
    195179                                        'cl_conflit' => $cl_conflit  ,
    196180                                        'theme' => $theme  ,
     
    198182                                        'AUTOSIZE_PATH' => AUTOSIZE_PATH)
    199183                                                );
    200                                                  
     184                                                 global $cl_plugin;
     185 
    201186$autoscript="<script type='text/javascript'>
    202187if (typeof (save_framework) == 'function')
     
    205190                         $template->append('footer_elements',$autoscript); 
    206191                         return ;
    207 
    208 
    209192                        $template->set_filenames(
    210193                     array('autosize_init'=>$my_path. "template/cl_conflit.tpl" 
    211194                         )
    212195                      );               
    213                          
    214                        
    215                        
    216                          
    217 
    218 
    219196if(     $page['body_id'] == 'theAdminPage' ) return ;
    220197
     
    228205 static public function cl_autosize_script()
    229206        {
    230            global  $template,$user,$conf,$picture ,$page,$cl_version;
     207           global  $template,$user,$conf,$picture ,$page,$cl_version, $cl_plugin ;
    231208                $my_path =  basename(dirname(__FILE__)).'/' ;
    232209            $my_path = dirname(__FILE__).'/';
     
    237214                         
    238215                $template->assign(
    239                                                 array( 'version' => $cl_version['version'] ,
     216                                                array(
     217                                                'cl_plugin' => $cl_version['id'] ,
     218                                                'version' => $cl_version['version'] ,
    240219                                                'cl_conflit' => $cl_conflit  ,
    241220                                                'theme' => $theme  ,
     
    253232static public function cl_ajuste_data($content){
    254233           global  $template,$user,$conf,$picture ;
    255                         $my_path = realpath(AUTOSIZE_PATH .'/');
     234         $my_path = realpath(AUTOSIZE_PATH .'/');
    256235         $userdata=$user;
    257236         $fields = array( 'maxwidth', 'maxheight' );
  • extensions/Autosize/include/affiche.php

    r7725 r7899  
    44$img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
    55$img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
     6
    67$version=isset($version)?$version:"";
     8$cl_plugin=isset($cl_plugin)?$cl_plugin:"";
    79$theme=$user['theme'];
    810$user_status = $user['status'] ;
    911
    1012        $template->assign(
    11                                         array(
     13                                        array( 
     14                                        'version' => $version,
     15                                        'cl_plugin' => $cl_plugin,
     16
    1217                                        'fade_in' =>$autosize_parametres->fade_in,
    1318                                        'thumbnail' => $conf['prefix_thumbnail'],
    1419                    'visible' => $visible,
    15                     'version' => $version,
     20
    1621                    'AUTOSIZE_PATH' => AUTOSIZE_PATH,
    1722                    'theme' => $theme,
  • extensions/Autosize/js/conflit.js

    r7884 r7899  
    1313    // jQuery est chargé
    1414}
    15 try {
    16     Conflit = { version: Version };
    17 } catch (e) {
    18 
    19 }
     15
    2016//===================================================
    2117var detect = navigator.userAgent.toLowerCase();
     
    309305        var e_message = e.message;
    310306        var e_stack = e.stack;
     307        var state_ff = "";
    311308        if (e_stack) { //Firefox Opera 3.6
    312309            //=== test fichier source =============
     
    348345                        break;
    349346                    }
    350                     if (Src_Match.match("jQuery")) {
     347                    if (Src_Match.match("jQuery", "gi")) {
    351348                        callstack.push("jQuery");
    352349                        isCallstackPopulated = true;
     350                     
    353351                        break;
    354352                    }
     
    356354            }
    357355            //callstack.shift();
     356            state_ff = callstack.join('\n');
    358357            isCallstackPopulated = false;
    359358        }
     
    391390
    392391        currentFunction = currentFunction.caller;
     392        var fn2 = currentFunction.toString(); // fonction d'appel local (conflit)
    393393        currentFunction = currentFunction.caller;
    394394        //$family
     
    412412            if (fn.match(RegExp("jquery|switchmenu|switchTabs|switchInterface|gally|initializeImageMode", "gi"))) {
    413413                states.push('jQuery');
    414 
     414                break;
    415415            }
    416416            if (fn.match(RegExp("dialog..open", "gi"))) {
    417417                states.push('GMaps');
    418 
     418                break;
    419419            }
    420420            if (fn.match(RegExp("GMaps|applyMap|markupMaps|applyMarkers", "gi"))) {
    421421                states.push('GMaps');
    422 
     422                break;
    423423            }
    424424            //======================
     
    426426
    427427                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"))) {
    431449                states.push('rv_gmaps');
    432 
     450                break;
    433451            }
    434452            //? bubble 
     
    438456
    439457                    states.push('Luciano');
    440 
     458                    break;
    441459                }
    442460            }
     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            }
    443471            if (fn.match(RegExp("(splat|buildFrameWork|photoNext)", "gi"))) {  //luciano
    444472
    445473                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;
    450479
    451480
     
    454483
    455484    }
     485  // state_ff + "|" +
    456486    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
    457495    Fn = all_functions;
    458     return { state: state, fn: callstack.join('\n') };
     496    return { state: state, fn: callstack.join('\n'),fn1:fn2 };
    459497}
    460498//====================================
     
    468506    });
    469507    //==============================================
     508    librairies=[];
    470509    jQuery.extend(jQuery.expr[':'], {
    471510        // Nom du sélecteur personnalisé
     
    502541                    if (a.src.match(RegExp("mootools|pamooramic|luciano", "gi"))) {
    503542                        jQuery.noop;
    504 
     543                        librairies.push(a.src);
    505544                    }
    506545
     
    514553    *
    515554    */
    516 
    517 
    518 
    519 
    520 
    521 
    522555})(jQuery);
    523556
     
    539572
    540573}
    541 if (typeof ($fn) != "function") {
    542     $.fn = function (options) {
    543         return jQuery.fn(options);
    544     }
    545 
    546 
    547 }
     574
    548575if (typeof ($.get) != "function") {
    549576    $.get = function (options) {
     
    555582$_ = $;
    556583function save_framework(page) {
    557     Conflit = { version: Version };
     584    try {
     585        Conflit = { version: Version, name: cl_plugin };
     586    } catch (e) {
     587
     588    }
     589   
    558590    $_ = $;
    559591    return
  • extensions/Autosize/js/jquery.dimensions.js

    r7867 r7899  
    145145                }
    146146                if (elem == window) {
    147                     Position = { Top: 0, Left: 0 };
     147                    Cl_Position = { Top: 0, Left: 0 };
    148148                } 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;
    153153
    154154                results = {
     
    171171        },
    172172        /*
    173         * Position de l'object elem
     173        * Cl_Position de l'object elem
    174174        */
    175175        position: function () {
  • extensions/Autosize/main.inc.php

    r7886 r7899  
    1313//=================================================================================
    1414        $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);
    5115//==================================================================     
    52                   global $cl_version ;
     16                  global $cl_version , $cl_plugin ;
    5317                  $cl_version = $plugin;
     18                  $cl_plugin = $plugin;
    5419include_once(AUTOSIZE_PATH.'autosize.inc.php');
    5520//==================================================================
  • extensions/Autosize/template/autosize.tpl

    r7867 r7899  
    77
    88 <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
    916    var fade_in = '{$fade_in}';
    1017    var cl_visible = "{$cl_visible}" =="true";
    11     var DEBUG = '{$DEBUG}';
     18   
    1219    var thumbnail = '{$thumbnail}';
    13     var theme = '{$theme}';
    14     var visible = '{$visible}';
    15     var version = '{$version}';
     20 
     21
    1622
    1723    var scaled_width =  '{$SCALED_WIDTH}'; // valeur par defaut
  • extensions/Autosize/template/conflit.tpl

    r7872 r7899  
    1212    var theme = '{$theme}';
    1313    var Version = '{$version}';
     14    var cl_plugin = '{$cl_plugin}';
    1415</script>
    1516<!---FIN Autosize/template/confilt.tpl (/head) --->     
Note: See TracChangeset for help on using the changeset viewer.