[EventCalendar] Showing dates and times for 'repeated' events

Jeff Cole news2 at clear-vision.org
Mon Jan 26 14:17:44 UTC 2009

On Thu, Jan 22, 2009 at 8:38 PM, Alex Tingle <alex at firetree.net> wrote:

 I think you've missed the point of the ec3_iter_all_events() function in
> template-functions-new.php
> Rather than adding new template functions, may I see the loop from which
> you
> are calling them?

Hi Alex

Thanks for getting back to me.

I'm using the new functions in a number of shortcodes and a plugin I use to
display the events on htttp://www.manchesterbuddhiscentre.org.uk

Here is an example of how I am using the new function in a shortcode:

// [medpm]
function med_pm_details() {
    $taking_it_further_cat_id = get_cat_id('Taking it further');
    $meditation_cat_id = get_cat_id('Meditation');
    $recurring_cat_id = get_cat_id('Recurring');
    $med_pm_query = new WP_Query(array('category__and'
    while ($med_pm_query->have_posts()) : $med_pm_query->the_post();
    $cd_id = get_the_ID();
    $cd_Title = get_the_title($cd_id);
    $cd_Content = first_para_excerpt();
    $cd_Day = ec3_get_active_start_date($d='l');
    $cd_Dates = ec3_get_active_start_date($d='jS F');
    $cd_Time =
    $cd_Bookings = get_post_meta($cd_id, 'Bookings', 'true');
    $cd_Location = get_post_meta($cd_id, 'Location', 'true');
    $cd_Waged = get_post_meta($cd_id, 'Waged', 'true'); //Cost
    $cd_Link = get_permalink($cd_id);
    $cd_output .= "<br /><h4>$cd_Title</h4><br /><br />\n";
    $cd_output .= "$cd_Content<br /><br />\n";
    $cd_output .= "<ul><li>$cd_Day<span>s</span> - next one $cd_Dates
$cd_Time</li><br />\n";
    $cd_output .= "<li>Location: $cd_Location</li><br />\n";
    $cd_output .= "<li>$cd_Waged</li><br />\n";
    $cd_output .= "<li>$cd_Bookings</li><br />\n";
    $cd_output .= "<li><a href='$cd_Link' title='$cd_Title'>More
info</a></li></ul><br />\n";
    return $cd_output;
add_shortcode('medpm', 'med_pm_details');

You can see this displayed on
http://www.manchesterbuddhistcentre.org.uk/buddhism/taking-it-further - it's
the last item on the page.

I couldn't find anything about how to do what I wanted on the mailing list
here so I went my own way - and I fairly new to programming in php - because
I didn't see the ec3_iter_all_events() function - and wouldn't appreciated
what it might be for if I had!

So I wonder if you could tell me how I might use the ec3_iter_all_events()
function to achieve what I want? - sorry my php understanding isn't up to
see how to use it at the moment.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20090126/d07554eb/attachment.html

More information about the EventCalendar mailing list