ccSimpleUploader is a very basic plugin for TinyMCE 3.x platform. In it's current form, it is not a file manager or manipulator of any kind. It simply allows a user to browse their computer and upload a file using a PHP script. The script can be invoked directly from the TinyMCE editor, or from the context of AdvImg and AdvLink plugins.
Basic Features:
- Free
- Easy to configure and integrate with TinyMCE
- Uploads file to server using PHP file upload. Note: There are currently no restrictions on the types of files that can be uploaded, which poses a security threat! This is how I wanted to have it, you can change that by modifying uploader.php script if you like.
- Integrates with AdvImg and AdvLink plugins
Installation:
- Download and unzip ccSimpleUploader plugin into your 'tiny_mce/plugins' directory
- Modify your tinyMCE init function (this can be in its own js file, or in the header of the HTML file that hosts the editor):
1. Add the plugin to the plugins list:
plugins: "ccSimpleUploader,safari,pagebrea.."2. If you want download functionality available directly from the TinyMCE editor, add the plugin to the desired button bar:
theme_advanced_buttons3: "ccSimpleUploader,ablecontrols,|,hr,..."3. Create a directory on your site where you would like to have the files uploaded (i.e. /my_uploads)
4. Add configurations for the plugin as follows:
relative_urls : false, file_browser_callback: "ccSimpleUploader", plugin_ccSimpleUploader_upload_path: '../../../../uploads', plugin_ccSimpleUploader_upload_substitute_path: '/tinymce/uploads/',
Change 'plugin_ccSimpleUploader_upload_path' variable to represent the relative path from the ccSimpleUploader plugin directory to your upload directory.
Change 'plugin_ccSimpleUploader_upload_substitute_path' to represent the aboslute path to your upload directory from the root of your site (i.e. if you create a directory 'uploads' in your 'public_html' directory, the absolute path would simply be '/uploads')
Cross fingers, load/re-load the page hosting your tinyMCE editor, and hopefully enjoy the added functionality.
Screenshot:

Revision History:
v0.1 - Initial Revision
Update:
I got a couple of questions regarding Drupal integration, so here is the skinny. I don't think I have the "proper" way of doing this, and I shall revisit eventually (unless someone want to chime in).. Anyway, so if you have the WYSIWYG plugin in your Drupal installation and you have tinyMCE as your editor, these are the steps:
1. Modify the tinymce.inc file in the WYSIWYG module (in sites/all/modules/wysiwyg/editors):
$plugins['ccSimpleUploader'] = array(
'path' => $editor['library path'] . '/plugins/ccSimpleUploader',
'extensions' => array('ccSimpleUploader' => t('Simple File Uploader')),
'url' => 'http://www.creativecodedesign.com',
'internal' => TRUE,
'load' => TRUE,);
Then, at the bottom of wysiwyg_tinymce_settings($editor, $config, $theme) right before 'return $settings;' add:
$settings["theme_advanced_buttons1"] .= ",ccSimpleUploader";
$settings["plugin_ccSimpleUploader_upload_path"] = "../../../../../../../../uploads";
$settings["plugin_ccSimpleUploader_upload_substitute_path"] = "/uploads/";
Obviously, you need to change the upload paths to suit your directory layout. Remember that the relative path is relative to the uploader.php script itself.
Finally, go to the WYSIWYG module configuration, and under "Buttons and Plugins" check off "Simple File Uploader".
That should do it.
Cheers!
Hey all! I wanted to modify and customize uploader.php, changing "File Name" into "Nombre del fichero" and "Upload File" to "Subir fichero", but every time I did, it crashed, and don't really know why. I would be very thankfully if someone can help me!
First of all, thank you very much for making this plugin available. Well I have a question, when im including the plugin and clicking on the button im getting:
Forbidden
You don't have permission to access .../tiny_mce/plugins/ccSimpleUploader/uploader.php
on this server.
Anyhow I chmod'ed uploader.php with 755 no change...
Thank you in advance
Well, it's hard to say without looking at your specific setup, but I have ran into a similar issue when the relative path was not correct. So it was not actually a permission issue, but a file not found issue, but the server still get "You don't have permission to access...".
So double check that the path is correct relative to where it is being called from.
I add this buttom to joomla 1.6
But I don't know how I change the value of this code:
relative_urls : false,
file_browser_callback: "ccSimpleUploader",
plugin_ccSimpleUploader_upload_path: '../../../../uploads',
plugin_ccSimpleUploader_upload_substitute_path: '/tinymce/uploads/',
Not, sure. I have not done this in Joomla. But I would guess the only thing you need to make sure is that the relative path to your upload directory is correct.
Sorry but I don't know the relative path means.
Can you give example in this codes?