Google Calendar Widget by Otto http://ottodestruct.com otto@ottodestruct.com Note: This widget may not work with PHP 4. If you have problems, let me know. Installation: -Copy the rss-functions.php into your wp-includes folder (rename the old one to something else first!) -Put gcalendar.php in your plugins/widgets directory. -Activate the plugin in Wordpress. -Put the new widget somewhere using the widgets screen. -Configure it as you like. -Add this to your theme's CSS File for the monthly calendar tooltips to work: #dhtmltooltip { position: absolute; width: 150px; border: 2px solid black; padding: 2px; background-color: lightyellow; visibility: hidden; z-index: 100; /*Remove below line to remove shadow. Below line should always appear last within this CSS*/ filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135); } Usage: 1. Make a calendar on Google Calendar. 2. Share that calendar. 3. On the Calendar Settings screen, there's a button to get an XML address. The link looks something like this: http://www.google.com/calendar/feeds/your.email@example.com/public/basic Copy that URL and put it the widget's configuration page. 4. Configure the rest of the widget as you see fit. Quick explanation of the grouping and date format strings: Basically, the grouping string defines how the events are grouped and what the groups are, and the date string defines what each entry under those groups looks like. If the grouping string is blank, then there is only the one, unlabeled, group. The Date Format string also defines the separator between the date and the event. In both of these strings, any plain characters must be escaped with \. In cases where the escaped character means something (like \t = tab), then it must be escaped twice. Read http://php.net/manual/en/function.date.php for more info on possible strings that can be used in these two fields. Examples: ------------------------- Grouping: F Date Format: l, jS \- The result will be: January -Saturday, 1st - Event -Sunday, 2nd - Event Feburary -Sunday, 1st - Event March ... etc ... -------------------------- Grouping: (blank) Date Format: Y\-m\-d \: The result will be: -2006-01-01 : Event -2006-01-02 : Event -2006-02-01 : Event ... etc ... --------------------------- Grouping: Y Date Format: F, l \\t\h\e jS \- The result will be: 2006 -January, Saturday the 1st - Event -January, Sunday the 2nd - Event -Feburary, Sunday the 1st - Event 2007 -January, Saturday the 1st - Event -January, Sunday the 2nd - Event ... etc ... --------------------------- Other Notes: -The output of the widget is an unordered list, all CSS-ified, you can style it as you see fit. -If you don't want certain items from your calendar showing up here, go to Google Calendar and mark those individual entries as Private. They'll disappear. But the MagpieRSS feed is cached, so it will take an hour for them to disappear on the page after you pull the RSS for the first time. -The start and end times can be practically any English description of a date. Really. PHP is cool like that. The actual rules can be found here: http://www.gnu.org/software/tar/manual/html_node/tar_109.html -If using the calendar format, set the start and end dates to "now -1 month" and "now +1 month", respectively. Ugly hacks: -Sorry about the new rss-functions.php. Google uses an ATOM 1.0 feed for their data, the default Wordpress implementation of the MagpieRSS reader only supported ATOM 0.3. This modified version is the latest copy of the MagpieRSS code (0.8?) and it supports ATOM 1.0 much better than the older version. This is necessary to get the proper information out of the feed. If anybody from wordpress is reading this, please do us all a favor and change the rss-functions.php to simply include the original, unmodified MagpieRSS implementation. Wrap the thing with some other functions if you have to, but it would be awesome to be able to just drop in newer MagpieRSS versions instead of ugly cut and paste hacks like I had to do with this one. -Jeremi submitted a hack to get it working with PHP 4. May or may not work, but it's worth a shot.