Posts: 14
Threads: 5
Joined: Oct 2012
I need some public documents on my site. Setting this up seems easy enough thanks to the file manager.
My idea is to upload files into the "public docs" directory in /uploads/ that are public documents for display on the website. How can I set it up so that I can have a page where all the files I upload into this directory are displayed for people to download?
Posts: 1,127
Threads: 136
Joined: Feb 2012
You make a page and in the body of the page you list the documents, then make each entry in the list a link to the document itself. Or were you asking something more complicated?
Posts: 14
Threads: 5
Joined: Oct 2012
(2012-12-12, 09:37:58)Timbow Wrote: You make a page and in the body of the page you list the documents, then make each entry in the list a link to the document itself. Or were you asking something more complicated?
I wanted something where I can just upload documents into a folder and they are already displayed. I have started trying to develop this myself. What I did was make a new template in my theme that includes "showcontent.php". This creates a new function showContent which uses opendir to display any directory. I then call showContent(Path) in the template straight after it grabs the page content.
This works well but it's only halfway there! I need to manually type in the path I want to display in the template. Hopefully we can figure out a way to type the directory into a box when I make the new page and select the template for use.
Posts: 6,267
Threads: 182
Joined: Sep 2011
Posts: 14
Threads: 5
Joined: Oct 2012
(2012-12-12, 10:35:30)shawn_a Wrote: Simpledir plugin
Is there any way that I can define multiple directory listings instead of just one?