[EventCalendar] Separating Event Dates and Post Dates

Benjamin Bellamy benjamin.bellamy at free.fr
Sat Feb 18 18:53:24 UTC 2006

I couldn't wait so I did it. :-)

You may download the modified plugin here :

To use it, just choose to separate event dates and post dates on the 
EventCalendar option panel and add a custom event_date field to your post.

I tried to do it as properly as I could. (I didn't try to optimize the 
code so that it remains understandable and similar to the original.)

I added a new option parameter "Separate Event Dates and Post Dates" 

You may find out that the plugin doesn't work anymore on some old mysql 
versions (only when you when you choose to separate event dates and post 
dates) since I introduced a "left join" in the sql queries. The purpose 
of this is to use the post_date field when no custom event_date field is 

One more thing : I added a "Show time event" option parameter in order 
to be able to hide time event on the calendar view, since the 
ec3_get_calendar() function does not allow a $template_event parameter 
like the ec3_get_events function does. (I should have added a 
$template_event parameter to the ec3_get_calendar() function instead, 
but it seemed so hard to do and I felt so lazy... ;-)

I tested it successfully on wp2, MySQL 4.1.15, php 4.3.10.

Feel free to use it, modify it, distribute it, correct the grammar 


 > From: Benjamin Bellamy <benjamin.bellamy at free.fr>
 > But according to me, one thing is missing : it is not possible to 
separate event
 > dates and post Dates.
 > So my question is : is this feature planned to be done ?

 > From: Paolo Gabrielli <paolo.gabrielli at gmail.com>
 > Your reasoning seems fine: I usually write a post that talks about a
 > future event so I would like to have my .ics pointing to that event,
 > but I would like to have my post have $now as post_date...
 > Thankyou,
 > P.

 > From: Alex Tingle <alex at firetree.net>
 > This is indeed planned.
 > -Alex

More information about the EventCalendar mailing list