I have a work around for the apostrophe problem:
Firstly, enter the category name into the database without apostrophes then:
Find the following in npi-build.cgi
Code:
sub build_linked_title {
# --------------------------------------------------------
# Returns a string of the current category broken up
# by section, with each part linked to the respective section.
my $input = shift;
my (@dirs, $dir, $output, $path, $last);
@dirs = split (/\//, $input);
$last = &build_clean(pop @dirs);
$output = qq| <A HREF="$build_root_url/">Top</A> :|;
foreach $dir (@dirs) {
$path .= "/$dir";
$dir = &build_clean ($dir);
$output .= qq| <A HREF="$build_root_url$path/">$dir</A> :|;
}
and add the following between the curly brace and
Code:
$output .= " $last";
return $output;
Code:
# Take the Category name and add an apostrophe in the correct place
if($last=~ /Whos Who/) {$last=~ s/Whos/Who's/;}
Now go to:
site_html_templates.pl and find:
Code:
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat);}
$numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
if($category_name=~ /User Only/) {last;}
You need to insert the following line:
Code:
if($category_name=~ /Whos Who/) {$category_name=~ s/Whos/Who's/;}[/
An example is shown below:
Code:
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) { $category_name = &build_clean($1); } else { $category_name = &build_clean($subcat);}
if($category_name=~ /Whos Who/) {$category_name=~ s/Whos/Who's/;} $numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
This is really only a hack as it only works if the category is at the end of the directory tree. I'm sure someone will be able to come up with a refinement on this.
------------------
www.whadup.com mprice@acmex.com [This message has been edited by melPrice (edited April 13, 2000).]
[This message has been edited by melPrice (edited April 13, 2000).]