This is a plugin that allows an alternative easy way to add files and images in FCKeditor. It provides three buttons to make it easy for new users to upload pictures or files as well as creating external links.
The dialogs are based on the default Image and Link dialogs, but everything that wasn't extrictly neccesary has been removed so the users are able to work without any previous knowledge.
Alfonso Martínez de Lizarrondo
Get the latest version and/or updated info
Extract the contents of the zip in you plugins directory, so it ends up like
this
editor\ ... js\ lang\ plugins\ ... easyupload\ fckblank.html ... fckplugin.js readme.html docs\ fck_image\ lang\ ... skins\
Now add in your fckconfig.js or custom js configuration
file the following line:
FCKConfig.Plugins.Add( 'easyUpload', 'en' ) ;
Add the buttons 'easyImage','easyFile','easyLink' (case sensitive) to your toolbarset:
FCKConfig.ToolbarSets["Basic"] = [
['Bold','Italic','-','OrderedList','UnorderedList','-','Link','Unlink',
'-','easyImage','easyFile','easyLink','-','About']
] ;
For the Image and Link buttons it uses the default pictures according to your FCKeditor theme, and the File uses a typical paperclip picture.
If you add the new buttons you might want to remove the default Image and Link options and replace with these ones.
Then you need to specify the language that you'll use to process the uploaded files:
var _QuickUploadLanguage = 'php' ; // asp | aspx | cfm | lasso | perl | php | py
And if you find it neccesary adjust the path to the upload script or the
extensions that will be processed at the client side to allow or reject the
file before it is uploaded.
FCKConfig.LinkUpload = true ;
FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
FCKConfig.LinkUploadAllowedExtensions = ".(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)$" ; // empty for all
FCKConfig.LinkUploadDeniedExtensions = "" ; // empty for no one
FCKConfig.ImageUpload = true ;
FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
FCKConfig.ImageUploadAllowedExtensions = ".(jpg|gif|jpeg|png|bmp)$" ; // empty for all
FCKConfig.ImageUploadDeniedExtensions = "" ; // empty for no one
Finally:
You must enable the uploader script under filemanager/upload/ YOUR LANGUAGE
and check there that the allowed and denied extensions match your needs. You
can also adjust in that script the place were the files will be saved, by
default all the files are saved at the root of the user files directory,
there's no distinction according to the type (Image, File), but you can change it in that config file.
The plugin provides the context menu entries for link and image elements, so
you might also remove those ones from you configuration:
FCKConfig.ContextMenu = ['Generic','Anchor','Flash','Select','Textarea','Checkbox','Radio','TextField','HiddenField','ImageButton','Button','BulletedList','NumberedList','Table','Form'] ;
Now empty the cache of your browser and reload the editor, the new buttons should be ready.
If you find this plugin useful, consider making a donation so it can be further improved, any amount can help to keep the development running.
If you need some special feature for this plugin, or if you need any other kind of plugin for FCKeditor then contact me and we can discuss it
FCKeditor is © FredCK.com