ec3_the_schedule()

October 25th, 2007

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>

v3.1.1 Release Candidate 3

October 22nd, 2007

[DOWNLOAD] This is my second attempt at a release that fixes compatibility with Wordpress 2.3. Please try it, and let me know if you have any difficulties.

The main change since RC2 is a fix to turn-off broken canonical redirection when both m= & cat= are set. Event Calendar sometimes uses URLs like:
http://wpcal.firetree.net/index.php?m=20071120&cat=1.
Newer versions of WordPress try to rewrite this URL, but get it wrong. The fix turns off the redirection, when it’s not going to work.

Other changes are…

  • Fixed ambiguous JavaScript variable name. Thanks to Chris Marshall.
  • Fixed unescaped characters in %TITLE% variables. Thanks to Elizabeth M., Peter Troxler and everyone who helped to troubleshoot this problem.
  • Replaced calls to deprecated get_settings() with get_option(). Thanks to JD Puglisi for pointing out this issue.
  • Macedonian translation. Thanks to Vanco Ordanoski.

v3.1.1 Release Candidate 2

September 30th, 2007

[DOWNLOAD] This is my first attempt at a release that fixes compatibility with Wordpress 2.3. Please try it, and let me know if you have any difficulties.

WP2.3 fundamentally changed the way categories work. This new version should be more compatible with 2.3 AND still work with previous versions. As a side-effect, it’s no longer possible to upgrade to ECv3.1 from v3.0 or earlier.

Other changes are…

  • Now compatible with Google Calendar.
  • Added Danish translation.
  • Added Turkish translation.
  • Added Catalan translation.

To www or not to www?

February 24th, 2007

Thanks to Rusty Smith for answering this question on the mailing list. I’ve added a shorter version to the FAQ.

To get to my url, the user doesn’t have to type the “www” as part of the url name so I had the name listed without it. However, most Internet users still generally type in the “www” as part of the web address. I was hoping that the plugin would work whether the “www” was listed in the url or not. Guess I will make sure the “www” is listed in the WordPress configuration since that is what would generally be typed in.

Is this something that might be fixed in a future release? Whether the url has the “www” in the name should be invisible to the end user and hopefully shouldn’t impact how a plugin works.

Brian and others that run into this problem:
This is NOT an EventCalendar problem, it actually breaks WordPress, but most people do not realize it. If you want to see how it breaks WordPress, log in to your blog at www.yourblog.com and then go to yourblog.com (or vice versus) and you will see that you are no longer logged in. You should decide whether you want www or not (I have no dog in the fight, but you may want to check out no-www.org to hear from folks that do). Then you paste the following lines into your .htaccess file, changing the domain name to match that of your site:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\\.domain\\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

This should silently redirect any call to www.yoursite.com to yoursite.com without the www. An added benefit is that any inbound link to your site will redirect as well, which makes the searchbots see your site as one instead of two, which should theoretically increase your popularity for those that worry about such things.

The above works on apache servers, but if you are installed on a windows IIS machine you may have to install any of the various plugins that do a similar redirect. I have not tried them, but give them a shot and report back. They may only work on apache servers as well. IIS probably has some sort of redirect capabilities, maybe someone knows how to do that?

Catalan Translation

February 17th, 2007

Thanks to Vincent Cubells, we now have a Catalan translation. I’ve not yet put it into a release, but you can download the file from Subversion: ec3-ca_ES.mo (right-click the link and choose “Save Link As…” or the equivalent).

Once you have the file, copy it into your eventcalendar3/gettext directory. That’s it!

v3.1.1 Release Candidate 1

February 15th, 2007

[DOWNLOAD] This is my first attempt at a release that fixes compatibility with Wordpress 2.1. Please try it on 2.1 AND 2.0, and let me know if you have any difficulties.

WP2.1 changed the way it formed category queries, so EC was not able to distinguish between category queries and regular ones. Queries like m=20070205&cat=3 (Only Show Events mode) should now work. The Event category listing page should also be back to normal. Thanks to everyone who reported this.

Other changes are…

  • Added Brazilian Portuguese translation.
  • Added Italian translation.
  • Corrected Dutch translation.

Brazilian Portuguese Translation

December 14th, 2006

Thanks to DJ Spark and Ildefonso Zanetti, we now have a Brazilian Portuguese translation. I’ve not yet put it into a release, but you can download the file from Subversion: ec3-pt_BR.mo (right-click the link and choose “Save Link As…” or the equivalent).

Once you have the file, copy it into your eventcalendar3/gettext directory. That’s it!

Italian Translation

December 6th, 2006

Thanks to Nicola Ruggiero and Jimmi, we now have an Italian translation. I’ve not yet put it into a release, but you can download the file from Subversion: ec3-it_IT.mo (right-click the link and choose “Save Link As…” or the equivalent).

Once you have the file, copy it into your eventcalendar3/gettext directory. That’s it!

Version 3.1.0

November 2nd, 2006

I’m pleased to announce the release of Event Calendar version 3.1.0. This is stable software that hundreds of people are already running on their WordPress web-sites.

A big thank you to everyone who has contributed or reported bugs. Special thanks go to Darrell Schulte for the Event Editor and Widgets and K2 support, David Nutter for his version of the Event Editor, and to all of the translators. [more credits]

Main Features

Dynamic Ajax calendar that shows both events and normal blog posts.

List upcoming events, either in the sidebar or on a full page.

Simple to install and use. Create events using a new popup calendar on the post edit page.

Now fully supports WordPress 2.0.

Supports WordPress Widgets, so that you can add events to your sidebar without having to edit PHP files.

Subscribe to your events from iCal, Sunbird, Google calendar and other iCalendar-aware applications.

Fully timezone aware.

Translations available to Dutch, German, Finnish, French Norwegian and Spanish.

Read the rest of this entry »

v3.1 Release Candidate 4

October 27th, 2006

I’ve just uploaded Release Candidate 4. This only contains four bug-fixes. Thanks to the people who tried the last release candidate and found these niggles. Again, If nobody finds any bugs in this release candidate, then it will become version 3.1.0 by this time next week.

The bugfixes are:

  • Cope gracefully with PHP ’safe mode’ forbidding us from changing timezones. (Reported by Karl Kolk.)
  • Upgrade now forces event posts’ post_date to be in the past, even if their post_modified is in the future. (Reported by Ray Walker and others.)
  • New query var ?ec3_after now actually works.
  • Fixed SQL errors when WordPress’ “exclude category” query is used. (Spotted by Mels.)