It's better when it's simple

User Tools

Site Tools


Google Calendar Plugin

Compatible with DokuWiki


plugin Embeds a Google Calendar into a wiki page

Last updated on

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Extension name contains underscore, will not generate popularity points.

Similar to davcal, hcalendar

Tagged with calendar, embed, google

This plugin integrates a Google Calendar into a DokuWiki page.

With a serious nod to iframe by Christopher Smith. Minimal changes were made (improvements, I hope).



{{cal>[614,640]|Kite's Test}}

Pretty simple:

  • an email address with a shared/private calendar.
  • the [614,640] are width and height – these are both optional, but must be enclosed in [ , ] if present. If only one value is supplied, it is assumed to be the height.
  • the | marks the 'alternate text' used for a title; otherwise you get the default configured in Google.



The plugin has one configuration setting, which can be set via the admin/configuration settings page.

  • $gcal_js_ok — default value - false, set to true to enable JavaScript URLs.
  • iframe by Christopher Smith uses $js_ok

I don't know if it is better to allow one value for both plugins, or not. Also, due to the limited nature of this plugin, I don't think this option will actually make any difference. It has not been tested.




Specify just one calendar of Googles Calendars

I have several Google Calendars tied to my Gmail account. Is there a way to specify just one calendar, or a sub-group (i.e. 3 out of 5 calendars). — Jason 2007-06-08 18:51

The quick answer is yes. At the Google calendar webpage, click on manage calendars. Then click on the particular calendar that you are interested in using. In the Calendar Address box you should see a calendar id that looks like a randomly generated bunch of letters Plug this in as the address instead of {{cal>}}. I.e. {{cal>[randomletters]}}. Seems to be working for me. Cheers. Ethan Farquhar 2007-08-13

Have calendar appear in a different language

I needed to display the calendar in French. It would be nice if you could include a language variable in the future, but for now, here is how I did it:

Edit the following line near the end of syntax.php

$renderer->doc .= "<iframe src='$url&amp;height=$h&amp;title=$alt'".

and insert the following after $alt and before the '


where fr = French, or use any two letter language code.

DougH 2012-02-07 13:45

Use different colors

I went to /My calendar/Settings/, selected a calendar, and under “Embed this Calendar” section, I clicked “Customize the color, size, and other options”. This opens the editor for their »frame code. Select the calendars you want to display in the iframe, and the code will update.

Remove this part:

<iframe src=";wkst=1&amp;bgcolor=%23FFFFFF&amp;

That should leave you with “src=%your email address%…..etc.”, copy everything after “src=” all the way to the end of the Time Zone section. This should leave you with something like this:

{{cal>;color=%231B887A&amp;;color=%232952A3&amp;;color=%23705770&amp;;color=%230D7813&amp;;color=%232952A3&amp;;color=%235229A3&amp;;color=%230D7813&amp;ctz=America%2FChicago[800,600]|It works!}}

BrentDunnaway 2009-08-07 13:49


Hi - I was wondering if it was possible to login to the calendar automatically when the page loads? Thanks - David
  • would there maybe be away to implement something similar to the workaround Giloux found in the case of the iCalendar plugin (
  • Maybe implement something like this: http(s):[slash-slash]username:password[at]host:port/url-path This will enable you to have direct access to pages that require authentication and/or are accessed via non-standard ports. Many system status pages are configured in this manner. It doesn't work yet, I tried. Even when replacing “:” with “%3A”
  • Or something like this
feature request: Is there any way (syntax or other) to have the calendar/frame displayed at the center of the page rather than on the left side? Tx -a-
Hi, the frame displays “Events from one or more calendars could not be shown here because you do not have the permission to view them.” until I log into my Google account… Obviously… Would there be a way to prevent that? Is there any setting in my Google account I could change? Should I make the Calendar public or anything? What would be the consequences from a security point of view? Tx -a-
Hi, although the default view mode in my Google account is “week”, the calendar inside the frame on my wiki keeps on displaying the “month” view by default (I need to click on “week” every time). Is there any way to change that permanently? PROBABLY by using some trick similar to the one of BrentDunnaway to change colors… Tx -a-


Fixed!: I managed to have something looking more like what I wanted using this string: (capitals should be replaced by your desired values


This was modified from what googles gives me in code (Calendar details → embed this calendar)

  • For the title: %26 (instead of a word) = “&”
  • For the mode: WEEK is in capitals anyway
  • The bgcolor value defines the background color (here = dark grey)
  • color is the color of the events on the calendar (here: blue)
  • ctz is the time zone
  • wkst = week start on (1 = Sunday; 2= Monday; 7 = Saturday)


Future Directions

  • This should be able to cope with an <iframe…></iframe> from Google; wasn't able to make that work this time around due to some parsing and regular expression problems.
    • This would be GREAT! :-D
  • This should probably check the user's email but … since it has to go to Google's calendar engine anyway, I can rely on their response to be “reasonable” for now.
plugin/google_cal.txt · Last modified: 2023-10-30 22:25 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki