Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Highest Rating First Problem

Quote Reply
Highest Rating First Problem
How do I get the highest rating first?

Alex
Quote Reply
Re: Highest Rating First Problem In reply to
Where do you want it?

The search.cgi is a problem, but the other orders should be set in the Links.pm file by adjusting the sort parameters:

Code:
# The default sort orders for links.
$LINKS{build_sort_order_category} = "isNew, isPopular, Add_Date DESC";
$LINKS{build_sort_order_new} = "Add_Date,Title";
$LINKS{build_sort_order_cool} = "Hits DESC";
$LINKS{build_sort_order_search} = "isNew,isPopular,Title";

It's not perfect, because processing is done AFTER the links are selected, and this is only for how the links are selected from the database.

Hopefully, Alex will polish off the routines so that the order is not affected once the links are selected.

But, for example, the links are attempted to be grouped by category in the New and Cool pages, and that affects sort order. You need to remove those lines (I've posted how to do it) to get a pure "hit" or or "Ratings" return on those pages.



------------------
POSTCARDS.COM -- Everything Postcards on the Internet www.postcards.com
LinkSQL FAQ: www.postcards.com/FAQ/LinkSQL/