function to browse upload dir

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Locked
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm
Location: Roma, Italy

function to browse upload dir

Post by nervino »

Hello, is there a cmsms function that I can use inside a module to browse the uploads directory?

Something like CreateFileUploadInput() that lets you browse the uploads dir instead of user's pc filesystem.
I would make a user able to browse the cmsms uploads dir and choose a file, which name will be hence stored in db.

thank you
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm
Location: Marlow, UK

Re: function to browse upload dir

Post by scooper »

If you're using v1 of CMSMS then you can use the GBFilePicker module

For v2.0 and above GBFilePicker isn't currently working so I put together a quick module for a project which you can find details of in this thread
nervino
Power Poster
Power Poster
Posts: 448
Joined: Sun Dec 28, 2008 12:15 pm
Location: Roma, Italy

Re: function to browse upload dir

Post by nervino »

I had read that post but, on my opinion, the licence's restrictions of the module are a real problem, as Calguy pointed out.
I think the best solution would be the integration of the filemanager module that comes with cmsms. Would it possible?

I am reading Calguy's module writing tutorial (It is conceived and written very well. Thank you Robert!) and on p. 48-49 he explain how to correctly call another module and use its API.
Maybe that could be a start point to work on.

What do you think about it?
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm
Location: Marlow, UK

Re: function to browse upload dir

Post by scooper »

I agree the license could be problematic if you're planning to release your module and had a dependency on ours, but if you just need it for one site then hey, give the developer a donation and you'll be able to use it wherever you want.

Obviously we'd much rather our module was GPL but we needed a solution quickly for a project and Responsive File Browser was the best we could find. If you know of a suitable file browser with a better license then let me know ...

Having said that - I don't really think there should need to be a separate module for this functionality at all. MicroTiny, which is part of the core, already has a reasonable browser and if it had integrated file upload then would be ideal as a replacement for GBFilepicker.

Just being able to to use a content_file tag would be great, we nearly always need to provide that kind of functionality to clients (who are frankly always confused about how to upload files using file manager).
chandra

Re: function to browse upload dir

Post by chandra »

GBFilePicker is "only" the filepicker part from TinyMCE.

Think it should be not so difficult to modify this module ...
Locked

Return to “Developers Discussion”