$oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = 'FCKeditor/'; $oFCKeditor->Width = '100%' ; $oFCKeditor->Height = '400' ; if ( isset($_GET['Lang']) ) { $oFCKeditor->Config['AutoDetectLanguage'] = false ; $oFCKeditor->Config['DefaultLanguage'] = $_GET['Lang'] ; } else { $oFCKeditor->Config['AutoDetectLanguage'] = true ; $oFCKeditor->Config['DefaultLanguage'] = 'de' ; } $oFCKeditor->Value = 'Hier können Sie Text eingeben und Bilder einfügen.'; $oFCKeditor->Create() ;
in fckconfig.js leave the code as is:
FCKConfig.BaseHref = '' ;
in FCKeditor/editor/filemanager/upload/php/config.php
you can set the path to the directory of the users images. I did it like this: // Path to uploaded files relative to the document root. $dir = $_SESSION['userdir']; $Config['UserFilesPath'] = '/koeln/UserFiles/'.$dir.'/Image/' ; The code must end with /Image/ . Now, when you insert an image, klicking on the Upload-Tab (where two buttons are: "Search" and "Send it to server") and uploading an image should work correct, the image will be previewed also.
in FCKeditor/editor/filemanager/browser/connectors/default/php/config.php:
allthough the path should be the same, you have to put an other path here:
// SECURITY: You must explicitelly enable this "connector". (Set it to "true"). $Config['Enabled'] = true ;
// Path to user files relative to the document root. $dir = $_SESSION['userdir']; $Config['UserFilesPath'] = '/koeln/UserFiles/'.$dir.'/' ;
// Fill the following value it you prefer to specify the absolute path for the // user files directory. Usefull if you are using a virtual directory, symbolic // link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'. // Attention: The above 'UserFilesPath' must point to the same directory. $Config['UserFilesAbsolutePath'] = '' ;
if you have php with safe mode = on you'll have to create the directories with ftp as shown in the other thread.
Hm - I'm not sure if this is what you exactly wanted to know, but I hope it helps somebody somehow.
We also would like to get away from using the absolute path (/user123/images/image.gif), and use instead relative (./images/image.gif) which has some technical advantages on our system. However when doing the latter, images do not show up in the editor, which is a problem.
We are currently using a php level workaround at runtime, but wanted to know if there is any way to do it with the configuration file. Trying FCKConfig.BaseHref = '/user123'; or anything similar did not seem to work.
RE: FCKConfig.BaseHref and images
$oFCKeditor = new FCKeditor('FCKeditor1') ;
$oFCKeditor->BasePath = 'FCKeditor/';
$oFCKeditor->Width = '100%' ;
$oFCKeditor->Height = '400' ;
if ( isset($_GET['Lang']) )
{
$oFCKeditor->Config['AutoDetectLanguage'] = false ;
$oFCKeditor->Config['DefaultLanguage'] = $_GET['Lang'] ;
}
else
{
$oFCKeditor->Config['AutoDetectLanguage'] = true ;
$oFCKeditor->Config['DefaultLanguage'] = 'de' ;
}
$oFCKeditor->Value = 'Hier können Sie Text eingeben und Bilder einfügen.';
$oFCKeditor->Create() ;
in fckconfig.js leave the code as is:
FCKConfig.BaseHref = '' ;
in FCKeditor/editor/filemanager/upload/php/config.php
you can set the path to the directory of the users images.
I did it like this:
// Path to uploaded files relative to the document root.
$dir = $_SESSION['userdir'];
$Config['UserFilesPath'] = '/koeln/UserFiles/'.$dir.'/Image/' ;
The code must end with /Image/ .
Now, when you insert an image, klicking on the Upload-Tab (where two buttons are: "Search" and
"Send it to server") and uploading an image should work correct, the image will be previewed also.
in FCKeditor/editor/filemanager/browser/connectors/default/php/config.php:
allthough the path should be the same, you have to put an other path here:
// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true ;
// Path to user files relative to the document root.
$dir = $_SESSION['userdir'];
$Config['UserFilesPath'] = '/koeln/UserFiles/'.$dir.'/' ;
// Fill the following value it you prefer to specify the absolute path for the
// user files directory. Usefull if you are using a virtual directory, symbolic
// link or alias. Examples: 'C:\\MySite\\UserFiles\\' or '/root/mysite/UserFiles/'.
// Attention: The above 'UserFilesPath' must point to the same directory.
$Config['UserFilesAbsolutePath'] = '' ;
if you have php with safe mode = on you'll have to create the directories with ftp as shown in
the other thread.
Hm - I'm not sure if this is what you exactly wanted to know, but I hope it helps somebody somehow.
Greets
Bernd
RE: FCKConfig.BaseHref and images
RE: FCKConfig.BaseHref and images
We also would like to get away from using the absolute path (/user123/images/image.gif), and use instead relative (./images/image.gif) which has some technical advantages on our system. However when doing the latter, images do not show up in the editor, which is a problem.
We are currently using a php level workaround at runtime, but wanted to know if there is any way to do it with the configuration file. Trying FCKConfig.BaseHref = '/user123'; or anything similar did not seem to work.
Any ideas?
RE: FCKConfig.BaseHref and images
RE: FCKConfig.BaseHref and images
http://blog.taragana.com/index.php/arch ... ndent-way/
http://localhost/user/web/index.php?any ... u&may=have
http://www.abc.com/index.htmlhttp://www.abc.com/
RE: FCKConfig.BaseHref and images
RE: FCKConfig.BaseHref and images