rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: slasherx on June 17, 2009, 05:25:14 AM

Title: Sorting
Post by: slasherx on June 17, 2009, 05:25:14 AM
How can i set HFS to sort folders by Time/Date but keeps the files sorted by name in the folders.

Also how i can i set different default sorting for different folders?

Thanks
Title: Re: Sorting
Post by: Caco on June 17, 2009, 10:05:29 AM
I don't think HFS has this capability at the moment. You can only go in Other options/Default sorting and choose the default sorting method for the whole file system.

By the way , can someone tell me what is the "enable nodefault" option?
Title: Re: Sorting
Post by: slasherx on June 17, 2009, 10:34:48 AM
i'm hoping it can be done with macros or something
Title: Re: Sorting
Post by: Caco on June 17, 2009, 12:53:15 PM
Well maybe you can achieve your goal using event scripts:

http://www.rejetto.com/wiki/index.php/HFS:_Event_scripts

You can try with [request] event .

I'm using rawr template 0.1.1. It provides links to display different sortings (name,date,requests...). This is done using "sort=" parameter in ".get" macro.
Title: Re: Sorting
Post by: rejetto on June 19, 2009, 02:31:29 PM
How can i set HFS to sort folders by Time/Date but keeps the files sorted by name in the folders.

HFS itself can't do that.
The best way to get the result i can think of is using javascript.
at every [file] or [folder] you should actually put the data in an array,
then sort it as you like, and finally output it all.

> Also how i can i set different default sorting for different folders?

no clean way that i know.
but you can try by putting a hacking the urls of some folders by having the "?sort=X" appended.
not very nice, but can work.
Title: Re: Sorting
Post by: rejetto on June 19, 2009, 02:34:23 PM
By the way , can someone tell me what is the "enable nodefault" option?

http://www.rejetto.com/wiki/index.php/HFS:_Main_menu#Other_Options

i guess the description may be not very clear. largely improvable.