Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: sennad on April 24, 2009, 04:10:48 AM

Title: SSI Calendar Output (Highlight todays events)
Post by: sennad on April 24, 2009, 04:10:48 AM
Hello,

I tried to find this on support board, but with no success.

On board index, calendar highlights today's events because they are written in bold letters.

Is there a way to do this on SSI calendar output on my homepage, because when I have like 5 events in upcoming 20 days, it would enhance this feature if SSI could somehow show "today's" events in bold or italic...

Sorry for bad English.
Title: Re: SSI Calendar Output (Highlight todays events)
Post by: Kermit on April 24, 2009, 05:03:48 AM
in ./SSI.php

Code (find) Select

if (!empty($context['calendar_events']))
{
echo '
<span style="color: #' . $modSettings['cal_eventcolor'] . ';">' . $txt['calendar4b'] . '</span> ';
foreach ($context['calendar_events'] as $event)
{
if ($event['can_edit'])
echo '
<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ';
echo '
' . $event['link'] . (!$event['is_last'] ? ', ' : '');
}
}



Code (replace with) Select

if (!empty($context['calendar_events']))
{
echo '
<span style="color: #' . $modSettings['cal_eventcolor'] . ';">' . $txt['calendar4b'] . '</span> ';
foreach ($context['calendar_events'] as $event)
{
if ($event['can_edit'])
echo '
<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ';
echo '
', $event['is_today'] ? '<b>': '',' ' . $event['link'] . '', $event['is_today'] ? '</b>':'','', !$event['is_last'] ? ', ' : '' ,'';
}
}


To make it italic,you should change <b> with <i>
Title: Re: SSI Calendar Output (Highlight todays events)
Post by: sennad on April 24, 2009, 05:16:07 AM
TNX.  ;)