AndreaGvA / esyFileManager

php Ajax jQuery file manager
12 stars 3 forks source link

Android support #2

Closed webuk closed 9 years ago

webuk commented 9 years ago

Great file manager. Double click on android devices doesn't seem to work. Maybe add a separate 'OK' button to select a file?

AndreaGvA commented 9 years ago

Hi webuk, and thank you for using it. You can download the files after the selection in android devices using the link in the details box (on the left bottom corner)

I add this issue in my todo list for new developments.

This was a week-end development experiment. Next version will be much better, but it will take some time to rebase the project.

webuk commented 9 years ago

Hi Andrea

Thanks very much for responding and saying you will add the issue to your to do list. For just an experiment you have done a very good job.

The details link does indeed download an image but it doesn't do the same as a double click. An example; if you have a form element which you want to populate. Clicking on the form element (as with your demo) opens the file manager. You select an image you want to use within the file manager and double click it. This closes the file manager and adds the URL to the form element. The details link will not do that.

The double click is the part that Android can't do. All the other functions seem to work fine. I do think a select button at the top near the home and the remove buttons would be the best way to get round this.

Cheers, Andy

AndreaGvA commented 9 years ago

Hi Andy, ok now i understood your problem. I will add the button in a few days or you could try a quick fix by adding something like this at the end of the js where #yourbutton is the id of an html tag in the index.php. The button will do the work you need for the selected file.

I don't have time to test this solution, but if you need some help mplementing it you can ask.

$("#yourbutton").click(function(){
            var path1 = $(".selected").parent(".edit").attr("rel");
            var path2 = $(".selected").html();
            var fileUrl = path1 + path2;
            fileUrl = fileUrl.replace(replacement, replace_with);
            switch(utilizzo){
                case 1:
                    var textarea = $.url().param("cl");
                    window.opener.urlimg(fileUrl, textarea);
                    window.close();
                    break;
                case 2:
                    // Helper function to get parameters from the query string.
                    var funcNum = getUrlParam('CKEditorFuncNum');
                    //fileUrl = fileUrl.replace(replacement, replace_with);
                    window.opener.CKEDITOR.tools.callFunction(funcNum, fileUrl);
                    window.close();
                    break;
                case 3: 
                    var URL = fileUrl;
                    var win = tinyMCEPopup.getWindowArg("window");
                    win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = URL;
                    if ( typeof (win.ImageDialog) != "undefined") {
                        if (win.ImageDialog.getImageData)
                            win.ImageDialog.getImageData();
                        if (win.ImageDialog.showPreviewImage)
                            win.ImageDialog.showPreviewImage(URL);
                    }
                    tinyMCEPopup.close();
                    break;
                default:
                    //_debug(fileUrl);
                    var path1 = $(".selected").parent(".edit").attr("rel");
                    var path2 = $(".selected").html();
                    var fileUrl = path1 + path2;
                    document.location.href="download.php?file="+encodeURIComponent(fileUrl);
                    break;
            }
});
AndreaGvA commented 9 years ago

I found a little time to test my script and it works. I don't have my android device here to test it. You can found the fix in the new git brach called android-fix. In next version i will add on-line buttons for each files to appear on file selection to make it more intuitive.

webuk commented 9 years ago

Hi. Thanks for letting me know. I'll do a test and get back to you with some feedback. I was playing with the code above but couldn't get it to work. Likely just the way I implemented it though.

webuk commented 9 years ago

WORKING Tested with both Chrome and the inbuilt Android browser using a and no issues found. (using Android 4.44 | Phone: One plus One | Chrome 40.0.2214.109) Let me know if you need any testing done else where with Android. Happy to assist. Many thanks

AndreaGvA commented 9 years ago

You'r welcome. I will add this fature with better graphics in the master.

For now i'm working on a lot of projects to gain some money for living and in the same time i'm triyng to finish the package for the first relase of my open-source CMS.

The filemanager is a little library i wrote for the CMS and i will work on the new version after the CMS launch. I hope to publish it in a few month. Please follow me.

webuk commented 9 years ago

Hi.

I've started to follow you.

Its funny you mention this is for a CMS. I've written a PHP CMS too. Its working.. could be better. This is a demo of the front with with its iframe and rss mod enabled. http://books_bkbrown.purplepanel.com

At the moment it has a very simple file up-loader but I'm looking to replace that. I've have been pondering whether to write a mainly PHP based file manager for it or to maybe use yours or one other that I found. Decisions :-)

I wish you all the best with your CMS. Let me the site URL after launch. Would love to have a look round.

And I fully appreciate having do to paid work to make a living. You must always put that first. I've been working online now for 12 years. I think its best to describe myself as a Jack of all trades, master of none.

Cheers

AndreaGvA commented 9 years ago

If you want you can see some of my cms frontends in production here: http://www.technosky.it http://www.utopialab.it http://www.mpcreations.it

I've written the core code about 5 years ago and remodeled it a lot of times. Now it has:

Full multilanguage support Template Engine Plugins Engine Shared avatars

I tested it with ARACHNI and VEGA vulnerability scanners. I tested the anti brute-force login module with HYDRA.

And i've written plugins for: blog (with comments) portfolio ecommerce private area shared folder and a lot more.

It has a lot of dependencies and now i'm morphing it to a full ajax/php onepage app and porting it to bower and grunt. Meanwhile i'm translating the code variables from italian to english and writing the tags to generate the php documentation.

This ar the final steps before the launch, and i hope that somebody will like it and help improving it. Any help is appreciated.

AndreaGvA commented 9 years ago

I added the fix in the master stream V1.2.1-Touch and i'm gonna delete the android-fix branch Now i can say that the issue is closed.

Cheers

webuk commented 9 years ago

Hi

Really good work with your CMS. Its looking good and seems you already have a wide range of modules. If you haven't already done so, here are some things you might want to think about.

Don't just look at it with your coding hat on. Look at it with a business hat on too. Even if its free, if you do it mores likely to survive long term.

Also... thanks for letting me know about adding the fix to the master branch.

Cheers

AndreaGvA commented 9 years ago

Hi Andy, The admin area is not fully responsive, but is in the todo list after the first relase. (I live in italy :((( a lot of people here doesn't know what responsive is :((((( )

A template is structured like this: There is a index.php that is the homepage template, fully customizable. Is a normal html page. I wrote some api for the most common used functions (last news, menus, slideshow, metatags ecc.)

There is a node.php page that contains the header, menu and footer of the template with in the middle the controller that loads pages and plugins

The normal page template is stored in a page.tpl file that is a plain html with tags like [<TITLE> ] [ <TEXT> ] ecc.

To have other kind of pages you have to write a plugin that is very simple task. I structured the plugins this way: A class.plugin.php handling plugin backend methods A front.plugin.php That is loaded by tamplate engines and is easy to mod (this is the file that replace te tags in the plugin template) A plugin.tpl file that is the same as page.tpl [optional] a plugin-inner.tpl (for plugins like news/blog with list and a inner page)A plugin.admin.php that extend the controller and intitialize the plugin methods A plugin.less file to include the styles in the main.less file A plugin.js file to include in the admin js for the plugin admin js part

Admin js has a controller to launch the plugin.js content only when the plugin is called in the control panel. Is easily extendable. jQuery and jQuery ui framework are included (to drag, sort ecc.)

I wrote methods to add easily comments, galleries, videos, attachments to every plugin as easy just as typing in the plugin class $this->attachments($plugin_id, $plugin_item_id); This methods are globally accepted like tags [<attachments>] in every template.

The plugns can be different types: Standalone: plugins that handle a single task (like a single slideshow for the homepage) Handler: plaugins that allows to insert in the nodes structure infinite pages (normal pages, news, portfolio ecc.) Silent: plugins that performs tasks quietly or doesn't need backend features

Whith this system I can buy a simple html template from temeforest for 12$ and make a basic website like this: http://213.203.141.170/spin/index.php?l=ita in a few hours

After reading your comment i started to think that i have to implement a new plugin type to create globally recognized widgets/tags for the template. A new feature for my todo list.

For the Business plan my idea is:

release the first beta with free license as soon as possible with a website, php documentation, basic javascript documentation, dummy template, news basic plugin, basic installation guide

Release some free extensions and a guide to writ plugins

Sell premium modules like e-commerce ecc.

and for the future build a market place where people could share free plugins or sell premium plugins

Perhaps that when i started to write this cms for the client 0 i dint' have a business plan, but now i need money and i don't spend a lot of my free time on this just for fun. I hope to start gaining some money with this, and to find somebody that wants to help to improve it.

Meanwhile to have some money in my pockets i'm: Developing a website, writing an extension to control some asterisk features, developing a set of 4 enigmatography games(to be shown in multimedia points in a museum during a book exposition), extending a client management system to allow dislocated offices to access some features ov the software via vpn.. ecc. ecc, ecc,

I work a lot and in 9 years of experience i never gain enough... need a change for me and for my country!

webuk commented 9 years ago

Hi

It certainly sounds like you are getting there with the CMS. I do think you need to need to make it fully responsive. Thats one thing I did from the start.

You've given me some stuff to think about actually. At present my modules are really only front end, have limited back end interaction and there aren't any silent modules as of yet.

My template system is similar and uses .tpl files. There's a header and footer template. Each page type also has its own overall template such as index, info, iframe, blog, category, blog category etc. These define the overall look of a page type. Certain page types such as a category page also have sub templates which define how the content on that page shows. For instance how the sub categories on a category page will list. These sub templates are selectable when adding a page in admin.

I've also written it so page tags ( mine look like {-Banner_group1-} ) can either be added to a template file or by adding it to the main page content area using the admin page editor.

In the end I would like to make all template files fully editable via admin maybe using jquery to move objects round. But thats a long way off.

I still haven't decided the license for my CMS yet. Its a work in progress. The base code will be free and always free, and most of the initial plugins will be free. Im pondering though whether to encode the functions file to have a call back. A site that isn't registered then would need to show a powered by link. If the user registers the site then they wouldn't need this, and maybe a few extra features might be unlocked. Registering would be free. But by registering they perhaps have to allow me to send them a newsletter or something which could contain offers and news once a month.

I fully intend to eventually have a market place, and a hosted version a little bit like Wordpress. Hopefully these will bring in an income.

I fully understand about not making a lot from doing this. It sounds like you have work coming in though. Try sites like freelancer.com to find work. It is there but it doesn't pay a lot. Just got to keep the faith.