rejetto forum

Apparently sorting by hits is supported in 2.1...

TSG · 6 · 3923

0 Members and 1 Guest are viewing this topic.

Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
Here's the problem.

I have been editing the ToG and i want to put in sorting by hits because i read that this is now supported in 2.1, and it is also in the context menus of HFS to set as a default. Now what i want to know is why <a href="%encoded-folder%?sort=h">Hits</a></th> does not work? is this the right code, if not what is the letter used for sorting by hits.

If i have it correct. Go to my server and you will see that it is not working for some reason ???

[files]
<table class=table width="100%" cellspacing=0 cellpadding=0>
   <tr>
      <th style="border:0px;"><a href="%encoded-folder%?sort=n">File</a></th>
      <th><a href="%encoded-folder%?sort=s" id=th>Size</a></th>
      <th><a href="%encoded-folder%?sort=t">Age</a></th>
      <th><a href="%encoded-folder%?sort=h">Hits</a></th>
   </tr>
   %list%
</table>

Correct Code:

[files]
<table class=table width="100%" cellspacing=0 cellpadding=0>
   <tr>
      <th style="border:0px;"><a href="%encoded-folder%?sort=n">File</a></th>
      <th><a href="%encoded-folder%?sort=s" id=th>Size</a></th>
      <th><a href="%encoded-folder%?sort=t">Age</a></th>
      <th><a href="%encoded-folder%?sort=d">Hits</a></th>
   </tr>
%list%
</table>

or:

[files]
<table class=table width="100%" cellspacing=0 cellpadding=0>
   <tr>
      <th style="border:0px;"><a href="?sort=n">File</a></th>
      <th><a href="?sort=s" id=th>Size</a></th>
      <th><a href="?sort=t">Age</a></th>
      <th><a href="?sort=d">Hits</a></th>
   </tr>
%list%
</table>

Whatever you prefer.

Cheers.
« Last Edit: May 13, 2010, 05:59:26 AM by TSG »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
see the default template
<th><a href="?sort=d">Hits</a>

you see, it's a "d"

and i advice to remove the %encoded-folder%, you should normaly not need it.


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
Thanks for that, why is it the letter D btw, I find that strange lol.

OHH i just realised, UP and DOWN, haha niiice. i will make 2 buttons i think. :)

I am slowly correcting a lot of old methods used from the black template in the ToG to the new HFS 2.1 stuff. One day it will be perfect, its not far off i think.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
it stands for "downloads" :)
later HFS begun discriminating hits and downloads:
a hit is just a request, a download is full download of the file (as far as i remember)


atm up/down is not supported by the sorting


Offline TSG

  • Operator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
lol my bad, now i get it :P im a little slow at times >_<

How long till up/down sorting?