Login Retreive lost passwordRegister
Search

Forum Index / Feedback / FCKeditor and Google Chrome

[ This topic is solved ]

  Rick den Haan 03 September 08 / 11:10  
Google released their own browser yesterday, and I noticed FCKeditor wasn't compatible yet (the most recent beta is, but the one used in FormHandler isn't, at least for the site I'm working on at the moment, which uses an old version of FormHandler anyway).

The reason is not because FCKeditor is incompatible with Google Chrome, but because FCKeditor sniffs the user agent, and doesn't recognize Google Chrome.

A quick fix:

In FH3/includes/fckeditor.php, FH3/FHTML/FCKeditor/fckeditor_php4.php and FH3/FHTML/FCKeditor/fckeditor_php5.php there exists a function called IsCompatible(). Find it and change these lines:

<?php
        
else if ( strpos($sAgent'Gecko/') !== false )
        {
            
$iVersion = (int)substr($sAgentstrpos($sAgent'Gecko/') + 68) ;
            return (
$iVersion >= 20030210) ;
        }
        else
            return 
false ;
?>


to

<?php
        
else if ( strpos($sAgent'Gecko/') !== false )
        {
            
$iVersion = (int)substr($sAgentstrpos($sAgent'Gecko/') + 68) ;
            return (
$iVersion >= 20030210) ;
        }
        else if ( 
strpos($sAgent'AppleWebKit/') !== false )
        {
            
$iVersion = (int)substr($sAgentstrpos($sAgent'AppleWebKit/') + 126) ;
            return (
$iVersion >= 500);
        }
        else
            return 
false ;
?>


This should also make it (more) compatible with other browsers based on recent versions of Apple's WebKit rendering engine.

  Johan Wiegel (Admin) 15 September 08 / 19:08  
This is already applied in the latest FCK and the latest version of FH

  Top


powered by PHP-GLOBE   © 2004 - 2012 FormHandler. All rights reserved.   -   Open source license