OK, under this line:
# Rebuild URL Index (This file is auto-generated, you will never need to touch it!
add this to your nph-build.cgi
# Rebuild CATEGORY Index (This file is auto-generated, you will never need to touch it!
print "Building CATEGORY Index . . .\n";
&build_category_index;
print "Done.\n\n";
and then after sub build_url_index add this:
sub build_category_index {
# --------------------------------------------------------
# This routine builds a quick Catgory lookup database to look for the real names.
# so the script does not have to search the category.db for every search of the real_name
my @values = ();
open (DB, "<$db_category_name") or &cgierr("unable to open database: $db_category_name.\nReason: $!");
open (REAL, ">$db_category_index") or &cgierr("unable to open category index: $db_category_index. Reason: $!");
if ($db_use_flock) { flock (REAL, 2) or &cgierr ("unable to get exclusive lock. Reason: $!"); }
LINE: while (<DB> ) {
/^#/ and next LINE; # Skip comment Lines.
/^\s*$/ and next LINE; # Skip blank lines.
chomp; # Remove trailing new line.
@values = &split_decode($_);
@catnamelist = split (/\//, $values[1]);
$category_name = pop @catnamelist;
$category_name = &build_clean ($category_name);
print REAL "$values[0]$db_delim$values[1]$db_delim$category_name\n";
}
close DB;
close REAL;
}
don't forget to set the path in your links.cfg for $db_category_index. may be /yourhost.com/links/admin/data/category.db
cause it's better to build a quick category lookup database. now it should work! :-)
cu
------------------
Language Links v 1b1
www.ford-network.at [This message has been edited by Bogus (edited February 14, 1999).]
[This message has been edited by Bogus (edited February 17, 1999).]