Hi

I have installed FCKEditor_2.5.1 (it works but a bit confusing).

I am now trying to get the file uploader to appear when clicking on the Insert/Edit Image icon.

The README.TXT file says to:
"
To enable the file browser you need to edit the connector configuration file in
your fckeditor module directory, the file should be in:
/modules/fckeditor/fckeditor/editor/filemanager/browser/default/connectors/php/config.php
and
/modules/fckeditor/fckeditor/editor/filemanager/upload/php/config.php

In this file you will need to enable the file browser:
$Config['Enabled'] = true ;

To use the drupal files directory you also need to comment out or remove the
following line in the connector configuration:
$Config['UserFilesPath'] = '/UserFiles/' ;
You may also edit this line to reflect a custom upload path.
"

My installation does not have these paths. The closest it has to these paths is:
/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php

ie there is no /upload/ directory?

Can anyone assist with this or point me to a more beginner-friendly step-by-step guide to installing FCK?

Thanks

Comments

Petuschki’s picture

modules/fckeditor/fckeditor/editor/filemanager/connectors/php

it depends which fckeditor-version you have
you should take the newest one, it works better
the newest one has only one place to configure that, in

modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php

here some settings in that file:

$Config['Enabled'] = true ;

// $Config['UserFilesPath'] = '/name of subdirectory/images/' ;

$Config['UserFilesPath'] = '/mysubdirectory/files/' ;

// $Config['UserFilesAbsolutePath'] = '' ;
$Config['UserFilesAbsolutePath'] = $_SERVER["DOCUMENT_ROOT"]. "/mysubdirectory/files/";

$Config['ForceSingleExtension'] = true ;

$Config['SecureImageUploads'] = true;

$Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ;

// Allowed Resource Types
$Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ;

$Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ;

/*
	Configuration settings for each Resource Type
*/

$Config['AllowedExtensions']['Image']	= array('gif','jpeg','jpg','png') ;
$Config['DeniedExtensions']['Image']	= array() ;
$Config['FileTypesPath']['Image']	= $Config['UserFilesPath'] .'images/';
$Config['FileTypesAbsolutePath']['Image']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'images/' ;
$Config['QuickUploadPath']['Image']	= $Config['FileTypesPath']['Image'] ;
$Config['QuickUploadAbsolutePath']['Image'] = $Config['FileTypesAbsolutePath']['Image'] ;			

$Config['AllowedExtensions']['Flash']	= array('swf','flv','mp3') ;
$Config['DeniedExtensions']['Flash']	= array() ;
$Config['FileTypesPath']['Flash']	= $Config['UserFilesPath'] . 'flash/' ;
$Config['FileTypesAbsolutePath']['Flash']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'flash/' ;
$Config['QuickUploadPath']['Flash']	= $Config['FileTypesPath']['Flash'];
$Config['QuickUploadAbsolutePath']['Flash']= $Config['FileTypesAbsolutePath']['Flash'];

$Config['AllowedExtensions']['Media']	= array('aiff', 'asf', 'avi', 'bmp', 'fla', 'flv', 'gif', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'png', 'qt', 'ram', 'rm', 'rmi', 'rmvb', 'swf', 'tif', 'tiff', 'wav', 'wma', 'wmv') ;
$Config['DeniedExtensions']['Media']	= array() ;
$Config['FileTypesPath']['Media']	= $Config['UserFilesPath'] . 'media/' ;
$Config['FileTypesAbsolutePath']['Media']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'media/' ;
$Config['QuickUploadPath']['Media']	= $Config['FileTypesPath']['Media'];
$Config['QuickUploadAbsolutePath']['Media']= $Config['FileTypesAbsolutePath']['Media'];

$Config['AllowedExtensions']['File']	= array('7z', 'aiff', 'asf', 'avi', 'bmp', 'csv', 'doc', 'fla', 'flv', 'gif', 'gz', 'gzip', 'jpeg', 'jpg', 'mid', 'mov', 'mp3', 'mp4', 'mpc', 'mpeg', 'mpg', 'ods', 'odt', 'pdf', 'png', 'ppt', 'pxd', 'qt', 'ram', 'rar', 'rm', 'rmi', 'rmvb', 'rtf', 'sdc', 'sitd', 'swf', 'sxc', 'sxw', 'tar', 'tgz', 'tif', 'tiff', 'txt', 'vsd', 'wav', 'wma', 'wmv', 'xls', 'xml', 'zip') ;
$Config['DeniedExtensions']['File']	= array() ;
$Config['FileTypesPath']['File']	= $Config['UserFilesPath'] . 'file/' ;
$Config['FileTypesAbsolutePath']['File']= ($Config['UserFilesAbsolutePath'] == '') ? '' : $Config['UserFilesAbsolutePath'].'file/' ;
$Config['QuickUploadPath']['File']	= $Config['FileTypesPath']['File'];
$Config['QuickUploadAbsolutePath']['File']= $Config['FileTypesAbsolutePath']['File'];

I did this and it works quite good.

Remember to check the fckeditorconfig.js to activate the flash, image etc. for FCKeditor:
watch here:
flvplayer, Flash ...

