Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: converting state abbreviations to full state names in templates: Edit Log

Here is the list of edits for this post
converting state abbreviations to full state names in templates
In my links2. in site_html_templates.pl I had this sub to convert state abbreviations to full state names to be returned back to my link, category, detailed and other templates.

sub state_name {
my $state = shift;
my %abr = (
AL => "Alabama",
AK => "Alaska",
AZ => "Arizona",
etc.,
WI => "Wisconsin",
WY => "Wyoming",
);
return $abr{$state};
}

Then use in &load_template routines, use
state_full => state_name ($rec{'State'}),

How can I do this in links sql?
Thank you!

Last edited by:

socrates: Nov 11, 2005, 7:00 PM

Edit Log: