Jump to content

Recommended Posts

Posted (edited)

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)) . " &dash; ";
echo '<td><a href="'.SITE_URL.'/index.php/events/get_event?id='.$event->id.'">' . $event->title. '</a></td></tr>';

$count++;
}
}
?>

Edited by TAV1702
Posted (edited)

I have no idea man. I was lucky to get this working when I did. lol I just messed with it for a few minutes after looking at the code in the forum tour calendar which is actually an events calendar.

**EDIT**

Actually, are you referring to the image that you add to the event in the admin panel? You want the image to show up in this code too?

Edited by TAV1702
Posted

Hmm It should just add new lines per event. Ill have to try it out on mine again and see happens. I'm not sure about the image yet as I have had no chance to work with it. I been busy the last couple days.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...