Ok, will do.
Also, It looks like the span cool page mod is interferring the links display, as I applied what I think it's the correct placement for the new code but no links are displayed at all.
Please note the commented and uncommented stuff:
Code:
sub build_cool_page {
# --------------------------------------------------------
# Creates spanned "What's Cool" pages.
local ($total, $hits, $percent, $link_results, $title_linked, $title, $next, $prev);
my (%link_output, $category_clean, $url, $page_num, $prev_page, $next_page, $numlinks);
if ($build_cool_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
$total = 0;
$numlinks = 0;
CATEGORY: foreach $category (sort keys %cool_links) {
LINK: for ($i = 0; $i < ($#{$cool_links{$category}}+1) / ($#db_cols + 1); $i++) {
$total++;
}
}
$numlinks = $total;
$title_linked = &build_linked_title ("Cool");
open (COOL, ">$build_cool_path/$build_index") or cgierr ("unable to open what's cool page: $build_cool_path/$build_index. Reason: $!");
print "\tCool Links: $total\n";
($db_popular_cutoff < 1) ?
($percent = $db_popular_cutoff * 100 . "%") :
($percent = $db_popular_cutoff);
close COOL;
$url = $build_cool_url;
$next = $prev = $link_results = "";
if (($numlinks > $build_links_per_page) && $build_span_pages) {
$total_pages=(int($numlinks/$build_links_per_page));
if ($total_pages < $numlinks/$build_links_per_page) {$total_pages++}
$next .= "<b>1</b>"; # new added
for $j(2..($total_pages)){
$next .= qq~ <a href="more$j$build_extension">$j</a>~;
} # end of for #added
$page_num = 2;
$next .= qq~ <a href="more$page_num$build_extension">[Next >>]</a>~;
$p = 1;
$t = 0;
$i = 0;
$r = 0;
# foreach $category (sort keys %cool_links) {
foreach $hit (sort {$b <=> $a} keys %cool_links) {
$category_clean = &build_clean ($category);
if ($i < $build_links_per_page) {
LINK: for ($q = 0; $q < ($#{$cool_links{$category}}+1) / ($#db_cols + 1); $q++) {
if ($i < $build_links_per_page) {
%tmp = &array_to_hash ($q, @{$cool_links{$category}});
$link_output{$category} .= &site_html_link (%tmp) . "\n";
$i++; }
else {
$r--;
$t = $q;
last; }
}
# $link_results .= qq|<P><A HREF="$build_root_url/$category/$build_index">$category_clean</A>\n|;
# $link_results .= $link_output{$category};
$link_results .= $link_output{$hit};
$r++;
}
}
$p++;
$numlinks = $numlinks - $i;
}
Can u help?
Thanks!
(working test version at http://webcamworld.com/directory/)
Thanks!