[EventCalendar] Re: two things.

Alex Tingle alex at firetree.net
Mon Nov 14 11:02:42 UTC 2005


Darrell,

EventCalendar 3.1 uses a new table to store event start and end times. 
This is much more flexible than the 'duration' field.

I hope to release a beta version of 3.1 'soon'.

-Alex

--
:: Let me solve your problems: http://www.firetree.net/consulting/
:: alex.tingle AT firetree.net  +44-7901-552763

On 4 Nov 2005, at 19:12, Darrell Schulte wrote:

> Alex,
> 	
> Hope things are progressing smoothly on any EventCalendar work you're 
> doing. Just noticed that there was a duration custom field (never had 
> a need for it until recently). Anyway, I see that it only deals with 
> hours. Might this work out for adding minutes to the duration 
> equation?
>
> 	$pos = strpos($duration, ":");
>       	if ($pos == true) {
>         echo "DURATION:PT" . str_replace(":", "H", $duration) ."M\r\n";
>         } else {
>         echo "DURATION:PT$duration"."H\r\n";
>         }
>
> See DATE_ADD in query below for overcoming the the 1 hour timezone 
> issue. Might have lost something in the comment...
>
>     global $ec3,$tableposts,$tablepost2cat,$tableusers,$wpdb;
>     $calendar_entries = $wpdb->get_results(
>       "SELECT
>            p.id as id,
>            post_title,
>            post_excerpt,
>            DATE_FORMAT(DATE_ADD(post_date_gmt, INTERVAL 1 
> HOUR),'%Y%m%dT%H%i%sZ') as dt_start,
>            user_nickname
>          FROM $tableposts p, $tablepost2cat p2c
>          LEFT JOIN $tableusers u
>            ON u.ID=p.post_author
>          WHERE post_status = 'publish'
>            AND p.id = post_id
>            AND category_id = $ec3->event_category"
>     );




More information about the EventCalendar mailing list