Display full name categories

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Postby l0rdphi1 » Fri Mar 15, 2002 4:31 pm

Code: Select all
<PerlCode>
my %CatNames = ('cat1' => 'name of category1', 'cat2'=> 'name of category2');
$newshtml .= $CatNames{$Category};
</PerlCode>
User avatar
l0rdphi1
 
Posts: 3590
Joined: Sat Mar 09, 2002 10:03 pm
Location: Pennsylvania, United States of America

Postby msbzdragn » Fri Mar 15, 2002 5:16 pm

Also, all of those nested Ifs were pointless. You could've just used separate Ifs for each category name (ie. replace the Else: If statements with /If, and remove the extra /Ifs at the end). Since an item can only be in one category, nesting the Ifs makes no difference to the final result.
Michael R. Tomkins
Administrator, 'Unofficial Coranto / NewsPro Forums'

Mitsubishi Diamante Forum

Do NOT send me instant messages asking for Coranto help without me telling you explicitly to do so. You WILL be placed on ignore if you do so; I don't have time to provide personal tech support to every person who IM's me. Sorry!
User avatar
msbzdragn
 
Posts: 2397
Joined: Mon Mar 11, 2002 4:51 pm
Location: Oak Ridge, TN

Postby msbzdragn » Fri Mar 15, 2002 8:46 pm

Use the character entity - either &# 8217; or & rsquo; - in your displayed category name... (remove spaces)
Michael R. Tomkins
Administrator, 'Unofficial Coranto / NewsPro Forums'

Mitsubishi Diamante Forum

Do NOT send me instant messages asking for Coranto help without me telling you explicitly to do so. You WILL be placed on ignore if you do so; I don't have time to provide personal tech support to every person who IM's me. Sorry!
User avatar
msbzdragn
 
Posts: 2397
Joined: Mon Mar 11, 2002 4:51 pm
Location: Oak Ridge, TN

Postby l0rdphi1 » Fri Mar 15, 2002 9:06 pm

Try 'catX' => qq~blah~, ....

or 'catX' => qq^balh^, ...

I dunno if either will work... but msbzdragn's method should
User avatar
l0rdphi1
 
Posts: 3590
Joined: Sat Mar 09, 2002 10:03 pm
Location: Pennsylvania, United States of America

Postby l0rdphi1 » Fri Mar 15, 2002 9:21 pm

Did you try my two methods?
User avatar
l0rdphi1
 
Posts: 3590
Joined: Sat Mar 09, 2002 10:03 pm
Location: Pennsylvania, United States of America


Return to Customization

Who is online

Users browsing this forum: No registered users and 1 guest

cron