Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Re: [Andy] Lowercase category name in url

Quote Reply
Re: [Andy] Lowercase category name in url In reply to
Andy,

I found the fix finally. No need to to change the whole script.

1. Added categories in all lowercase. (fixes the lowercase url problem)
2. Added code that makes the first letter of each word in a category capital. (code change below)

File db_utils.pl and changes in red. I only had to add one line.

sub build_clean {
# --------------------------------------------------------
# Formats a category name for displaying.
#
my ($input) = shift;
$input =~ s/-/ /g; # Change '_' to spaces.
$input =~ s,/, : ,g; # Change '/' to ' : '.
$input =~ s/(\w+)/\u\L$1/g;
return $input;
}



Problem solved!
Subject Author Views Date
Thread Lowercase category name in url SliderMan 3945 Sep 12, 2004, 11:17 AM
Thread Re: [SliderMan] Lowercase category name in url
Andy 3879 Sep 13, 2004, 2:37 AM
Thread Re: [Andy] Lowercase category name in url
SliderMan 3880 Sep 13, 2004, 7:10 AM
Thread Re: [SliderMan] Lowercase category name in url
SliderMan 3845 Oct 5, 2004, 1:22 AM
Thread Re: [SliderMan] Lowercase category name in url
PerlFlunkie 3855 Oct 5, 2004, 5:39 PM
Thread Re: [PerlFlunkie] Lowercase category name in url
SliderMan 3841 Oct 7, 2004, 12:14 PM
Post Post deleted by SliderMan
SliderMan 3838 Oct 8, 2004, 9:32 PM
Post Re: [Andy] Lowercase category name in url
SliderMan 3863 Oct 8, 2004, 10:30 PM