Open alihammad-gist opened 10 years ago
+1
+1
i think there is not a good solutions because you lose config parameters every update, if you know a method to prevent this i can consider to add
Your configuration should not be part of the repository anyway. Ideally your code would all be placed inside an object and the config would be passed to it. This is however a lot of work.
The problem with the filemanager currently is that it integrates really bad with any other software because it requires the files to be web-accessible. Most PHP frameworks have their own routing and integrating responsive filemanager with it is pretty much impossible.
A simple solution is to rename config.php to config-defaults.php, then the user must manually rename it to config.php thereby making sure a future update won't change the configuration.
I know that this code is very bad, but it was born for a little filemananger i'm working in a new version completely rewritten
Good to hear, if you have something on github let me know and I might be able to help out a little with some bug fixes =)
Hi @trippo , there is a simple solution to don't override config as wrote @SamMousa your config must be named config-default.php then user can create his own config.php with only his custom sets. First RFM includes config-default.php and then if it exists a config.php file FM include it too :)
@m-zanetti you are right!
+1
my suggestion would be to use Silex so there is one front controller for everything that javascript part needs, this would also mean that's easier to secure the access to php files for those of us that are a bit paranoid in allowing arbitrary php file execution.
:+1:
@trippo , how do you anticipate, when this rewritten version would be available? I would really want to use it with my Symfony project, but in current shape it is quite hard to achieve.
I would like to know to. And is it possible to make this project public on github, as an alpha/beta version, so we can help?
This is a very important issue for me too. And the config is not really a problem. For example: I have a post-update-cmd in my root composer.json which writes my individual config file. And i think the composer file will not break anything. Thanks!
Pre install scripts on composer can be used to make a copy of an older file to a new one.
I've done a pretty much complete re-write of this to suit a silex based application, could do with a tidy up but most functionality is working.
Uses namespaces ect now, with config setup like in any other silex app. Each action (call_ajax.php and execute.php) is split into its own class which implements a shared interface (but not enforced) - updated the JS to suit this so actions would post to /somepath/ajax/{action} ie {action} = GetFile where GetFile is constructed and set's a response array.
Also the templating has been updated to use twig.
The re-write is not finished but Im not 100% sure how to publish it for others to use, mabe somone could point me in the correct direction.
@trippo is it possible to implement this?
+1 for the usage of composer I try to integrate it to my new Symfony project, @Kingtreemonkey could you at least create a new repository in Github to have a look at your rewrite ?
sure, could do with a bit of tidying up in parts - will sort this evening (time permitting!)
Thanks a lot :)
@Jbaal https://github.com/Kingtreemonkey/FileManager Hope it's of help!
@Kingtreemonkey Thanx again, really helpfull ;)
any news?
@Kingtreemonkey Are you planning on updating this any time soon?
Hi Ruben,
If you have any questions on my version / request(s) please enter them into an issue on https://github.com/Kingtreemonkey/FileManager
Thanks!
On Thu, Mar 10, 2016 at 2:04 PM, Ruben notifications@github.com wrote:
@Kingtreemonkey https://github.com/Kingtreemonkey Are you planning on updating this any time soon?
— Reply to this email directly or view it on GitHub https://github.com/trippo/ResponsiveFilemanager/issues/136#issuecomment-194858221 .
I think this would not be a good idea. I am a .NET developer and have managed to get this file manager working in ASP.NET MVC (See: http://www.codeproject.com/Tips/1004596/Using-Responsive-File-Manager-in-ASP-NET-MVC). I don't know much about PHP really.. but for me, keeping it as simple PHP is fine, but making it only work with some PHP framework would make future versions unusable.
No, I think the way forward is not to rewrite the file manager to be framework specific, but rather to make it pure HTML5/JavaScript. That way, all web developers can make use of this.. regardless of whether they're using PHP, .NET, Java, Ruby, etc..
@gordon-matt Composer is not a framework; it is a dependency manager. I'm all for separating backend (PHP) from frontend (HTML / JS).
But as long as there is PHP code and there are dependencies on other libraries composer is the way to go.
If backend and frontend are separated it makes sense to use something like Bower for the javascript dependencies and composer for the PHP backend.
@SamMousa : I rely on a PHP compiler called Phalanger. As long as using this "Composer" doesn't mean incompatibility for me, sure.. I have no issue there. :-)
However, I have noted that Alberto has on several occasions mentioned that he is looking to rewrite the whole thing, using AngularJS. I still think that is the best way forward: pure JavaScript. It would also mean more of us can more easily make use of and even contibute to the project - not only PHP developers.
Composer itself is just PHP so if you can run PHP code you can use composer to install dependencies.
I agree that frontend / backend should be separated.
+1
+1
+1 any news about new version?
+1
+89
i think there is not a good solutions because you lose config parameters every update, if you know a method to prevent this i can consider to add
You don't. because you can check if config array exist like on uploads.php .
You can declare that change on config array, will forced upgrade version. When you change the config array the version will rise from 10.1.8 t 11.0, and not 10.1.8 ti 10.1.9,
Does this "feature" will come one day ? +1
I think the best approach for composer compatibility is to break out the project into two separate projects. I see @trippo has mentioned work on an update, but not sure where that stands. Would be happy to help out here.
This is what I see needs to be done:
I would be happy to do much of the PHP and API documentation work. Just want buy in from @trippo as to not waste time with something that will not move forward.
please use composer