Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Commas in category names?

Quote Reply
Commas in category names?
Hi there, I came across this site earlier today:

http://www.fan-jam.com/pages/Actors/M/

Can anyone tell me how to create categories with commas in them (e.g. 'McArthur, Alex'), like that site does? I tried just using normal commas, but I get an error each time I do (e.g. 'McArthur,_Alex').

Any help would be greatly appreciated, thanks.

Quote Reply
Re: Commas in category names? In reply to
Try the following:

1) Replace your Name field configuration in the Û_def hash in your category.def file with the following codes:

Code:

Name => [1, 'alpha', 0, 150, 0, '', '^[\w\d/,_\&-]'],


2) Then in your sub build_check_dir routine in the nph-build.cgi file, replace the following codes:

Code:

if ($dir !~ m,^[\w\d$chrs]+$,) {


with the following codes:

Code:

if ($dir !~ m,[\w\d/,_\&/$chrs]+$,) {


Note: You may have to add the Perl escape character \ before the , in the codes I've provided.

BTW: Since this deals with code hacking and "bringing your Links to the next level", you should post requests like this in the Links 2.0 Customization Forum.

Regards,

Eliot Lee
Quote Reply
Re: Commas in category names? In reply to
Oustanding, that did it on the first try. Thanks so much for your help!

P.S. Sorry, thought there would have been a code (like _ = space has) for this kinda thing, would have put it in the custom area otherwise. :)

Quote Reply
Re: Commas in category names? In reply to
Good...glad it worked.

You're welcome.

Regards,

Eliot Lee