Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Sorting links in ascending order

Quote Reply
Sorting links in ascending order
How do you sort links in ascending order by date? I have links.def set to sort by date, but it sorts descending.

Thanks,
Cowboy
Quote Reply
Re: Sorting links in ascending order In reply to
You have to switch the following codes in the sub build_sorthit routine in the db_utils.pl file:

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

with the following codes:

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

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums


[This message has been edited by AnthroRules (edited March 03, 2000).]
Quote Reply
Re: Sorting links in ascending order In reply to
Sorry, Eliot. I had my head on backwards when I said I wanted the links sorted ascending. I meant descending, which would put the newest date first. I did switch the code to the first example you gave, which I supposed was to sort descending, but that didn't work. Also, the only sub I could find that matched was sub build_sorthit. Is this the correct sub? Any help would be appreciated.

Thanks,
Cowboy
Quote Reply
Re: Sorting links in ascending order In reply to
I don't know why the default configurations are not working since it is supposed to sort by the following:

1) New (Descending - Most Recent to Oldest)
2) Popular (Descending)
3) Alphabetical (Ascending)

Regards,


------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums