Quote:
Can you have commas in the category name in Links 2? Ie:
Schwarzenegger, Arnold
In the default version of Links, the comma is not allowed for a category because the category name is also used to create a directory. However, you can modify the script to allow it.
Interestingly enough, Windows95 has no problem with either the comma or the space and is quite happy to create a directory called "Schwarzenegger, Arnold". Unix, on the other hand, has problems only with the space. If you type:
Quote:
mkdir Schwarzenegger, Arnold
You end up with two directories, one for "Schwarzenegger," and one for "Arnold". So you would have to use the underline character for the space as in:
Quote:
Schwarzenegger,_Arnold
But Links does display the category names without the underline (it is converted back to a space), so that is not a problem.
There are two things that must be changed in Links v2 to allow the comma to be used in a category (directory) name.
1. category.def. Change:
Quote:
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-]+$'],
to read:
Quote:
Name => [1, 'alpha', 40, 75, 1, '', '^[\w\d/_-,]+$'],
2. nph-build.cgi, sub build_check_dir:
Change:
Quote:
my $chrs = quotemeta ("/_-");
to read:
Quote:
my $chrs = quotemeta ("/_-,");
I hope this helps.