ec3_the_schedule()

Formats the schedule for the current post. If you want to echo the result directly onto the page, This is the call you want. For HTML as a string use ec3_get_schedule()

Overview

ec3_the_schedule() is useful to produce a controllable (different from default) HTML output for use within a post, especially when you wish to style the output using div’s instead of tables. The command takes the form of

ec3_the_schedule(‘$format_single‘,’$format_range‘,’$format_wrapper
‘);

all of the parameters above are optional, and are explained below

Parameters

$format_single (OPTIONAL)

DEFAULT=’<tr><td colspan=”3″>%s</td></tr>’
Events that only have a start time (no duration) are generated using this template. %s is a placeholder for the time.
$format_range (OPTIONAL)

DEFAULT=’<tr><td class=”ec3_start”>%1$s</td>’
. ‘<td class=”ec3_to”>%3$s</td><td class=”ec3_end”>%2$s</td></tr>’
Events that have a start and end time are generated using this template. %1$s is a placeholder for the start, and %2$s is a placeholder for the end time. %3$s is a placeholder for the word “to”, which may be translated if you are using a localised version of EventCalendar.

$format_wrapper (OPTIONAL)

DEFAULT=’<tableclass=”ec3_schedule”>%s</table>’
A template for the whole result. The default generates a table, but you may prefer to have it generate a div, or leave it blank. %s is a placeholder.
Examples

<?php ec3_the_schedule('%1$s ');?>
This fragment will generate output in the form
“(Event date) (Event Start Time)” ie December 9, 2007 9:00 am

<?php ec3_the_schedule('%1$s ','','<div class="ec3_the_schedule" >%s </div>');?>
This fragment will generate output in the form
<div class="ec3_the_schedule">December 9, 2007 9:00 am </div>

This entry was posted in Documentation. Bookmark the permalink.

Leave a Reply