SimplePortal

Customization => Custom Coding => Topic started by: Zirc on November 11, 2009, 03:12:50 AM

Title: Calender Information Block
Post 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:

Code: [Select]
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.
Title: Re: Calender Information Block
Post by: [SiNaN] on November 11, 2009, 06:03:39 AM
Code: (Find) [Select]
$currentDay = $day .' '. $txt['months_short'][(int) $month];
Code: (Replace) [Select]
$currentDay = $txt['months_short'][(int) $month] . ' ' . $day;
Title: Re: Calender Information Block
Post by: Zirc on November 11, 2009, 09:28:19 AM
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.
SimplePortal 2.3.8 © 2008-2024, SimplePortal