To change the COOL sort from the way it's done now (by Category, then by Title, hits, etc) you can make a change to the nph-build.cgi in the build_cool_page subroutine:
$total = 0;
while ($link = $sth->fetchrow_hashref) {
$total++;
my $get_link = &site_html_link ($link); ##
$link_output{$link->{'Name'}} .= $get_link ; ##
$link_results .= $get_link ; ###
}
# Create the HTML for the category headers, and join it all together into link_results.
## foreach $category (sort keys %link_output) {
## $category_clean = &build_clean_name ($category);
## $link_results .= qq|<P><A HREF="$LINKS{build_root_url}/$category_clean/$LINKS{build_index}">$category</A>\n|;
## $link_results .= $link_output{$category};
## }
The lines with '##' are the changed ones.
You add 2 lines and change 1 in the top subroutine, and comment out the lines in the bottom one (they are next to each other in the file.
To change the way the links are sorted, edit the parameter in the Links.pm file to whatever you want, and the links will be sorted in that order _without_ being grouped by category.
[made a change to prevent two subroutine calls]
[This message has been edited by pugdog (edited October 18, 1999).]
[This message has been edited by pugdog (edited October 18, 1999).]
Code:
# Create the HTML for the individual links. $total = 0;
while ($link = $sth->fetchrow_hashref) {
$total++;
my $get_link = &site_html_link ($link); ##
$link_output{$link->{'Name'}} .= $get_link ; ##
$link_results .= $get_link ; ###
}
# Create the HTML for the category headers, and join it all together into link_results.
## foreach $category (sort keys %link_output) {
## $category_clean = &build_clean_name ($category);
## $link_results .= qq|<P><A HREF="$LINKS{build_root_url}/$category_clean/$LINKS{build_index}">$category</A>\n|;
## $link_results .= $link_output{$category};
## }
The lines with '##' are the changed ones.
You add 2 lines and change 1 in the top subroutine, and comment out the lines in the bottom one (they are next to each other in the file.
To change the way the links are sorted, edit the parameter in the Links.pm file to whatever you want, and the links will be sorted in that order _without_ being grouped by category.
[made a change to prevent two subroutine calls]
[This message has been edited by pugdog (edited October 18, 1999).]
[This message has been edited by pugdog (edited October 18, 1999).]