I'm not using external links and only a few links have detailed pages. If a link is in the top rated page, it's hyperlink goes to it's detail page now, but I can't seem to find a way to turn off the link if it doesn't have a detail page. Thanks to PaulWilson, I was able to turn the detail pages off for certain links and I'm trying to incorporate that same command into this:
$top_rated = ''; $top_votes = '';
foreach (sort { $b <=> $a } @top_votes) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_votes{$_}});
if (!$values[$db_detailed]);{
$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a
href="$db_cgi_url/detailed.cgi?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
}
else {
$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a
href="$db_cgi_url/detailed.cgi?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
}
foreach (sort { $b <=> $a } @top_rate) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_rate{$_}});
$top_rated .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a
href="$db_cgi_url/detailed.cgi?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
open (RATE, ">$build_ratings_path/$build_index") or &cgierr ("unable to open top rated page: $build_ratings_path/$build_index. Reason:
$!");
print "\tVote Range: $top_votes[0] .. $top_votes[$#top_votes]\n";
print "\tRate Range: $top_rate[0] .. $top_rate[$#top_rate]\n";
print RATE &site_html_ratings;
close RATE;
}
If anyone has any other suggestions I'd appreciate it.
Steve
Perl Hopefull
$top_rated = ''; $top_votes = '';
foreach (sort { $b <=> $a } @top_votes) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_votes{$_}});
if (!$values[$db_detailed]);{
$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a
href="$db_cgi_url/detailed.cgi?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
}
else {
$top_votes .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a
href="$db_cgi_url/detailed.cgi?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
}
foreach (sort { $b <=> $a } @top_rate) {
$seen{$_}++;
%link = &array_to_hash ($seen{$_} - 1, @{$top_rate{$_}});
$top_rated .= qq~<tr><td align=center>$link{'Rating'}</td><td align=center>$link{'Votes'}</td><td><a
href="$db_cgi_url/detailed.cgi?ID=$link{'ID'}">$link{'Title'}</a></td></tr>\n~;
}
open (RATE, ">$build_ratings_path/$build_index") or &cgierr ("unable to open top rated page: $build_ratings_path/$build_index. Reason:
$!");
print "\tVote Range: $top_votes[0] .. $top_votes[$#top_votes]\n";
print "\tRate Range: $top_rate[0] .. $top_rate[$#top_rate]\n";
print RATE &site_html_ratings;
close RATE;
}
If anyone has any other suggestions I'd appreciate it.
Steve
Perl Hopefull