Title PHP integration : textarea variable with slash problem
changed to FCKeditor 2.6.5 and File Manager 5.20,
because a slash in code is not a problem (see why in this topic).
Hi friendz !
First of all, please be cool with my bad english writing, I don't speack it very good...
And my PHP knowledge is worste.
But I've already installed and adapted a lot of scripts, those last years.
Today, I'm trying to install a website backoffice, to manage files, and to edit them with a wysiwyg editor.
I didn't found one corresponding enough to what I want, or working on my free (and of course limited) FTP account (free.fr).
So, I tried to install FCKeditor into a PHP file manager with simple text editor.
I've chosen File Manager 5.20, wich is working pretty well on my FTP account.
http://www.gerd-tentler.de/tools/index.html
Unfortunately,
FM520's TEXTAREA variable
has not the same form than all I can read on the web about
FCKeditor's $oFCKeditor = new FCKeditor and $oFCKeditor->Value...
And of course, the result is : I can't see files content in FCKeditor.
Give a look at that :
print "<textarea name=\"fmText\" style=\"width:{$width}px; height:{$height}px\" "; print "wrap=\"off\" class=\"fmField\">" . htmlspecialchars($content) . "</textarea>\n";
It is not textarea name="fmText", but textarea name=\"fmText\"...
And of course,
when I replace this previous code by this :
$oFCKeditor = new FCKeditor('fmText') ; $oFCKeditor->BasePath = '../fckeditor/' ; $oFCKeditor->Value = $fmText ; $oFCKeditor->Create() ;
... I can see FCKeditor, but it doesn't show the file content...
I tried plenty things, with or without ", ', or $, and lot more, but no way.
If someone can help me, it would be appreciated.
Re: PHP integration : textarea variable with slash problem
OK... Erhmmm...
I think I've understood the slash problem, which is not a problem.
http://www.commentcamarche.net/contents/php/phpvar.php3
Here, they explain that [ /" ] is the same as [ " ]
So, textarea name=\"fmText\" must be the same as textarea name="fmText"
So, fmText is the FCKeditor variable to use.
But FCKeditor doesn't want to work...
Look what I've done :
I've unzipped FCKeditor and uploaded files in the fckeditor directory (created before in my FileManager520 directory).
The FileManager520 script has a editor.php file in his class directory, the textarea is in it.
FileManager520 script : http://www.gerd-tentler.de/tools/filemanager/index.php
In line 2 of editor.php, the FCK editor include :
After that, the textarea replacement (put it in comment) :
Then, I can see FCKeditor, but with a blank screen : it doesn't show files content.

What's wrong...?!? Please...
Re: FCKeditor 2.6.5 and File Manager 5.20
It's OK now !
With this code :
I was thinking that
$oFCKeditor = new FCKeditor
and
$oFCKeditor->Value
were needing the same fmText variable...
So, it works...
But.
There's ALWAYS a "but"... What were you thinking ?
FCKeditor adds <P> and </P> to txt files.
So, now, I need to know if there's a way to gest that in FCKeditor...
If not, I'll have to give a look at pXp (phpXplorer) and the TinyMCE replacement by FCKeditor.
Because pXp doesn't use txt and html files the same way : it uses 2 editors.