Hey,
So browse image works. Problem is I want it to go to /www/images/, not /www/images/Image as it seems to append that and I can't find the place in the source code where I cut that out.
Can someone tell me where in the code that part is?
Thanks
So browse image works. Problem is I want it to go to /www/images/, not /www/images/Image as it seems to append that and I can't find the place in the source code where I cut that out.
Can someone tell me where in the code that part is?
Thanks
RE: Changing the browse image directory
(or any other connector you are using)
find:
ConfigUserFilesPath = "/UserFiles/"
change to:
ConfigUserFilesPath = "/"
find:
ConfigAllowedExtensions.Add "Image", "jpg|gif|jpeg|png|bmp"
ConfigDeniedExtensions.Add "Image", ""
change to:
ConfigAllowedExtensions.Add "images", "jpg|gif|jpeg|png|bmp"
ConfigDeniedExtensions.Add "images", ""
then do the same at:
fckeditor/editor/filemanager/upload/asp/config.asp
(or any other connector you are using)
RE: Changing the browse image directory
First set your relative path in /editor/filemanager/browser/default/connectors/php/config.php
$Config['UserFilesPath'] = '/www/' ;
Then create a new $Config['ConfigDirectories'] array value under each $Config['DeniedExtensions'] value. It'll look something like this:
$Config['AllowedExtensions']['File'] = array() ;
$Config['DeniedExtensions']['File'] = array('php','php3','php5','phtml','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','dll','reg','cgi') ;
$Config['ConfigDirectories']['File'] = '';
$Config['AllowedExtensions']['Image'] = array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;
$Config['ConfigDirectories']['Image'] = 'images';
$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;
$Config['ConfigDirectories']['Flash'] = 'flash';
$Config['AllowedExtensions']['Media'] = array('swf','fla','jpg','gif','jpeg','png','avi','mpg','mpeg') ;
$Config['DeniedExtensions']['Media'] = array() ;
$Config['ConfigDirectories']['Media'] = 'upload';
Now open up /editor/filemanager/browser/default/connectors/php/io.php
after ->
function GetUrlFromPath( $resourceType, $folderPath )
{
add -> global $Config ;
do the same after ->
function ServerMapFolder( $resourceType, $folderPath )
{
add -> global $Config ;
In function GetUrlFromPath change
return $GLOBALS["UserFilesPath"] . $resourceType . $folderPath ;
to
return $GLOBALS["UserFilesPath"] . $Config['ConfigDirectories'][$resourceType] . $folderPath ;
In function ServerMapFolder change
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $resourceType . '/' ;
to
$sResourceTypePath = $GLOBALS["UserFilesDirectory"] . $Config['ConfigDirectories'][$resourceType] . '/' ;
That worked for me. Don't forget to set your folder permissions to 777 on the server.