rejetto forum

Problem with sorting in file listing

0 Members and 1 Guest are viewing this topic.

Offline RSchnei

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
I use the HFS latest version 2.2f and have some problems on sorting the files. For example if I try to sort files with "sort=n"

0344.txt
0345.txt
0346.txt

everything works fine, but I need to change it!
How can I change the sorting to

0346.txt
0345.txt
0345.txt

I read something with parm "rev" and I tried all what I have found in faq ... but nothing helps. Hopefully anybody can help me.
Thanks.


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
i fear maverick solution won't always work.

a better solution may check the referrer, and if it's not an internal link, redirect the user to the url with "rev".
with HFS 2.2 this must be done with javascript onbly.
with 2.3 is easier (for me), and it's like adding this script just before the line with </head>  in the template

{.if not|{.pos|{.header|host.}|{.header|referer.}.}
|<script language=javascript>window.location='{.get|url|rev=1.}'</script>/if.}


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
i fear maverick solution won't always work.

My solution has worked without any problem for months and months in the various builds of 2.3 beta.  No javascript required.  I hope you don't break it.

I haven't tested with 2.2f.

maverick