SimplePortal
Customization => Custom Coding => Topic started by: Zirc on November 11, 2009, 03:12:50 AM
-
I've tried and I've tried to figure out how to get the date on future events to display as Month - Date instead of the reverse as is standard can anybody help me out?
Here is the snippet of code for listing future events:
if (!empty($calendar_array['futureEvents']))
{
if ($show_titles)
echo '
<li><strong>', $txt['sp_calendar_upcomingEvents'] ,'</strong></li>';
foreach($calendar_array['futureEvents'] as $startdate => $events)
{
list($year, $month, $day) = explode('-', $startdate);
$currentDay = $day .' '. $txt['months_short'][(int) $month];
foreach($events as $event)
echo '
<li>', sp_embed_image('event'), ' ', $event['link'], ' - ', $currentDay;
}
}
Thanks in advance.
-
$currentDay = $day .' '. $txt['months_short'][(int) $month];
$currentDay = $txt['months_short'][(int) $month] . ' ' . $day;
-
Thanks!
I was swapping too much of that code. If i would have been more awake i probably would have seen that. You're the best.