Uutiset:

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

Main Menu
Advertisement:

Help with 1 line of php code, please!

Aloittaja Simplemachines Cowboy, tammikuu 17, 2006, 10:12:09 IP

« edellinen - seuraava »

Simplemachines Cowboy

I need some quick help turning this:
return 'Currently there ' . $singularplural1 . ' <b><font color="#6B8EAE">' . $chatcount . ' User'.$singularplural2.' in XXX XXXX XXXXX Chat</font></b><br/>';
which displays like this:
Currently there are 0 Users in XXX XXXX XXXXX Chat

I'd like it to display this, all bold and using blue #6B8EAE & red #FF0000:
Currently there are 0 Users in XXX XXXX XXXXX Chat

I keep getting parse errors 'cause I can't get the . and ' right.

thanks,

Cowboy
My SMF forum: The Open Range

SleePy

i know what hex values you want for the colors but you can fix those...

return '<font color="blue">Currently there ' . $singularplural1 . '</font><font color="red">' . $chatcount . ' User'.$singularplural2.'</font><font color="blue" in XXX XXXX XXXXX Chat</font></b><br/>';
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Simplemachines Cowboy

Thanks SleePy.
It was close... and I made it work.
You didn't start the <b> and you left off a > on the last font color
return '<b><font color="#6B8EAE">Currently there ' . $singularplural1 . '</font><font color="red">' . $chatcount . ' Userer'.$singularplural2.'</font><font color="#6B8EAE"> in XXX XXX XXXXX Chat</font></b><br/>';
My SMF forum: The Open Range

SleePy

oops.. it was a quick type.. and my php syntax checker doesn't catch html mistakes...
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Advertisement: