Another strange one here.
My Cool page --- I want to simply display the top 10 cool pages.
Sounds simple enough.
In my links.cfg I have set this to 10:-
# Build Options
# --------------------------------------------------------
# Setting for popular cutoff, can either be a percent (i.e. top 3%), or
# a fixed value (i.e. top 10). Enter 0.03 or 10 respectively.
$db_popular_cutoff = 10; # Top 3%
#########################################################
In my admin script when I build all I get this :-
Building What's Cool Page . . .
Cool Links: 14
Done
And rightfully enough 14 links are displayed.
I thought I may have had an error with the sub cool in nph.build but this looks ok too:-
sub build_cool_page {
# --------------------------------------------------------
# Creates a "What's Cool" page.
local ($total, $percent, $link_results, $title_linked);
my (%link_output, $category_clean);
if ($build_cool_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
$total = 0;
CATEGORY: foreach $category (sort keys %cool_links) {
LINK: for ($i = 0; $i < ($#{$cool_links{$category}}+1) / ($#db_cols + 1); $i++) {
$total++;
%tmp = &array_to_hash ($i, @{$cool_links{$category}});
$link_output{$category} .= &site_html_link (%tmp) . "\n";
}
}
foreach $hit (sort {$b <=> $a} keys %cool_links) {
$link_results .= $link_output{$hit};
}
$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);
print COOL &site_html_cool(@cool_links);
close COOL;
}
########################
Any ideas. If an obvious solution can't be seen.
Is there any way I can hard code the Sub_cool to give 10 links and by pass links.cfg
Stu2000 - The Ultimate World
http://www.world-porn.org/worldhackerz/
My Cool page --- I want to simply display the top 10 cool pages.
Sounds simple enough.
In my links.cfg I have set this to 10:-
# Build Options
# --------------------------------------------------------
# Setting for popular cutoff, can either be a percent (i.e. top 3%), or
# a fixed value (i.e. top 10). Enter 0.03 or 10 respectively.
$db_popular_cutoff = 10; # Top 3%
#########################################################
In my admin script when I build all I get this :-
Building What's Cool Page . . .
Cool Links: 14
Done
And rightfully enough 14 links are displayed.
I thought I may have had an error with the sub cool in nph.build but this looks ok too:-
sub build_cool_page {
# --------------------------------------------------------
# Creates a "What's Cool" page.
local ($total, $percent, $link_results, $title_linked);
my (%link_output, $category_clean);
if ($build_cool_path =~ m,^$build_root_path/(.*)$,) {
&build_dir ($1);
}
$total = 0;
CATEGORY: foreach $category (sort keys %cool_links) {
LINK: for ($i = 0; $i < ($#{$cool_links{$category}}+1) / ($#db_cols + 1); $i++) {
$total++;
%tmp = &array_to_hash ($i, @{$cool_links{$category}});
$link_output{$category} .= &site_html_link (%tmp) . "\n";
}
}
foreach $hit (sort {$b <=> $a} keys %cool_links) {
$link_results .= $link_output{$hit};
}
$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);
print COOL &site_html_cool(@cool_links);
close COOL;
}
########################
Any ideas. If an obvious solution can't be seen.
Is there any way I can hard code the Sub_cool to give 10 links and by pass links.cfg
Stu2000 - The Ultimate World
http://www.world-porn.org/worldhackerz/

