Try the following:
1) Add the following codes in your
links.cfg file:
Code:
$db_auto_validate = 1; 2) Add the following codes in the
sub build_staggered routine in the
nph-build.cgi file:
Code:
if ($db_auto_validate) {
$t1 = time();
print "** Auto Validating Links . . .\n";
&build_auto_validate (1);
print "** Done (", time - $t1, " s)!\n\n";
} AFTER the following codes:
Code:
my $t1 = time();
print "** Loading Category information . . .\n";
&build_category_information;
print "** Done (", time - $t1, " s)!\n\n"; 3) Add the following codes in the
sub build_all routine in the
nph-build.cgi file:
Code:
# Auto Validate Links
if ($db_auto_validate) {
print "Auto Validate Links. . .\n";
&build_url_index;
print "Done.\n\n";
}
else {
print "Auto-Validation Turned Off";
} AFTER the following codes:
Code:
# Rebuild URL Index (This file is auto-generated, you will never need to touch it!
print "Building URL Index . . .\n";
&build_url_index;
print "Done.\n\n"; 4) Add the following sub-routine in the
nph-build.cgi file:
Code:
sub build_auto_validate {
#--------------------------------------------------------
# Auto Validates Links
my ($output, $validate);
my ($links) = 0;
open (VAL, "<$db_valid_name") or &cgierr("error in build_valid_review. unable to open validate file: $db_valid_name. Reason: $!");
if ($db_use_flock) { flock (VAL, 1); }
LINE: while (<VAL>) {
(/^#/) and ($output .= $_ and next LINE);
(/^\s*$/) and next LINE;
chomp;
$validate .= "$_\n" and $links++;
}
close VAL;
open (VAL, ">$db_valid_name") or &cgierr("error in validate_record. unable to open validate file: $db_valid_name. Reason: $!");
flock(VAL, 2) unless (!$db_use_flock);
print VAL $output;
close VAL;
open (DB, ">>$db_file_name") or &cgierr("error in build_auto_validate, unable to open db file: $db_file_name. Reason: $!");
flock(DB, 2) if ($db_use_flock);
print DB $validate;
print "\tValidated: $links Links\n";
close DB;
} 5) Then save the files.
6) Upload the new files to your web server.
7) Re-build your index via the
nph-build.cgi script.
NOTE: The last set of codes are adapted from Widgetz's
build_auto_review routine for the
Review.cgi Mod.
Good luck!
Regards,
Eliot Lee