Google Calendar / iframe Plugin

So I looked and looked for a way to get the Google Calendar to display within Project Pier and had no luck so I made this.

It's basically a copy of the Wiki plugin with all the controllers and names changed. Removed the do_textile function from the output and added html char decode instead of manipulating another function.

Since the code needs to display code properly, the original output didn't work because I needed to have the HTML be executed instead of htmlspecialchars used.

This function allows HTML to be displayed from the Calendar tab. It's super easy to use.

Download the code here:
Unzip the file to the plugin folder: ROOT/application/plugins/
Login to PP and go into the plugins.
Activate Calendar
Go to a project and click on the new Calendar tab
Add a page and put your iframe Google code into it - this way you can have multiple calendars if you want

And BAMB there's your Company's Google Calendar. Done.

Can this be applied to the Dashboard to allow for an Agenda display of upcoming meetings, etc.?

If so, what would be involved in applying this?

Thom Prati,

I tried it and it works for public calendars. Looks great.

Couple of things I noticed:

1) The first page did not display until I refreshed the page. The HTML was correct but it simply did not show. Maybe it is the browser (Chrome) or some javascript.

2) The calendar tab does not show up. It consistently selects the Wiki tab. Via the dropdown menu My Tasks I can get to the calendar.



should be


How about removing this?

* @author Alex Mayhew
* @copyright 2008

Do you have an calendar icon for the application log?

It does not work when Wiki is active. As you said, you copied it from Wiki. This is okay as long as you change also the class names used by Wiki. When Wiki is enabled it clashes with the class names in your plugin. This is most obvious in cache/autoloader.php

$GLOBALS['autoloader_classes']['WIKIPAGE'] = ROOT.'/application/plugins/wiki/models/WikiPage.class.php';
$GLOBALS['autoloader_classes']['REVISION'] = ROOT.'/application/plugins/calendar/models/Revision.class.php';
$GLOBALS['autoloader_classes']['REVISIONS'] = ROOT.'/application/plugins/calendar/models/Revisions.class.php';
$GLOBALS['autoloader_classes']['BASEREVISIONS'] = ROOT.'/application/plugins/calendar/models/base/BaseRevisions.class.php';
$GLOBALS['autoloader_classes']['BASEWIKIPAGE'] = ROOT.'/application/plugins/wiki/models/base/BaseWikiPage.class.php';

The best thing to do is to prefix your new classes, e.g. CalendarRevision.

On the other hand, why not make this change part of the Wiki code?

I guess if the Wiki developer would have prefixed all his classes with Wiki you would not have met with this issue.

I prefixed the calendar plugin Revision* classes with Calendar and now the tab shows.

Okay, I changed all the references to Revision, BaseRevision, Revisions and BaseRevisions in the calendar plugin to CalendarRevision, BaseCalendarRevision, CalendarRevisions and BaseCalendarRevisions. Lots of places, I guess about 40 or so.

But... it is working fine now.

I won't bother with the remaining classes (e.g. Diff). This will still conflict with Wiki.

phpfreak can u upload the changes u make to the plugin to use it