Anyone using the Events module and wants to have a events sidebar like used to be on the OcenBlue or OcenaBluev2
Here is the code that I had to use to fix it. The links were going back to a empty event table. Now with this code, it pulls the right info as it is supposed to.
Not sure if it is right, please use at own risk.
<?php
// Events Module from simpilotgroup.com
// Front page event list by Cory Wienckowski
$events = EventsData::get_upcoming_events();
if(!$events)
{
echo "<p>There are no upcoming events.</p>";
}
else
{
$count = 0;
foreach($events as $event)
{
if($count == 10) { break; }
if($event->active == '2') { continue; }
echo "" . date("m/d/Y", strtotime($event->date)) . " ‐ ";
echo '<td><a href="'.SITE_URL.'/index.php/events/get_event?id='.$event->id.'">' . $event->title. '</a></td></tr>';
$count++;
}
}
?>