TinyFCK is the TinyMCE editor merged with the FCKEditor's file manager/uploader.
More information about TinyFCK can be found at http://p4a.sourceforge.net/tinyfck
To make it work with tinymce.module and Drupal only a few changes are necessary.

This is a step by step instruction to install TinyFCK on Drupal.

1. Download and install latest TinyMCE package from drupal.org
(as you normally do for tinymce module)
2. Download TinyFCK package from http://p4a.sourceforge.net/tinyfck#download
and unpack it.
3. Replace the content of modules/tinymce/tinymce/jscripts/tiny_mce with
the content of TinyFCK package.
4. Enable php connector in TinyFCK. Goto tiny_mce/filemanager/connectors/php and
open config.php for editing. Two lines must be changed here. Point UserFilesPath
to your Drupal directory where your images should be stored, e.g. /files/.

// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
$Config['Enabled'] = true;

// Path to user files relative to the document root.
$Config['UserFilesPath'] = '/files/' ;

5. Patch/Change tinymce.module to include a filebrowser callback. Open the module
in an editor and goto line 156 (v 1.77 2006/03/07). Change the content of
$tinymce_invoke = <<<EOD ... EOD; to the following code ...
(patch for tinymce.module is attached to the posting)

  tinyMCE.init({
    $tinymce_settings,
    file_browser_callback : "fileBrowserCallBack"
  });
  
  function fileBrowserCallBack(field_name, url, type, win) {
  	var connector = "../../filemanager/browser.html?Connector=connectors/php/connector.php";
  	var enableAutoTypeSelection = true;
  	var cType;
  	tinyfck_field = field_name;
  	tinyfck = win;	
  	switch (type) {
  		case "image":
  			cType = "Image";
  			break;
  		case "flash":
  			cType = "Flash";
  			break;
  		case "file":
  			cType = "File";
  			break;
  	}
  	if (enableAutoTypeSelection && cType) {
  		connector += "?Type=" + cType;
  	}
  	window.open(connector, "tinyfck", "modal,width=600,height=400");
  }

That's all you need to do ;) Hope you like it ...
I think FCKEditor's FileManager is a great addition to TinyMCE.

Regards, Thilo

CommentFileSizeAuthor
tinymce.module_8.patch1.22 KBprofix898

Comments

FlossieSheep’s picture

Excellent, worked perfectly when I followed instructions.

Very useful, makes things more friendly for non-expert users.

Many Thanks!

solipsist’s picture

How does this work with Drupal's file cache and filestore modules? Is Drupal "aware" of the file? Say for example you have images, you want to store these as image nodes and not just as files.

scroogie’s picture

It would be interesting to know if it uses drupals permission system. Or can everyone submit files if he knows the right URL?

Permanently Undecided’s picture

It would be interesting to know if it uses drupals permission system. Or can everyone submit files if he knows the right URL?

I just tried this, and most unfortunately you're right, this bypasses drupal's permission system entirely and allows anybody who knows the url to upload files on your server.

cgjohnson’s picture

Is there a fix for this breach? Or is it safe to use it as is?

kreynen’s picture

Status: Active » Closed (won't fix)

You should contact profix898 directly about this. I don't believe anyone is trying to fix this in the TinyMCE module since the problem is really with tinyfck code.