How to change the colors of the Winning and Losing picks on
Posted: Tue Sep 10, 2013 9:12 am
I had done this last year, and I forgot about it until today. I have changed the code in the /includes/common.asp file to make it so that a Correct pick and an Incorrect Pick now are different colors than an unplayed game.
So by default all the program did was to make a correct pick "BOLD" but still black. An incorrect pick had a line put through it, and those were good, but I wanted to have more. So now I make my correct picks turn "lime green" and my incorrect picks still have a line put through them, but they also turn "red". Any unplayed games still show in the black. So it is really easy to see results on the page.
To accomplish this open your /includes/common.asp file and then:
Find for an "Incorrect Pick":
Change it to look like this:
Now Find for a Winning Pick:
And change it to look like this:
Where you see the "color:xxxxxxx" parameter, feel free to change to to any colors you like, but here is how mine looks as of now, or at least a snippet of it so you can see a preview.
Hope this helps.
Phil
So by default all the program did was to make a correct pick "BOLD" but still black. An incorrect pick had a line put through it, and those were good, but I wanted to have more. So now I make my correct picks turn "lime green" and my incorrect picks still have a line put through them, but they also turn "red". Any unplayed games still show in the black. So it is really easy to see results on the page.
To accomplish this open your /includes/common.asp file and then:
Find for an "Incorrect Pick":
Code: Select all
'--------------------------------------------------------------------------
' Formats a string to indicate an incorrect pick.
'--------------------------------------------------------------------------
function FormatIncorrectPick(str)
FormatIncorrectPick = "<span style=""text-decoration: line-through;"">" & str & "</span>"
end function
Code: Select all
'--------------------------------------------------------------------------
' Formats a string to indicate an incorrect pick.
'--------------------------------------------------------------------------
function FormatIncorrectPick(str)
FormatIncorrectPick = "<span style=""text-decoration: line-through; color:red"">" & str & "</span>"
end function
Code: Select all
' Formats a string to indicate the game winner.
'--------------------------------------------------------------------------
function FormatWinner(str)
if USE_POINT_SPREADS then
FormatWinner = "<em>" & str & "</em>"
else
FormatWinner = "<strong>" & str & "</strong>"
end if
end function
Code: Select all
'--------------------------------------------------------------------------
' Formats a string to indicate the game winner.
'--------------------------------------------------------------------------
function FormatWinner(str)
if USE_POINT_SPREADS then
FormatWinner = "<em>" & str & "</em>"
else
FormatWinner = "<span style=""color:limegreen; Font-weight:bold;"">" & str & "</span>"
end if
end function
Hope this helps.
Phil