Author Topic: Apparently sorting by hits is supported in 2.1...  (Read 1904 times)

0 Members and 1 Guest are viewing this topic.

Offline TSG

  • Operator
  • Tireless poster
  • *****
  • Posts: 1934
    • View Profile
    • RAWR-Designs
Apparently sorting by hits is supported in 2.1...
« on: February 02, 2007, 04:49:35 AM »
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: 12949
    • View Profile
Re: Apparently sorting by hits is supported in 2.1...
« Reply #1 on: February 02, 2007, 04:52:42 AM »
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: 1934
    • View Profile
    • RAWR-Designs
Re: Apparently sorting by hits is supported in 2.1...
« Reply #2 on: February 02, 2007, 04:57:10 AM »
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: 12949
    • View Profile
Re: Apparently sorting by hits is supported in 2.1...
« Reply #3 on: February 02, 2007, 05:02:53 AM »
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: 1934
    • View Profile
    • RAWR-Designs
Re: Apparently sorting by hits is supported in 2.1...
« Reply #4 on: February 02, 2007, 05:07:50 AM »
lol my bad, now i get it :P im a little slow at times >_<

How long till up/down sorting?

Offline rejetto

  • Administrator
  • Tireless poster
  • *
  • Posts: 12949
    • View Profile
Re: Apparently sorting by hits is supported in 2.1...
« Reply #5 on: February 02, 2007, 05:12:34 AM »
no idea atm