This plugin installs a sidebar widget that can show the upcoming events from a Google Calendar feed.
See the Google Calendar Support Page. Just don't forget to change the "/basic" to "/full".
You can download localized versions of date.js from here. Find the correct language version in the "build" folder of the zip file, and replace the date.js in the plugin folder.
The date and time is formatted using the date.js library. Look for code like the following two lines in ko-calendar.js and change the format argument to match the format you want.
startJSDate.toString("ddd, MMM d, yyyy h:mm tt") dateString = startJSDate.toString('MMM dd');
The formatting represents how the information will look on the page "MMM" translates to the abbreviated name of the month.
Take a look at the documentation for how you can change that formatting string to match what you want. http://code.google.com/p/datejs/wiki/FormatSpecifiers
For example, you can change the following
dateString = startJSDate.toString('MMM dd');
dateString = startJSDate.toString('dd.MM.yyyy');
to change the agenda item "Jan 2" to "02.01.2009"
The plugin uses the wiky.js library that generates HTML from a wiki-like markup language. It expects that the calendar item descriptions are marked up using that format. This is done to simplify the formatting for users who are already familiar with wiki markup and make the calendar entries easier to read when not interpreted.
If you wish to remove this transformation simply replace the following line in ko-calendar.js
bodyDiv.innerHTML = Wiky.toHtml(entryDesc);
bodyDiv.innerHTML = entryDesc;
You can insert the widget into a template directly, without adding it to a sidebar, by inserting php code directly into your theme.
<?php the_widget("WP_Widget_KO_Calendar", array( 'title' => 'Calendar Title', 'url' => 'http://email@example.com/public/full', ), array('before_widget' => '<div class="calendarwidget">', 'after_widget' => '</div>', 'before_title' => '<div class="calendartitle">', 'after_title' => '</div>' )); ?>
You can configure it with the same options available in the widget, as the second parameter to the_widget.
The third parameter lists the standard widget options. See the wordpress Widget documentation for more details. They can each be blank (i.e. 'before_widget'=>'') or contain whatever formatting you desire to be inserted in the flow.
The "Event Title Format" option for each calendar allows you to format how you wish the calendar events to appear in the event list. The default format is "[STARTTIME - ][TITLE]" so, for example, an event that starts at 6:00pm would called "Birthday Party" would appear as "6:00PM - Birthday Party".
Any extra characters included within the  will be inserted if the value exists. That is, [ENDTIME - ] will insert " - " after the end time, if and only if there is an end time.
If an event is an all-day event, then [STARTTIME] will be replaced with "All Day" and no [ENDTIME] will defined.
I have included an example with the plugin in "examples/stand_alone.html" that shows an example using the plugin code. Each element is tagged so it should be flexible for styling; see the existing stylesheet for examples.
Requires: 2.8 or higher
Compatible up to: 3.7.1
Last Updated: 2013-12-16
0 of 3 support threads in the last two months have been resolved.
Got something to say? Need help?