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

some links not alphabetized

Quote Reply
some links not alphabetized
  Some of the links on my pages are not alphabetized. The affected links always appear at the top of the page.

Does this mean a corrupted database? Anyone know how to correct this?
Quote Reply
Re: some links not alphabetized In reply to
 In looking at my links.db, I see there are links are out of order in the database.

For example, the links go in a series such as: 1, 2, 3, 8, 9, 4, 5, 6, 10, 11, 12.

I assume the ID number assigned a link has nothing to do with how it is sorted, but was else could be causing this?

When I began entering links for the first time, I noticed the starting ID was "2" and I changed that to "1" because I thought, "Why is it starting at 2 when I haven't entered any links yet?" If this is causing the problem, how can it be corrected?

[This message has been edited by jones (edited April 11, 1999).]
Quote Reply
Re: some links not alphabetized In reply to
Links are sorted alphabetically in this order: New, Cool, and the rest. In other words, the new links are listed first (alphabetically), followed by the cool links (alphabetically), followed by the rest (alphabetically).

Check your linksid.txt file in the admin/data directory. If the number in there is equal to the highest link ID you have, there is no problem with it.
Quote Reply
Re: some links not alphabetized In reply to
Ugh. I don't show the "cool" and "rate it" features (edited them out in site_html.pl).

I know the non-alphabetical listings are not a result of new links though.

How can I force an alphabetical sorting?
Quote Reply
Re: some links not alphabetized In reply to
If you want all alphabetical listings without new and cool links being listed first, just go to db_utils.pl, sub build_sorthit and comment out the following lines:

Quote:
($unsorted[$db_isnew + ($i * ($#db_cols+1))] eq "Yes") and ($isnew{$i} = 1);
($unsorted[$db_ispop + ($i * ($#db_cols+1))] eq "Yes") and ($iscool{$i} = 1);
($isnew{$b} and !$isnew{$a}) and return 1;
($isnew{$a} and !$isnew{$b}) and return -1;
($iscool{$b} and !$iscool{$a}) and return 1;
($iscool{$a} and !$iscool{$b}) and return -1;
($isnew{$a} and $isnew{$b}) and return lc($sortby{$a}) cmp lc($sortby{$b});
($iscool{$a} and $iscool{$b}) and return lc($sortby{$a}) cmp lc($sortby{$b});

I hope this helps.

[This message has been edited by Bobsie (edited April 12, 1999).]