Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

last added on top

Quote Reply
last added on top
How can i fix it so, that when somebody clicks on a category, the sites in that category will get listed chronical listed (last site added will be on top)

Quote Reply
Re: last added on top In reply to
Unless you have hacked the Links scripts, the links should sort in the following manner:


1) New (descending order --> Most New to Least New)


2) Cool (descending order ---> Most Hits to Least Hits)



3) Alphabetical


The following codes do this in the sub build_sorthit routine in the db_utils.pl file:

Code:

($isnew{$a} and $isnew{$b}) and return lc($sortby{$a}) cmp lc($sortby{$b});


Code:

($iscool{$a} and $iscool{$b}) and return lc($sortby{$a}) cmp lc($sortby{$b});


Code:

return lc($sortby{$a}) cmp lc($sortby{$b});


Regards,

Eliot Lee