Modify mod_eb_events.php to show past events

More
12 years 6 months ago #33902 by htown
Is it possible to create another module based on the mod_eb_events.php module to have it show past events?

I would need it to display an event (class) from the start date and continue to show it until the event (class) reaches its end date. The reason for this is I want it all to happen automatically. I have a module that shows the UPCOMING events then a module that shows past events. I want the class that shows up in UPCOMING to just to the PAST EVENTS module once the class starts.

I tried modifying it myself but with no luck. Even though I renamed it and changed this line :

From
Code:
$where[] = 'DATE(event_date) >= CURDATE()' ;

To this
Code:
$where[] = 'DATE(event_date) <= CURDATE()' ;

Saved it as mod_eb_pastevents.php
installed it as a seperate module

When it displayed, both modules then showed the same thing. I am not much of a PHP person.

Is another way to do this or am I heading in the right direction?

Please Log in or Create an account to join the conversation.

More
12 years 6 months ago #33939 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Modify mod_eb_events.php to show past events
That code seems correct. Please submit a support ticket so that we can help you to check and see what's wrong (better after this weekend because now I want to spend my full time to finish new version of EB).

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc