I could not get FCKeditor (PHP server side) to work after reading throught all the bugs and this help forum.
I created a simple test.php page http://www.aznblood.net/archive/test.php
Here is the code behind the page:
------------------------------------------
<? require("FCKeditor/fckeditor.php"); ?>
RE: PHP: Toolbox does not show
I found the solution.
The reason that the toolbar did not show was that in the file fckeditor.php, FCK checked for browser compatibility first, before it determined wether to parse the html with iframe (toolbar), or parse regular textarea (to toolbar).
For whatever reasons, FCK couldn't determined my browser compatiblity by checking the environmental variable $_SERVER['HTTP_USER_AGENT'], well, at the end of that function, i forced IsCompatible to return true by changing the last statement to return true, instead of return false. Good luck
function IsCompatible()
{
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
return ($iVersion >= 5.5) ;
}
else if ( strpos($sAgent, 'Gecko') !== false )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
return ($iVersion >= 20030210) ;
}
else{
return true ;
}
}
RE: PHP: Toolbox does not show
Could you please tell us your browser version exactly?
Could you also create a test PHP page with the following code and tell us the result?
echo $_SERVER['HTTP_USER_AGENT'] ;
Thanks in advance,
FredCK
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
RE: PHP: Toolbox does not show
and will be happy to provide info or whatever you need FredCK....
I am running PHP 5.03 on 2k3
everything is working fine on windows client machine tool bar shows and everything... however.. on Solaris clients using Netscape 7.0.. the tool bar does not show. no error just an empty white box. odd. suggestions?
RE: PHP: Toolbox does not show
I'm having a similar problem on my laptop, in IE it goes directly into a basic text box with no buttons or options whatsoever.
this is what the server variable contains, there's obviously no version numbers. I reinstalled MSIE yesterday to :
latest version 6.0.2800.1106 w/SP1
SERVER_SOFTWARE = Apache/2.0.53 (Win32) PHP/5.0.3
HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE; Windows; .NET CLR 1.1.4322)
RE: PHP: Toolbox does not show
RE: PHP: Toolbox does not show
I use PHP 4. here is more info on the settings:
http://www.aznblood.net/archive/test.php
I dont know why, but $_SERVER['HTTP_USER_AGENT'] returns null.
I tried $HTTP_USER_AGENT and I got a positive response. Do know what what's the matter FCK?
RE: PHP: Toolbox does not show
Take a look here:
http://www.php.net/manual/en/tutorial.useful.php
And here:
http://www.php.net/manual/en/tutorial.oldcode.php
Something must be done in the code to make it compatible with PHP version older than 4.1.0.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
RE: PHP: Toolbox does not show
I don't have a PHP 4.0.x environment, so I need your help to test it...
In the IsCompatible function, replace the following line:
---
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
---
with:
---
global $HTTP_USER_AGENT ;
if ( isset( $HTTP_USER_AGENT ) )
$sAgent = $HTTP_USER_AGENT ;
else
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
---
And let us know the results.
Thanks in advance,
FredCK
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
RE: PHP: Toolbox does not show
Can this work with out the iframes?
RE: PHP: Toolbox does not show
Function replace didnt solve it
FCK works in IE, but in firefox 1.1 not
peace
RE: PHP: Toolbox does not show
ps
anyone knows what this mean ? can you help me ?
Error: this.DOMDocument has no properties
At http://www.topmarket.pl/htmlarea/editor ... gecko_2.js
Row: 23
RE: PHP: Toolbox does not show
Anyone know how to get around this?
RE: PHP: Toolbox does not show
Well.. im not sure if this is the place to put it.. but I am using some PHP script to detect what browser is being used.. then display appropirate html:
browsers.
Posted by blichmann on the php doco... works friggin great!!!
_______________________________________________
feedback at blichmann dot de (28-Mar-2003 01:13)
Using the browscap.ini is IMHO not such a terrible efficient way to do simple browser/OS detection.
The following script might be sufficient for those of you checking for standard (compliant
It was taken from a small tool-library and allows you to check for a browser like this:
if (NW_IS_IE >= 4 && NW_IS_SOLARIS)
// user is running MSIE in a Solaris Environment
do_this();
else
// must be something else
do_that();
==== 8< ==== SNIP ==== 8< ====
// Temporary Variables
// The useragent string (lowercase to simplify testing)
$_nw_ua = strtolower(@$_SERVER["HTTP_USER_AGENT"]);
// Browser Detection { ======================================================
// Version checking, each one of these will take a float value describing the
// version number, or - if the user is not using that browser - zero.
// Generic code-name "Mozilla" version
define("NW_MOZ_VERSION", preg_match('/mozilla\/(\d+\.\d+)/',
$_nw_ua, $_nw_v) ? (float)$_nw_v[1] : 0);
// KDE's Konqueror
define("NW_IS_KONQ", preg_match('/konqueror\/(\d+\.\d+)/',
$_nw_ua, $_nw_v) ? (float) $_nw_v[1] : 0);
// Opera software Opera
define("NW_IS_OPERA", preg_match('/opera[\s\/](\d+\.\d+)/',
$_nw_ua, $_nw_v) ? (float) $_nw_v[1] : 0);
// Microsoft Internet Explorer
define("NW_IS_IE", !NW_IS_OPERA && preg_match('/msie (\d+\.\d+)/',
$_nw_ua, $_nw_v) ? (float) $_nw_v[1] : 0);
// Gecko-based browsers, such as Mozilla, Netscape 6, DocZilla,
// K-Meleon, etc.
define("NW_IS_GECKO", preg_match('/gecko\/(\d+)/',
$_nw_ua, $_nw_v) ? (float) $_nw_v[1] : 0);
// Netscape Navigator (all versions, including Gecko-based browsers)
define("NW_IS_NN", NW_IS_GECKO ? (preg_match('/netscape6*\/(\d+.\d+)/', $_nw_ua, $_nw_v) ?
(float) $_nw_v[1] : 0) : ((!NW_IS_OPERA && !NW_IS_KONQ && !NW_IS_IE) ?
NW_MOZ_VERSION : 0));
// An old 3rd generation web browser
define("NW_IS_GEN3", NW_IS_NN < 4 || NW_IS_OPERA < 4 || NW_IS_IE < 4 || NW_MOZ_VERSION < 4);
// } Browser Detection ======================================================
// Generic Platform Detection { =============================================
define("NW_IS_LINUX", strstr($_nw_ua, "linux") !== false);
define("NW_IS_MAC", strstr($_nw_ua, "mac") !== false);
define("NW_IS_SOLARIS", (strstr($_nw_ua, "solaris") !== false) ||
(strstr($_nw_ua, "sunos") !== false));
define("NW_IS_X11", strstr($_nw_ua, "x11") !== false);
define("NW_IS_WINDOWS", strstr($_nw_ua, "win") !== false);
define("NW_IS_OS2", strstr($_nw_ua, "os2") !== false);
// } Generic Platform Detection =============================================
unset($_nw_ua, $_nw_v); // clean-up
==== 8< ==== SNIP ==== 8< ====
RE: PHP: Toolbox does not show
I tried and tried different ways to display the html.. but no workie! so anway.. im using the above php code to detect for brower to display either textarea or iframe as aappropirate.
RE: PHP: Toolbox does not show
I've the same Problem on my mac, if I open the editor with the apple-browser "Safari" (on Mac OS X 10.3.9) only a textarea can be seen with the html-code of the site I want to edit.
On my windows-xp with ie6 it works fine.
On my mac "echo $_SERVER['HTTP_USER_AGENT'] ; " prints "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/312.1 (KHTML, like Gecko) Safari/312"