ElkArte Community

Project Support => Support => Topic started by: Lars on October 06, 2014, 05:20:46 pm

Title: Displaying the words "Today" and “Yesterday” in bold lettering
Post by: Lars on October 06, 2014, 05:20:46 pm
Hello!

How can I display the words "Today" and “Yesterday” in bold lettering in the column of the recent posts on the board index?
I tried it on this way in the index.english.php:

Code: [Select]
$txt['today'] = '<strong>today</strong> at %1$s';
$txt['yesterday'] = '<strong>yesterday</strong> at %1$s';

Indeed it worked perfect but now with the addon 'Users Online Today' there’s a problem. When I place the mouse pointer over a user name, the time of the last activity is displayed including the strong tags:

<strong>Today</strong> at 05:40 PM

How can I display the words "Today" and “Yesterday” in bold lettering without causing an effect on the 'Users Online Today' time display?
Title: Re: Displaying the words "Today" and “Yesterday” in bold lettering
Post by: emanuele on October 06, 2014, 06:38:24 pm
That's the "correct" way, if the addon is the the problem, change:
Code: [Select]
$title = !empty($user['last_login']) ? 'title="' . standardTime($user['last_login']) . '" ' : '';
to:
Code: [Select]
$title = !empty($user['last_login']) ? 'title="' . strip_tags(standardTime($user['last_login'])) . '" ' : '';
in OnlineToday.class.php. ;)
Title: Re: Displaying the words "Today" and “Yesterday” in bold lettering
Post by: Lars on October 07, 2014, 11:33:04 am

Thanks, now all is perfect. :)