Hello,
I am creating a module. In a form i need a filepicker that looks at files and subfolders in the uploads map of cmsms. If the user clicks on a file i want the url of this file to appear in a input box.
Is there someone outthere who made this already or knows a great script i can use for this?
I tried to use the filepicker from TinyMCE, but i couldn't get it to work.
I hope someone can help me.
Regards,
Bas
Filepicker for a form
Re: Filepicker for a form
Hi Bas,
I agree that Wysiwyg editors would need a much more interesting interface for this...
If it is of any help, CTLModuleMaker creates modules that can do that kind of thing. The code in src/action.browsefiles.php, for example, allows you to browse files and select one - in my case it's to assign it to a row in the database, so you'd have to change it, but it could save you time. It's php, so it reloads, and you can't just get the url back to the middle of a textarea, for example, but if it's of any use, feel free to use any code in the module (after all, it's open source!) - but it's a mess..
This being said, I think a more elegant solution would be to try to instantiate the FileManager module and use it for your purposes, but I myself was too lazy to try it...
I agree that Wysiwyg editors would need a much more interesting interface for this...
If it is of any help, CTLModuleMaker creates modules that can do that kind of thing. The code in src/action.browsefiles.php, for example, allows you to browse files and select one - in my case it's to assign it to a row in the database, so you'd have to change it, but it could save you time. It's php, so it reloads, and you can't just get the url back to the middle of a textarea, for example, but if it's of any use, feel free to use any code in the module (after all, it's open source!) - but it's a mess..
This being said, I think a more elegant solution would be to try to instantiate the FileManager module and use it for your purposes, but I myself was too lazy to try it...