You could do it this way and bloack links which contain the word 'sex' for instance.
Go into nph-build.cgi and find the sub build stats
under:
my $staggered_mode = shift || undef;
Add where filter are the words you want to stop links containing. and fields are the title and description you want to check thru. Can add more such as 2 for url @filter = ('sex');
@filter_fields = (1, 5);
find: # Add the link to the list of cool links if it is popular.
push (@{$cool_links{$category}}, @values) if ($values[$db_ispop] eq "Yes");
replace it with: my $add = 0;
FILTER: foreach $field (@filter_fields) {
$_ = $values[$field];
foreach $one (@filter) {
last FILTER if (m/$one/i) and ($add++);
}
}
if ($add < 1){
# Add the link to the list of cool links if it is popular.
push (@{$cool_links{$category}}, @values) if ($values[$db_ispop] eq "Yes");
}
You could do the same if you want to block ones being added to the new page also like putting the code to add the new links inside the loop also: my $add = 0;
FILTER: foreach $field (@filter_fields) {
$_ = $values[$field];
foreach $one (@filter) {
last FILTER if (m/$one/i) and ($add++);
}
}
if ($add < 1){
# Add the link to the list of new links if it is new.
push (@{$new_links{$category}}, @values) if ($values[$db_isnew] eq "Yes");
# Add the link to the list of cool links if it is popular.
push (@{$cool_links{$category}}, @values) if ($values[$db_ispop] eq "Yes");
}
Glenn
Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml