Let's say wanted to create a module with a form including a control that allows the user to select one of the folders in either the uploads or the images directory, could the standard File Manager included in the core be used to accomplish this?
I imagine something like having a button that when clicked opens a new windows that shows the uploads directory and its sub directories. The user may select the current directory or choose to navigate into one of the subdirectories. The file names of the files residing in the current directory should be visible but neither click- nor selectable.
So, is it possible to reuse functionality of the File Manager to do (part of) this?
TIA.
Reuse / hook into File Manager?
Re: Reuse / hook into File Manager?
I've also looked into how I could use the FileManager's code to aid me in the develoment of a module. IIRC, I had troubles with including the FileManager libraries into my code, I just couldn't get the file /lib/filemanager/ImageManager/config.inc.php properly included. Other priorities kept me from further investigating this matter.
I think I 'heard' on the IRC-channel that some new code is being prepared for the FileManager, maybe that will include ways of reusing that code? Maybe a more experience CMS-MS user and/or core developer can comment more on this?
arwan
I think I 'heard' on the IRC-channel that some new code is being prepared for the FileManager, maybe that will include ways of reusing that code? Maybe a more experience CMS-MS user and/or core developer can comment more on this?
arwan
Re: Reuse / hook into File Manager?
I don't know FileManager well, but in cmsmadesimple-1.0 you can create a module object from another (installed) module very easy, just do:
and you will have access to all it's members and methods.
Code: Select all
$filemanager = $this->GetModuleInstance('FileManager')
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Reuse / hook into File Manager?
The standard file manager included in the core is not a module per say....... the Uploads module is though, and you can see how it's integrated into the Banners module for an example.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Reuse / hook into File Manager?
So you're saying that the FileManager cannot be used e.g. by other modules? It seems a bit redundant to have to depend on another module that does the same thing as something that's already in the core, no?calguy1000 wrote: The standard file manager included in the core is not a module per say....... the Uploads module is though [...]