create page with links from an folder

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
Guerrero
Forum Members
Forum Members
Posts: 30
Joined: Sun Jan 27, 2008 3:26 am

create page with links from an folder

Post by Guerrero »

is available some module that lets you have a page that automatically have links to all the files in an folder?

i.e. suppose I have an folder .....\documents

and I like have a page listing all the files in the folder as:

down  date  filename

where date are the date of the filename, obviously.
down can be an little image with the link

a table format with three columns would be great.

other option can be run each n minutes or hours an job that creates the page or table....

thanks.
JeremyBASS

Re: create page with links from an folder

Post by JeremyBASS »

use the php function gob ... something like

{assign var=Files value="documents/*"|glob}
{foreach from=$Files item='File'}
{$File}
{/foreach}

look to the php man for more info

cheers
Jeremy
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: create page with links from an folder

Post by jmcgin51 »

IIRC there is a filelink plugin for this.  Check the Forge or search the Forum; this has been discussed before.
Guerrero
Forum Members
Forum Members
Posts: 30
Joined: Sun Jan 27, 2008 3:26 am

Re: create page with links from an folder

Post by Guerrero »

Hi Jeremy,
thanks very much.

unfortunately I don't have the knowledge nor the time for refine your idea, that works but
- don't create links
- shows the folder for each file, I want only the file
- don't show date of each file
- shows a blank line between each file

also unfortunately I've some troubles with the embebed editor in cmsms 1.6.6, thus don't show the toolbar, see image.
http://farm3.static.flickr.com/2679/4409169221_bc04438e6c_o.png
Guerrero
Forum Members
Forum Members
Posts: 30
Joined: Sun Jan 27, 2008 3:26 am

Re: create page with links from an folder

Post by Guerrero »

jmcgin51 wrote: IIRC there is a filelink plugin for this.  Check the Forge or search the Forum; this has been discussed before.
in Extensions - Module manager there is nothing like these.
JeremyBASS

Re: create page with links from an folder

Post by JeremyBASS »

Guerrero wrote: also unfortunately I've some troubles with the embebed editor in cmsms 1.6.6, thus don't show the toolbar, see image.
http://farm3.static.flickr.com/2679/4409169221_bc04438e6c_o.png
first.. try to addjust the settings for the tinyMEC... look for static confing in the advanced tab... Next
Guerrero wrote: unfortunately I don't have the knowledge nor the time for refine your idea, that works but
- don't create links
- shows the folder for each file, I want only the file
- don't show date of each file
- shows a blank line between each file
you need to think outside the box... to filter out the folders... use /*.* instead of /* ... to create the links like so wrap it in an ... just add the line in the foreach... foreach... 


{assign var=Files value="documents/*.*"|glob}
{foreach from=$Files item='File'}
{$File} - date {$File|filemtime|cms_date_format} |
{/foreach}
here it is in action



Now that is just the rough.. you can do this to all the folder you wish...  you'll need to spent the time and learn some of this if you’re planning on doing more... sorry I had to do the same... but this should be more than enough to get you started… also Google smarty and read up on that.. a days worth of study may same some hair from being pulled later  my friend.  Cheers -Jeremy
Last edited by JeremyBASS on Sat Mar 06, 2010 12:55 am, edited 1 time in total.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: create page with links from an folder

Post by jmcgin51 »

Guerrero wrote:
jmcgin51 wrote: IIRC there is a filelink plugin for this.  Check the Forge or search the Forum; this has been discussed before.
in Extensions - Module manager there is nothing like these.
That's why I said check the Forge or search the Forum.

http://dev.cmsmadesimple.org (search for "download")

or search the Forum for "list files"
Guerrero
Forum Members
Forum Members
Posts: 30
Joined: Sun Jan 27, 2008 3:26 am

Re: create page with links from an folder

Post by Guerrero »

{assign var=Files value="documents/*.*"|glob}
{foreach from=$Files item='File'}
{$File} - date {$File|filemtime|cms_date_format} |
{/foreach}
Jeremy,
Thanks very much, it works .
Guerrero
Forum Members
Forum Members
Posts: 30
Joined: Sun Jan 27, 2008 3:26 am

Re: create page with links from an folder

Post by Guerrero »

IIRC there is a filelink plugin for this.  Check the Forge or search the Forum; this has been discussed before.

That's why I said check the Forge or search the Forum.

http://dev.cmsmadesimple.org (search for "download")

or search the Forum for "list files"
Oh, I've found it:
http://dev.cmsmadesimple.org/projects/list_downloads

Thanks very much.
Post Reply

Return to “Modules/Add-Ons”