FCKConfig.ToolbarSets["DrupalFull"] = [
['Save','Source','-','Preview','-','Templates','Cut','Copy','Paste','PasteText','PasteWord','-','SpellCheck','-','Undo','Redo','Find','Replace','-','SelectAll','RemoveFormat'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript','-','nbsp','-','TextColor','BGColor','-','Rule','PageBreak'],
['OrderedList','UnorderedList','-','Outdent','Indent'],
'/',
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull','-','Blockquote','-','Image','flvPlayer','Flash','-','Link','Unlink','Anchor','-','Smiley','SpecialChar','-','FitWindow'],
'/',
['Table','-','TableInsertRowAfter','TableDeleteRows','TableDeleteColumns','TableInsertCellAfter','TableDeleteCells','TableMergeCells','TableHorizontalSplitCell','TableCellProp'] ,
['DrupalBreak','DrupalPageBreak'],
'/',	
['FontFormat','FontName','FontSize','Style']
] ;  	// No comma for the last row.

The problem with FCKeditor is, that all people, who include it somewhere, integrate it in modules, don't care for these settings

you can read my manual, which I wrote for CMSimple, but which is absolutely usable for DRUPAL as well here:
there I describe the settings in the second part..

http://www.webdeerns.de/downloads/fckeditor-integration%20in%20CMSimple.pdf

good luck,
Connie

swifty’s picture

Thanks Connie, with a bit of cut n paste from your post and some extra config INSIDE Drupal I got it working.

Great work.

Petuschki’s picture

Swifty,

I am glad it worked for you!

Could you publish your Drupal - modifications here so other could benefit from that as well?
You know, as documentation is so poor with Drupal, we must give our best ;=)

Have a good day,

Connie

swifty’s picture

Hi Connie

I jumped the gun a bit when declaring it worked and should not have posted yet.

After following your instructions the file manager upload tab appeared but would not function so I still have a reinstall of the module and some rechecking from scratch to piece together the solution.

Once completed I will post back my STEP-BY-STEP install of FCKEditor. This editor is exactly what I am looking for as it allows MS Word-like editing with the ability to insert images into pages and stories - it's just a bugger to install.

What I am looking to do is replace steps like "get the latest version" with "download *this* file from *this* location" as there is confusion from the beginning as to which Drupal-compatible app to download.

Cheers

Petuschki’s picture

I think many people need this installation-help

so I am waiting also for that;=)

giorgosk’s picture

Any chance you could give us a more details account on how you succeeded

I am struggling with this too
FCKEditor works, I followed instructions in the readme.txt and what Connie has said but still don't get the "upload" tab in the "edit/insert image" window.

EDIT: I just realized you guys referring to the 5.x Drupal right ? I am trying on the 6.x and it does not work. Has anyone tried it ?

------
GiorgosK
Geoland Web development/web design

------
GiorgosK
Web Development

sapiusenator’s picture

The first link goes to the IMCK module.
the second link shows it's installation and use through a YouTube video.
the third link is for the installation of FCKeditor for those of you who may still be having trouble with that.

Watch the tutorials they should really help you if your having trouble.

    Link to IMCE Module
      Link to IMCE Video Tutorial on YouTube part one
        Link to FCKeditor Video Tutorial on YouTube part one

        This is my first post, hope it helps.

        -Mike

somnathpawar’s picture

Thanks for this solution. Its works for me very well. :)
Also I got the idea about how to create a new toobars with various html elements in it...

ldsandon’s picture

First, I had to put the line:

require_once "../../../../../filemanager.config.php";

at the beggining of sites/all/modules/fckeditor/fckeditor/editor/filemanager/connectors/php/config.php, not where the readme.txt told me to put it, otherwise I kept on getting "disabled" errors.

Then I had to change the $Config['UserFilesAbsolutePath'] = '' ; to point to my files directory, and change the user files settings accordingly. That solved the "redirect" error that appeared.

Now it works, don't know if this configuration is the proper one, though.

miopa’s picture

Thanks, this worked for me too.

I had somewhat different symptoms, everything appeared to work fine, and the javascript box was informing me that the upload was successful, but the file was missing and there was error with move_uploaded_file() in the log.

ndmaque’s picture

Great work everyone, thanks.
I am using wysiwyg so the fckeditor is not in the usual modules area but in the sites/all/libraries

For me i had to do two things on my Drupal 6.19 install

The dev site (cas) is in a folder inside an existing site which added confusion
eg: /var/www/html/cas/ <-- this is where drupal is installed

The client wanted all uploads into the fck_uploads folder to keep the file system tidy-ish

edit: sites/all/libraries/fckeditor/editor/filemanager/connectors/php/config.php

$Config['Enabled'] = TRUE ;
$Config['UserFilesPath'] = '/cas/sites/default/files/fck_uploads/' ;
$Config['UserFilesAbsolutePath'] = '/var/www/html/cas/sites/default/files/fck_uploads/'; 

edit: sites/all/modules/contrib/wysiwyg/editors/fckeditor.inc

    'LinkBrowser' => TRUE , //FALSE,
    'LinkUpload' => TRUE , //FALSE,
    'ImageBrowser' => TRUE , //FALSE,
    'ImageUpload' => TRUE , //FALSE,

the above is found in the function wysiwyg_fckeditor_settings()

bah, i guess this means i have hacked the wysiwyg module and the fckeditor library too, so i will have to move wysiwyg into the sites/all/modules/hacked folder!
This is my first ever hack, i couldn't find any hooks to implement and already lost a day, perhaps i will find a more drupal way of doing it sometime soon.

Anyways, now the above is in place i can configure wysiwyg (admin/settings/wysiwyg) and in Buttons & Plugins set the image button enabled

NB: in my case the users are now jailed into the above folder for both uploading and browsing, you may not want that especially for file browsing, you may want the user to look for files in all folders