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

Sort order problem

Quote Reply
Sort order problem
I've been examining my site carefully the
past few days, and something seems pretty odd.

It looks like the build_sort_order_category works for the first level categories, but when it hits the sub categories the order is ignored. I've tried to see where that could happen, but I can't find it. Anyone else notice that problem?
Quote Reply
Re: Sort order problem In reply to
Hmm, edit nph-build.cgi around line 381 and change:

Code:
$subcat_info = $CATDB->prepare ( qq!
SELECT Category.*
FROM Category, CategoryHeiarchy
WHERE CategoryHeiarchy.CategoryID = ? AND
CategoryHeiarchy.Depth = 1 AND
CategoryHeiarchy.SubCategoryID = Category.ID
!) or die "Can't prepare: $DBI::errstr";

to

Code:
$subcat_info = $CATDB->prepare ( qq!
SELECT Category.*
FROM Category, CategoryHeiarchy
WHERE CategoryHeiarchy.CategoryID = ? AND
CategoryHeiarchy.Depth = 1 AND
CategoryHeiarchy.SubCategoryID = Category.ID
ORDER BY Name ASC
!) or die "Can't prepare: $DBI::errstr";

although this may not be what you are referring to?

Cheers,

Alex
Quote Reply
Re: Sort order problem In reply to
I'm referring to the sort order of the links
in the category pages.

The first level -- categories linked off of
the main page -- are sorted correctly.

Categories that are linked from those pages
have links sorted in what appeares to be a
fairly random (or possibly a default -- isNew, Title, etc -- order. But it's not the same order as the 1st level links.

Quote Reply
Re: Sort order problem In reply to
Speaking of the subject sort order.
In what file, and what code would I change to change the default sort order of the links?
Say, have the highest ranked show first in order of ranking, then the rest of the links shown in NO specific order?

Chris
Quote Reply
Re: Sort order problem In reply to
The sort order is defined in the Links.pm file, about a page up from the bottom.