Hello - I am trying to search sourceforge for hints on how to get the images browser for uploads to work, but it looks like it is a combination between fckconfig.js and other files. I am not sure if it is a bug or something I simply am not doing. I get the feeling it is trying to load them up to the root of the webserver, but I have no access there on my shared host.

Can you kindly include a few words about how to do this in the readme file? I cannot find any comprehensive docs on this at all. Any advice appreciated!

Thanks very much.

Regards
Rick

Comments

jtite’s picture

Assigned: Unassigned » jtite

Now you can download the lastest version from CVS, it includes a server side integration pack that allows to browse and upload files to server

Rick Cogley’s picture

THank you JTite.
I downloaded and installed the CVS version, and looked around but don't find anything that states specifically how to make this work. Are you talking about configuring the fckconfig.js file?

Please advise.

Cheers,
Rick Cogley
Tokyo

jtite’s picture

To enable the File Browser (server side integration pack) follow these steps

1. Make sure you download the sspi folder from the CVS to your modules/fckeditor directory.

2. Edit the fckconfig.js file under modules/fckeditor/lib directory and set the FCKConfig.LinkBrowserURL and FCKConfig.ImageBrowserURL properties to:

FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=[context_path]/modules/fckeditor/ssip/connector.php"
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=[context_path]/modules/fckeditor/ssip/connector.php"

Note: If you are running Drupal under a directory replace '[context_path]' with yours directory's name (ie. /drupal ), otherwise simply remove it

FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=/modules/fckeditor/ssip/connector.php"
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=/modules/fckeditor/ssip/connector.php"

3. Edit properties.inc file under modules/fckeditor/ssip to set the 'context_path' property. if you are running Drupal under a directory you need to set the 'context_path' property to the ditectory's name

$properties['context_path']  = '/drupal';

otherwise replace it with an empty string ('')

$properties['context_path']  = '';

4. Edit properties.inc file under modules/fckeditor/ssip to set the resorce type path properties to the specific server path.

	$properties['File']   = '/your_directory';
	$properties['Image']  = '/your_directory/media/images';
	$properties['Flash']  = '/your_directory/media';
	$properties['Media']  = '/your_directory/media';



Possible scenario

Supose you have drupal running under http://www.domain.com/drupal and this url is mapped by your web server to "C:\Inetpub\wwwroot\webapp\drupal-45X" as document root. Under the document root you have three directories 'images', 'media' and 'library', each directory contains a specific type(s) of resource that you want to be able to browse through fckeditor file browser. To enable fckeditor server side integration you shall do the following:

1. Download sspi directory from CVS to "C:\Inetpub\wwwroot\webapp\drupal-45X\modules\fckeditor"

2. Edit fckconfig.js ("C:\Inetpub\wwwroot\webapp\drupal-45X\modules\fckeditor\lib") to set the properties FCKConfig.LinkBrowserURL and FCKConfig.ImageBrowserURL properties to:

FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=/drupal/modules/fckeditor/ssip/connector.php"
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=/drupal/modules/fckeditor/ssip/connector.php"

3. Edit properties.inc ("C:\Inetpub\wwwroot\webapp\drupal-45X\modules\fckeditor\ssip") and set the 'context_path' property to:

$properties['context_path']  = '/drupal';

4. Set resorce type path properties to:

	$properties['File']   = '/library';
	$properties['Image']  = '/images';
	$properties['Flash']  = '/media';
	$properties['Media']  = '/media';
jtite’s picture

Category: bug » support

Correction: the directory's name in the CVS is ssip

Rick Cogley’s picture

This is excellent, jtite; thank you so much.

mOm <= Japanese emoticon "deep bow" where the m's are hands on the floor and the O is my head!

I will give it a try right away.

Regards
Rick Cogley
Tokyo, Japan

Rick Cogley’s picture

Hello - thanks very much for making the effort to put this together.

I was able to download and install, but am getting errors and am not able to see the folders. I downloaded the module again from the normal drupal.org list, choosing the cvs one, and the the ssip folder directly from cvs.drupal.org.

I get this in my log whenever I click the insert image button, and then do browse server:

Type httpd 
Date Thursday, 3 February, 2005 - 17:27 
User Rick Cogley 
Location /modules/fckeditor/lib//editor/dialog/ 
Message 404 error: 403.shtml not found. 
Hostname 211.2.3.4 

It is a bit strange that the path has a // in it, and someone referenced this as just being cosmetic and needed for uploading images. I think the admin/settings/fckeditor allows you to change this but I have not fiddled with it. Should I?

When the server browser window comes up, in Firefox I can look at frame information, and it does indeed look like it is loading the correct connector.php as specified. However, inside that dialog, nothing works, I cannot see any images that I know exist in the path I specified, and I get no errors doing an add image or create folder.

In properties.inc there is a place to specify the separator, and it is defaulting to:

// The file system path separator (\) windows, (/) unix
$properties['path_separator'] = '\\';

I am on a LAMP server, so do I change this to = '\/' (escaping the forward slash) or = '/' ?

Any ideas of what I can try to do? Really sorry to keep pestering, but I would like to get this right.

Kind regards,
Rick Cogley
Tokyo, Japan

Rick Cogley’s picture

OK, this is really good! It works now after I did this, having finally found where my logs are (my ISP provides CPanel but it is in Japanese).

I set the path separator to /
I chmod'ed the directory correctly
CPanel was adding extraneous ending spaces to the .inc file, at the bottom after the ?> .

THANK YOU!!

Regards
Rick Cogley
Tokyo, Japan

Anonymous’s picture

Component: Documentation » Code
Priority: Normal » Critical

Is it possible to add some kind of security to the upload functionality? I.e. only users belonging to a certain role can upload images or something similar... otherwise the security implications are horrible.

ontwerpwerk’s picture

Status: Active » Closed (won't fix)

please do not hijack threads .. and yes, the fckeditor filebrowser is very powerful and should not be granted to all users