I’m looking to create a file repository where specified web users can upload files that will then be displayed in list form on a page - something similar to a Google Groups type environment.
Two things:
1) Can I use a front end editor and restrict it to only give web users ability to upload files (.doc, .pdf, etc.) to a designated folder? Is there a way to prompt the FCKEditor file uploader without going through the QuickEdit window?
2) For displaying the files I wanted to use Ditto, but I can’t seem to figure out how to direct it to a server folder. Can you do this? Seems like it does, but I’m new to some of this stuff. If Ditto doesn’t do this, what does?
Thanks in advance!
This will let users upload files in the front end:
http://modxcms.com/extras/package/149. I think there may be others as well.
I don’t think you can get ditto to display files (though I could be wrong). You could use a template variable with @DIRECTORY, but
I think you’ll probably want a custom snippet to read and sort the filenames with a few tpl chunks to display them.
-
☆ A M B ☆
- 24,524 Posts
You can also use a TV of the input type "File". Then you could use Ditto with the link URL made from the TV value in the Ditto chunk tpl.
Gotcha on the TV type "file."
Can you give me an example of what the Ditto template chunk tpl would look like if I wanted the files displayed in a list? Seems like using TV’s would mean that you would need a TV for each individual doc.... Am I confused here?
-
☆ A M B ☆
- 24,524 Posts
Ah, I missed the part about it being on the front-end. You could use a simple form with a file upload field and any other fields you want, such as a description, and during the process insert metadata from the form into a database table (such as user ID if these users will be logged in), then use another snippet to read that table and make your list.
What about the FileCabinet snippet? It’s pretty old, but I’ve been using it successfully for years (other than a few bugfixes; follow the forum posts)
http://modxcms.com/forums/index.php/topic,2897.msg20394.html#msg20394
That link doesn’t seem to be working, or at least I don’t have permission to view it.
-
☆ A M B ☆
- 24,524 Posts
Hm. You’re right. It was originally developed to use as a repository for the MODx site. I’ll see if it’s available anywhere else...
-
☆ A M B ☆
- 24,524 Posts
Seemingly a much simpler solution! Thanks for the help. I’ll be back if/when I have questions putting this together.