rejetto forum

Address line with some operators

kpuk · 15 · 6996

0 Members and 1 Guest are viewing this topic.

Offline kpuk

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
How right wrote this line
<a href="http://%host%%encoded-folder%?recursive&sort=t&page=1&limit=20">View New Files</a>
It must show first 20 new files by date, but i think one ore more operators does not work.
Correct for me does pliz.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
hello rejetto it's good idea to add  a new line parameter NEW to use like ?recursive&new to see only  files according with %new%


Offline Foggy

  • Tireless poster
  • ****
    • Posts: 806
    • View Profile
with all the new filters lately we cant skip what mars is proposing.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
the "new" filter is accepted.

the sort=t may work or not.
it is based on the timestamp of the file on disk.
if the file was created 1 year ago, but added today, it will report the old timestamp.


Offline kpuk

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
See:
I use, as example, hfs for library in my local network
And have deep directory structure, that wery need subj.
If you sort=t and one file located at /Scientific/phisics/radiophisics/journal and next file located at /popular/fantasy/some_autor/some_other_folder etc.
It wery Inconveniently.

ps: sorry for my english


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Offline kpuk

  • Occasional poster
  • *
    • Posts: 13
    • View Profile

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
href="?recursive&sort=t&page=1&limit=20&folders-filter=\"

you don't need to specify the rest of the address


Offline kpuk

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
rejetto - You the best of the best =)
It works fine.
Where i can read about folders-filter=\  ??

Add:

Now i test that string href="?recursive&sort=t&page=1&limit=20&folders-filter=\" and find troublre:
Hfs sort by date only first 20 files which it find.
It let me think that first execute "page=1&limit=20" then "="?recursive" and last one "sort=t"
Bug or not?

ps: sorry for my english
« Last Edit: November 15, 2007, 04:32:08 PM by kpuk »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
yeah, you are right, but that's what it is meant to do.
it sorts the first 20 files found. it's not a bug.
the other way would be, find 10'000 files, sort them, and keep only first 20. clearly this is much more slow.

i would surely leave the first method, but i may introduce the other one through another parameter.



Offline kpuk

  • Occasional poster
  • *
    • Posts: 13
    • View Profile
Ok, i finish ask aboun "Show new files"
if You do this it been great. I am not leave are hope. (is it right wrote in English?)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Offline bacter

  • Operator
  • Tireless poster
  • *****
    • Posts: 681
    • View Profile
Rejetto:
In the preference of execution of parameters I think the first thing to execute should always be select (with some filter or search , considering if recursive is present) and after that sort and at last formatting( page, limit..), even if the user places them in another order.

First select, then sort, that's a lot faster!
your computer has no brain - use your own !


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
bacter

The order of the parameters is not important, the execution is made in hfs in a very precise order chosen beforehand
The list is created according to filters and rights and the organization is later made