TAV1702 Posted November 5, 2016 Report Share Posted November 5, 2016 (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)) . " ‐ "; echo '<td><a href="'.SITE_URL.'/index.php/events/get_event?id='.$event->id.'">' . $event->title. '</a></td></tr>'; $count++; } } ?> Edited November 5, 2016 by TAV1702 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted November 6, 2016 Author Report Share Posted November 6, 2016 (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 November 6, 2016 by TAV1702 Quote Link to comment Share on other sites More sharing options...
Moderators shakamonkey88 Posted November 6, 2016 Moderators Report Share Posted November 6, 2016 (edited) I'd like to know how to get the image to show too - like the post above. ^^ Also, how do I get each one on it's own line? Edited November 6, 2016 by shakamonkey88 Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted November 8, 2016 Author Report Share Posted November 8, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.