Share
February 08, 2011 Print

ezFILEMANAGER v2 INSTALLATION & SUPPORT


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.

Installation

Copy the ezFilemanager folder and contents to your TinyMCE plugins directory.

  1. Stand alone installation
    Open config.inc.php and edit configuration, mainly the UPLOAD_DIR
    Just point your browser to the ezfilemanager folder
  2. 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",
    ..........
    });
  3. 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

* required

Dhanova
Jan. 18, 2010

I have a small problem when running in sub folder as a doc root. I already set up path and url in config.inc to respect my sub folder as a doc root. All work except for ajax preview link (when you mouse over an icon for image) and link at insert icon. When i check tab_filebrowser.inc, i found that links above use breadcrumbs value to create relative url. Well, no wonder the links is not correct.

If you guys have same problem with me, just change your anchor and rel attribute value at tab_filebrowser.inc, just prefix it with SITE_URL constant and you good to go.

Although I have difficulty understanding what you mean by doc root in subfolder, ezfilemanager works in any folder if the paths are correct.

Also your hack will be overwitten when you rename a file
Dhanova
Jan. 19, 2010

hi Naz,

What i mean is, if we put in http://localhost/ we dont need to hack anything, its work. But, if our application in http://localhost/subfolder/ the links that i mention earlier (including renaming a file) its become incorrect ( not working). Since the links its prefixed by value from breadcrumbs and it create a relative url, then browser simply put our server root - http://localhost/ - as a prefix not http://localhost/subfolder/. At this point im not quite sure why this happen. This is the steps what i do, assuming im working in http://localhost/subfolder/ as my application root. I change SITE_URL and ABSOLUT_PATH constant in config.inc, all simply suffix by /subfolder/. At this point i test it, it work for browsing but not for the links i mention above (including renaming file function). So, i prefixed anchor and rel attribute value at tab_filebrowser.inc with SITE_URL constant, i test it, and all links work and i can renaming file too.

You dont have to do all these.
Just change the UPLOAD_DIR (provided your ABSOLUTE_PATH) is correct.
e.g. the ABSOLUTE_PATH of localhost is /home/public_html/
Even if our application is in http://localhost/subfolder/ and media directory is in subfolder, then all you have to do is set UPLOAD_DIR to subfolder/media/ or whatever it is relative to the ABSOLUTE_PATH

And beleieve me, renaming will reset the rel and href back to without the SITE_URL after all I wrote the scripts : -)

In leave everything as it is and put the correct UPLOAD_DIR relative to your ABSOLUTE_PATH and it will work, unless I'm missing something fundamental
Dwaine
Jan. 21, 2010

The problem she is having I ad and reported earlier, your paths are not the issue in the config file, no matter how you change the config it doesn't fix the image preview red x on mouseover.
in tab_filbrowser.inc.php on line 37 find this:
$insercell = "

this part ( href='/".$breadcrumbs ) makes the image link show up in the image preview show up as:
"http:/media/image_name.gif"
which creates the red x image not found error.
So changing the paths in config will not fix this.....

I think now I understood what you mean.
Please download v2.0.1a which addresses and hopefully fixes the issue you mentioned.
Let me know if you still have problems
Dwaine
Jan. 21, 2010

Naz,
Sorry I missed the line number should be 47 not 37, the div class="view" line, seems to be the offender.

Dwaine
Jan. 21, 2010

also I forgot this on, when in mouseover of the image, the tooltip says imge-Click for more info, when you do I get this in the bottom right corner of the fm, in stand alone mode in tinymce it's fine...

Notice: Use of undefined constant TXT_DIMENSION - assumed 'TXT_DIMENSION' in L:\htdocs\siteadmin\includes\functions.inc.php on line 873

Dwaine
Please download v2.0.1a which I released yesterday, I believe it will solve your problems, and you are getting the TXT_DIMENSION error because you are using an old version of langs/en.inc.php
Bertl
Jan. 25, 2010

Hi,
I am using the latest v2.0.1a and have the following issue:
My media folder is in a special subfolder out of the document root. UPLOAD_DIR and ABSOLUTE_PATH are correct defined. On the Startpage of exFM the "Home"-Button directs to the correct media-subfolder, but when you switch to the Upload-Screen, the Navigation-Bar includes also the whole paths to the document-root before the Home-Button! When you click on one, you get an Message-Screen "Access Denied" with no back Button.
Thank you for investigation!

The "Access Denied" msg is from your server.(HTTP error 403)
Please send to naz[at]webnaz.net your config and mention your Server OS
Roland
Feb. 02, 2010

I'm trying to implement file_browser_callback: "CustomFileBrowser",

And just nothing happens, I then created a function

function CustomFileBrowser (field_name, url, type, win) {

tinyMCE.activeEditor.windowManager.open({


file : '???',
title : 'Browse',
width : 650,
height : 440,
resizable : "yes",
scrollbars : "yes",
inline : "yes",
close_previous : "no"
}, {
window : win,
input : field_name
});
return false;
}

Now at least the popup is coming up but it can't find the file. How should I get this to work in Version2?

Probably because ez_tinyMCE.js is not loaded
Open your page containing the tiny_mce editor
Add ez_tinyMCE.js to your tiny_mce page, make sure the path is correct
//This already exits
<script src="/YOUR-PATH-URL-TO/tiny_mce.js" type="text/javascript"></script>

//Add this
<script src="/YOUR-PATH-URL-TO/plugins/ezfilemanager/js/ez_tinyMCE.js" type="text/javascript"></script>

Regarding to your modification, I'm sorry but I cannot comment on custom modifications.
Roland
Feb. 02, 2010

Thanks, my path was incorrect, and the popup is working now

Roland
Feb. 02, 2010

Getting the following error

Error: Cannot insert
"tiny_mce_popup.js" URL in ezfilemanager/index.php line 23 is wrong

In the exfilemanager/index.php my path is correctly defined

tinymce/jscripts/tiny_mce/tiny_mce_popup.js">

tinymce folder is in the docuemnt root. Did I perhaps leave somthing out?

I'm glad you solved the pop-up error
Most definitely again your path is wrong, try entering the full URL of your tiny_mce_popup.js and make sure you are using the latest version of tiny_mce
Roland
Feb. 02, 2010

Me and paths, all I did is removed the $_SERVER['DOCUMENT_ROOT'] and it worked.

Thank you for this amazing plugin!!!!! It saved me alot of time and effort!

www.techportal.co.za

«« back ««