Here are a couple things that you can do:
1) Add the following line of codes:
Code:
@{$links{$cat}} = &build_sorthit (@{$links{$cat}});
BEFORE the following codes:
Code:
$links .= &site_html_link (%tmp);
This will give a listing of links in the following manner within the "invisible" category (because links are actually created from categories, but by deleting the category line I had you delete before, the categories will not appear, but the links will appear in order of the categories they are associated with):
NEW
POPULAR
ALPHABETICAL
2) Add the following sub-routine to your
db_utils.pl file:
Code:
sub build_tree_sort {
# --------------------------------------------------------
# Alphabetical sorting routine.
my (@unsorted) = @_;
my ($num) = ($#unsorted+1) / ($#db_cols+1);
my (%sortby, $hit, $i, @sorted);
for ($i = 0; $i < $num; $i++) {
$sortby{$i} = $unsorted[$db_sort_links + ($i * ($#db_cols+1))];
}
foreach $hit (sort {
return lc($sortby{$a}) cmp lc($sortby{$b});
} (keys %sortby)) {
$first = ($hit * $#db_cols) + $hit;
$last = ($hit * $#db_cols) + $#db_cols + $hit;
push (@sorted, @unsorted[$first .. $last]);
}
return @sorted;
}
Then in the
nph-build.cgi file in the
sub build_tree_page routine, add the following codes:
Code:
@{$links{$cat}} = &build_tree_sort (@{$links{$cat}});
BEFORE the following codes:
Code:
$links .= &site_html_link (%tmp);
The links will appear in alphabetical order between the "invisible" categories.
I know this must be terribly confusing...but this is all I can come up with for now.
Best of luck!
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
[This message has been edited by AnthroRules (edited March 20, 2000).]