rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: bidoufr on February 12, 2008, 08:39:45 AM

Title: function with the new version
Post by: bidoufr on February 12, 2008, 08:39:45 AM
Your tools is very easy to use. Thanks ;)

I would like to know if is possible to add a function in the new version.

When I display a screen with sub folders, I want to download all the files in one of sub folders.

Is it possible to write this function ?


Thanks ;)

Bidou
Toulouse - France
Title: Re: function with the new version
Post by: rejetto on February 12, 2008, 09:42:34 AM
Hello
what version are you using?
did you see the "folder archive" link ?
Title: Re: function with the new version
Post by: bidoufr on February 13, 2008, 09:41:41 AM
I use the 2.2d version

I'm in the expert mode.

I don't find this function.

I want download all files in a directory :)

example : I've a directory DIR1, in this directory I've 20 files.
When I click on the sub directory DIR1, there are two options :
- I can see the files on the sub directory
- I can download the sub directory with all files.

I research this function ;)
Title: Re: function with the new version
Post by: Mars on February 13, 2008, 10:20:14 AM
http://www.rejetto.com/wiki/index.php?title=HFS:_Folder_Archives


http://127.0.0.1/yourfolder/~folder.tar        for all files in yourfolder

or

http://127.0.0.1/yourfolder/~folder.tar?recursive        for all files in yourfolder with all sub-folders
Title: Re: function with the new version
Post by: bidoufr on February 13, 2008, 12:12:40 PM
Merci pour l'info ;)

Mais le but du jeu était d'avoir sur l'interface un bouton qui te permettes de le faire cette operation sans la saisir dans la barre d'adresse de ton browser.

Title: Re: function with the new version
Post by: bidoufr on February 13, 2008, 12:16:47 PM
et au niveau de chaque ligne.
Title: Re: function with the new version
Post by: rejetto on February 13, 2008, 12:45:01 PM
With the default template of HFS 2.2 you can enter the subfolder, then click on "folder archive" on the very bottom/right of the page.

To keep the default template but to have this change of your own, you can
right click on the root/home
advanced
diff template
a dialog will popup
Enter this text
Code: [Select]
[folder]
<tr><td>%new% %protected% <a href="%item-url%"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<td align=center><i>folder</i><td align=right>%item-modified%<td align=right>%item-dl-count%

and edit it at your wish, by adding an html link to the archive, that is
Code: [Select]
<a href='%item-url%/~folder.tar'>Download this subfolder</a>
Title: Re: function with the new version
Post by: Mars on February 14, 2008, 11:15:20 AM
comme le dit si bien rejetto , dans ta section folder tu places un lien  comme ceci

<a href='%item-url%/~folder.tar'>Download this subfolder</a>

ou y ajouter un bouton

<button onclick="window.location='%item-url%/~folder.tar';">Download this subfolder</button>
Attention car ici les guillements et les apostrophes ont une fontion bien présice et doivent rester dans vet odre.

au final:

[folder]
<tr>
  <td>%new% %protected%<a href="%item-url%"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<p><button onclick="window.location='%item-url%/~folder.tar';">Download this subfolder</button>
  <td align=center><i>folder</i>
  <td align=right>%item-modified%<td align=right>%item-dl-count%