Suggested New Plugin QFileManager / elFinder ?

4 replies [Last post]
jmirancid's picture
Joined: 04/04/2011

Hi qbos,

I was wondering if the community is interesting in porting this jquery plugin to QCubed.

Is a web file manager very very powerfull. I got in a QCubed application but not as a QControl, is directly binded to the jQuery core shell.

If you want it just let me know, I heard every suggestion you made.

By the way, tell me a name to put it. elFinder is not a really a suggested name for a File Manager.

Regards, JMI.

alex94040's picture
Joined: 11/06/2008

This is an INCREDIBLE plugin, jmirancid. I can imagine a million ways to use it in my own practice. Do you want to take a first step towards making it a qcubed plugin? We'll be here to help you!

vakopian's picture
Joined: 04/08/2008


I agree, this would be a wonderful plugin.
I haven't looked at the usage for it yet, but if it's similar to other jQuery plugins, you can take advantage of the jQuery control wrapper generator that's in QCubed.

I myself used it to wrap several jQuery plugins already.

For example QJqDateTimePicker.
For that, all I had to do is create the "generator" file jq_datetimepicker_gen.php based on the control's documentation. Then simply running it would give the base for the wrapper in the "standard QCubed way".

Another example: QDateRangePicker with the "generator" file: daterangepicker_gen.php

And one more: QAnyTimeBox with the "generator" file: jq_anytime_gen.php

Hope it would be useful to you.

jmirancid's picture
Joined: 04/04/2011

Ok team, here are the news...

I put my hands on this and I got the plugin working over the QCubed (with an instance of a QControl right the way is supouse to be) lets called Version 0.1 Alfa ja!

First of all I like to tell you I don't change any file that comes with the plugin installation. My first way of think is to leave the files of the plugin alone, so if any update come just simply replace the old files with the new ones and that's it.

But now I got a problem related to the plugin it self.

I was thinking to expose all the options available on the plugin on the class and then "wrap" this options on a jquery instruction with the options.

But the plugin apparently only take one option called "URL" and is a "connector" who instance the class elFinder.class.php (this is not my class) witch has all the other options (path to root, name, show thumbnails, etc). Every time the File Manager takes an action (Upload file, search in folder, etc) executes this connector and resolves the commands.

Is like that is not has been thinking to be dynamic.

Any ideas of how can be resolve this in a elegant way?

Thanx for help!!

ND: Here are some code notes.

jQuery plugin executor

"jQuery(document).ready(function() {
     var f = jQuery('#%s').elfinder({

        // Connector File
        url : '../includes/connector.php',

        lang : 'en',
        docked : true

        // dialog : {
        // title : 'File manager',
        // height : 500
        // }

        // Callback example
        //editorCallback : function(url) {
        //    if (window.console && window.console.log) {
        //        window.console.log(url);
        //    } else {
        //        alert(url);
        //    }
        //closeOnEditorCallback : true
, $this->strControlId

Connector File Content

//include_once dirname(__FILE__).DIRECTORY_SEPARATOR.'elFinder.class.php';
include_once 'elFinder.class.php';

// Options Array (Configuration)
$opts = array(
'root' => '../example/files', // path to root directory
'URL'  => '' // root directory URL
'rootAlias' => 'Home', // display this instead of root

               // More options here...(See API Guide)

// Instance plugin class passing options array.
$fm = new elFinder($opts);

// Every time the File Manager do something this happen. Instance the class and again execute the run() method that resolves all the commands.

jmirancid's picture
Joined: 04/04/2011


Plugin is ready for QA Test. I hope it would be usefull for your projects.

Ticket #773

You can download and test it in your local environment.