Originally Posted by slec75
Everything runs perfectly at localhost but doesn't work properly for the distant host...
I have setup some tuts on FCKeditor's forum... Here is a guide for you so long:
In order to have FCKeditor work with certain not up to date or clued up hosts;
You may need to have this setup:
* register_long_arrays - not required
* register_globals - not required
* disabled safe_mode - odd but required
* magic quotes - not required
There may be a patch for safe_mode to stay enabled and FCKeditor run along side it - really not sure
How to get this thing to work??? [edit..
PHP Method below edit
<?php include_once("../FCKeditor/fckeditor.php") ; ?>
// Please note the spelling of FCKeditor
In BETWEEN the <head tags> (normally above </head>)add this;
window.onload = function()
var oFCKeditor = new FCKeditor( 'data' ) ; //The textareas name
oFCKeditor.BasePath = "../FCKeditor/" ;
oFCKeditor.Height = "400" ;
oFCKeditor.Width = "100%" ;
oFCKeditor.ToolbarSet = 'Default' ; //The toolbar you want to use
Now with these ADDitions you should now have a workin copy of FCKeditor in Dreamweaver (ASP, PHP, Whatever you use, etc...)
How to go about getting the correct paths?
$Config['UserFilesPath'] = 'uploads/' ; //uploads directory
Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
$Config['UserFilesAbsolutePath'] = '/var/www/vhosts/example.com/webfiles/uploads/' ;
When an image is inserted into the editor it is a virtual path "/path/image.gif".
How to get the full path "http://www.example.com/path/image.gif"?
* open "editor/filemanager/browser/default/frmresourceslist.html"
* edit the line below "oListManager.GetFileRowHtml = function( fileName, fileUrl, fileSize )" which should be around line 65
* from: var sLink = '<a href="#" onclick="OpenFile(\'' + ProtectPath( fileUrl ) + '\');return false;">' ;
to: var sLink = '<a href="#" onclick="OpenFile(\'http://www.example.com' + fileUrl + '\');return false;">' ;
Now it will insert the full path to your image in the editor window.
(note: you have to close your browser and reopen to take effect)
You may be able to use this method below instead of above... // I have not tested this method, my above methods work fine.
$Config['UserFilesPath'] = 'http://'.$_SERVER['HTTP_HOST'].'/FCKeditor/uploadfiles/' ;
$Config['UserFilesAbsolutePath'] = $_SERVER['DOCUMENT_ROOT'].'/FCKeditor/uploadfiles/' ;
I hope that covers most of the beginner Q & A's