February 08, 2011
ezFilemanager v2.5 has been released.
Finally I managed to find time and do some updates.
I expect to add more support documentations soon.
Thanks to community translations, ezFilemanager is Multilingual (English, Dutch, German, Norwegian, Portuguese, Spanish, Swedish, Czech)
A site visitor has drawn to my attention that someone is selling my free script, please don't be cheap, respect the open source community and give credit where credit is due.
InstallationCopy the ezFilemanager folder and contents to your TinyMCE plugins directory.
- Stand alone installation
Open config.inc.php and edit configuration, mainly the UPLOAD_DIR
Just point your browser to the ezfilemanager folder
- Plugin Installation within TinyMCE
Open config.inc.php and edit configuration, mainly the UPLOAD_DIR
You have to edit 3 pages, ezfilemanager/index.php, ezfilemanager/js/ez_tinyMCE.js and your page containig tiny_mce
a) index.php
Open ezfilemanager/index.php
Set the path of [script type="text/javascript" src="YOUR-PATH-TO/tiny_mce_popup.js"][/script]
b) ez_tinyMCE.js
Open js/ez_tinyMCE.js and edit var cmsURL ="..."
var cmsURL = "http://"+document.domain+"/YOUR-PATH-TO/ezfilemanager/index.php";
c) Your page containing the tiny_mce editor
Add ez_tinyMCE.js to your tiny_mce page, make sure the path is correct
[script type="text/javascript" src="/admin/spotlights/edit/your-path/tiny_mce.js"][/script]//This allready exits
[script src="YOUR-PATH-TO/plugins/ezfilemanager/js/ez_tinyMCE.js" type="text/javascript"][/script] //Add this
Add plugin to TinyMCE plugin option list. example: plugins : "ezfilemanager".
Add the button, example: theme_advanced_buttons3 : "ezfilemanager".
After your buttons, add file_browser_callback: "CustomFileBrowser",
Make sure you have "advimage" plugin loaded as well
Example snippet
in your TinyMCE init:
tinyMCE.init({
mode : 'textareas',
theme : 'advanced',
plugins : "ezfilemanager,advimage.......",
theme_advanced_buttons3_add_before : 'separator,ezfilemanager',
relative_urls : false,
file_browser_callback: "CustomFileBrowser",
..........
});
- Generic Plugin for text input area.
Put this in your page [head][/head]
[script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"][/script]
[!-- modify according to your directory structure --]
[script type="text/javascript" src="tinymce/jscripts/tiny_mce/plugins/ezfilemanager/js/ez_plugin.js"][/script]
Open ez_plugin.js and make sure the URL of "var newWindow" is correct
Put text input in the page, give a unique ID to the input (You can have multiple text inputs if you wish to)
[input type="text" name="title" id="myid" value="" /]
Double clicking the text input field will open ezfilemanager
if you want to open a specific directory then use the custom "dir" attribute
[input type="text" name="title" id="myid" dir="media/myfolder/" value="" /]
This is it, let me know if you have any problems
July 27, 2010
@Thomas B.
Thanks for your feedback.
Yes you are partially correct, ezFM ignores special characters (some characters create problems, especially if used from command prompt) and although I have implemented it for the next version, I have yet to decide if I should release it.
But case and space can be preserved from config.
define('PRESERVE_CASE',false);//If false, new files/dirs will be converted to lowercase
define('ALLOW_SPACE',true);//Allow space in file/folder names
July 27, 2010
@Naz
Thanks. I just figured out the "case" and "space" issue. I still need special character handling. Is there any suitable workaround in the current release?
July 27, 2010
@Thomas B.
Try the following
open index.php and comment out the following Java-Scripts
line 160 //dir_to_make = dir_to_make.replace(/[^a-zA-Z 0-9\_\-\||]+/g,'');
line 189 //value = value.replace(/[^a-zA-Z 0-9 _-]+/g,'');
line 435 // uploadfileName = uploadfileName.replace(/[^a-zA-Z 0-9 _-]+/g,'');
line 442 // uploadfileName = uploadfileName.replace(/[^a-zA-Z 0-9 _-]+/g,'');
I have yet to do any security checks, so implement the changes at your own risk
Aug. 09, 2010
@Naz
Thanks again. I tried this, but then i ran in another problem. jQuery encodes form data in utf8, hence my danish characters will be encoded as 2-bytes values. When the file or dir is created the name will be different from the desired:
i.e. "måned" will become "mÃ¥ned" in the file system :-(
Aug. 09, 2010
@Thomas B.
I don't have that problem, (I just tried creating/renaming a directory and file upload).
I'm using CentOS with FF, so probably it has to do with OS and browser.
You might try urlencoding/decoding all input with javascript/php e.g. PHP
urlencode();
urldecode();
htmlentities();
rawurldecode();
rawurlencode();
But as I said in my earlier post allowing non latin characters might created more problems and I have not fully tested it.
In short it is uncharted water and I'm not sure if I want to enter it :-)
Sep. 04, 2010
Very strange. I installed the latest but am getting the following error message. I defined the path to popup in index.php as follows:
which I guess is correct since I am using an "out-of-the-box" tinymce installation.
tinymce is installed in the "tours" subdirectory of the root.
Now, for the strange part. Since it isn't really clear what YOUR_PATH means at different directory levels, I started changed the '../../' to '../' and even ''. During all of the fooling around I got a link to fill! But, I couldn't duplicate it with any of the various options.
???????????????????
ERROR FROM IE 8 (Also the same error in FF):
Webpage error details
Message: Access is denied.
Line: 5
Char: 681
Code: 0
URI: http://www.azvoices.com/tours/tinymce/jscripts/tiny_mce/tiny_mce_popup.js
Message: 'tinyMCEPopup.onInit' is null or not an object
Line: 33
Char: 1
Code: 0
URI: http://www.azvoices.com/tours/tinymce/jscripts/tiny_mce/plugins/ezfilemanager/js/ez_tinyMCE_insert.js
Sep. 04, 2010
@lwoods
Re: path to popup in index.php - I accidently pasted the complete SCRIPT statement in the email so it isn't showing up. Anyway, the path in the statement is:
src="../../tiny_mce_popup.js"
Sep. 05, 2010
@Naz
I have a feeling there are other ways that you can get this since I just modified the word.html file in the /examples folder on this same site and IT WORKS!
I'll let you know….
I can assure you that one of the following PATHS/URL is wrong
b) ez_tinyMCE.js
c) Your page containing the tiny_mce editor
[script src="YOUR-PATH-TO/plugins/ezfilemanager/js/ez_tinyMCE.js" type="text/javascript"][/script]
Sep. 05, 2010
@lwoods
The Message: Access is denied is when you are trying to script on a document from a different domain (Cross site scripting) and this is a JavaScript security issue
Have in mind that JavaScript treats domain.com as different domains in the examples below
http://domain.com (no www)
http://www.domain.com (with www)
https://www.domain.com (with SSL)
Make sure that your documents the URL of <script type='text/javascript' src='xxxx.js'></script> files and the URL that you are accessing the document is the same.
If you still have problems send me at naz[at]webnaz.net the URL that you are getting this error.
Nov. 09, 2010
@lwoods I am trying to use the ezfilemanager, but there is a security isssue, i am not good with java, but if somebody knows the direkt link to the filemanager coud do everything with your files on the server..example: when somebody clicks your url: your web page just replaced www.:http://www.xxxxxx.com/tours/tinymce/jscripts/tiny_mce/plugins/ezfilemanager/ file manager is accesible form every one. How to solve this..?