Sports look in the outputted headlines?

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

Moderator: Spunkmeyer

Sports look in the outputted headlines?

Postby thegametb » Tue Sep 06, 2005 12:14 am

I'm thinking about doing the news posts headlines on my new site redesign with the universal sports roster look. You know the light bg, dark bg, light bg, dark bg, etc. Does anyone know how to do this with Perl Code?

I haven't been in here in quite a long time, so I don't know if this was discussed before.

If you aren't sure what the look I am trying to replicate, go to your favorite sports team website, because most of the teams use this scheme somewhere on the site for things like depth chart or roster. If they don't have it, you can just go to this quick one I found at the Oakland Raiders website. It seems extremely simple to do, but I suck at Perl Coding.

Any help is appreciated, whether a link to a previous article, Perl Code, etc.

Thanks!

NOTE: I tried the code under the Help section, but it does not work and sometimes shows up with a black background (weird, since there is no black code).

NOTE: I first attempted the code that l0rdphi1 did and for some reason it didn't work. I then found the "other" code done by l0rdphi1 and Parahead which worked. Granted I had to really dumb down my coding, but in the end it worked and that's what I wanted.
User avatar
thegametb
 
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am

Postby SrNupsen » Tue Sep 06, 2005 6:19 am

If this is the case (code made by Phil available from the help section doesn't work, but code made by Parahead and Phil does), I would like to update that section on this page if somebody (Parahead?) could confirm this and provide me the working code.

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Parahead » Tue Sep 06, 2005 6:37 am

SrNupsen wrote:If this is the case (code made by Phil available from the help section doesn't work, but code made by Parahead and Phil does), I would like to update that section on this page if somebody (Parahead?) could confirm this and provide me the working code.
I too experienced problems with the original solution and think the cause there was that if you use the same style in different profiles, the counter is incremented totaly wrong (it do not use the ProfileName variable). Anyway, the code I provided in this thread do work, I tried it myself before posting. It is also more generic and can handle 2 or more colors with that codesnippet as base, just add more colors at the end, which the second (also working) FAQ solution can't.

Clear as mud? ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby SrNupsen » Tue Sep 06, 2005 8:20 am

Klart som blekk!!

SrNüpsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby thegametb » Tue Sep 06, 2005 6:05 pm

Yeah, here's a sample of the code in action... As I said elsewhere on the forums, I'm in the middle of doing a redesign and I was getting these to work with the new layout scheme with high priority label.

Website

At first when the script wasn't working, I was saying, "WTF?", because for some odd reason it worked in a real simple layout I did:

Web page (when the page opens in error, remove the hyphen (-). This site replaced "cr-ap" with "crumb" and it would obviously appear wrong as a url string.)

I noticed in the source code that it wasn't putting in the "#" in front of the color code. It took a while to figure out, because in the Help section, it says value1 and value2 and I stupidly just put the code in without the pound sign and for some odd reason it was working on the web page, but not on the website. You could easily input it into two ways. The best way is to just add the pound (#) symbol logically in front of the color code within the Perl code or you can just be odd and put it in front of the Field string. So after I did this, everything worked as expected to.
User avatar
thegametb
 
Posts: 109
Joined: Mon Jul 05, 2004 11:38 am

Postby SrNupsen » Mon Oct 03, 2005 9:13 pm

Who would've thought... I actually got around to updating the FAQ with Parahead's working code :shock:

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway


Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests

cron