News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Birthday Color in the Calendar

Started by lacin64, March 05, 2012, 04:25:12 PM

Previous topic - Next topic

lacin64

On the Calendar on 2.0.2x the Birthdays turn to bold when the actual day comes around of a Members Birthday, I was wondering if it's possible to turn the Members name to a color just for the day, instead of it just turning bold? 

lacin64

I've noticed in the BoardIndex.template.php there is a line of code that changes the Birthday Members name to bold <strong> </strong>  is there a way I can add a color to this rather than it just staying <strong> or bold?

echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}

lacin64


lacin64

We had this on our 1x forum, but I guess we'll have to wait for a MOD to come out for this version.

TheListener


Kermit

As you already found out you can change that strong tag into <span style="color: #ff0000;"> tag

i.e. in BoardIndex.template.php

Code (find) Select
<strong>' : '', $member['name'], $member['is_today'] ? '</strong>

Code (replace) Select

<span style="color: #ff0000;">' : '', $member['name'], $member['is_today'] ? '</span>


,for color codes you can look here

http://www.w3schools.com/cssref/css_colornames.asp
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

lacin64

Quote from: Kermit on March 15, 2012, 04:45:41 AM
As you already found out you can change that strong tag into <span style="color: #ff0000;"> tag

i.e. in BoardIndex.template.php

Code (find) Select
<strong>' : '', $member['name'], $member['is_today'] ? '</strong>

Code (replace) Select

<span style="color: #ff0000;">' : '', $member['name'], $member['is_today'] ? '</span>


,for color codes you can look here

http://www.w3schools.com/cssref/css_colornames.asp

Thanks anyway but this doesn't seem to work, just getting errors every time I try to load it.

Kermit

Then attach your file to your next post and tell the code of your desired color
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

lacin64

#CD853F This is the color we would like to use

Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

lacin64

Thank you very much this works a treat  8)

Viaja

And how change the color event? 

Thank you :)

lacin64

So that works great but the age Part still stays the same color as the Members Membergroup color, so we have a Gold name and another different color for the age.
Is there a way to change both the Member name and age when their Birthday comes around, so that they are both Gold or w/e, and not just the name.

Advertisement: