Skip to content

swartzrock/brs.googlecal_events.ee_addon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

Google Calendar Events plugin for ExpressionEngine

Google Calendar Events is a plugin for the ExpressionEngine Content Management System that provides a new {exp:googlecal_events} tag for your templates.

The {exp:googlecal_events} tag displays a list of upcoming events from one or more Google Calendars in your web site. This makes it possible to take advantage of the superior editing and time management features of Google Calendar while displaying these scheduled and/or recurring events in your own style on your site.

Requires the free Zend Gdata package and a working Google account to use. This plugin has been tested with ExpressionEngine 1.6.8.

Installation

  1. Download the Zend Gdata package and install the Zend library in a directory in your PHP Include Path.
  2. Download this plugin to your site’s System/Plugins directory.

Parameters

Name Description
google_calendars The Google Calendar id (eg “12345@group.calendar.google.com”) or a comma-delimited list of id’s.
user The username of your Google account (your Gmail address should work here).
password The password of your Google account.
num_days The number of days to display
max_cache_age [optional] The maximum age in seconds of the local file cache for the events. If not specified, the default value of 900 (15 minutes) will be used.
max_events [optional] Limit the number of items to next n entries. If not specified, the default maximum value of 30 events will be used.

Single Variables

Name Description
{start_time format=“%Y %m %d”} The start time of the event. Uses ExpressionEngine’s Date Variable Formatting
{end_time format=“%Y %m %d”} The end time of the event. Uses ExpressionEngine’s Date Variable Formatting
{what} The title of the event (from the “what” field in Google Calendar)
{where} The location of the event (from the “where” field in Google Calendar)
{description} The description of the event (from the “description” field in Google Calendar)

Variable Pairs

Name Description
{start_day}
{start_day_format
format=“%Y %m %d”}
{/start_day}
The start time of the event, only displayed for the first event each day. Uses ExpressionEngine’s Date Variable Formatting . This makes it possible to create a Date header that appears above all of the events for that day.

Example 1 – Simple List Of Events

{exp:googlecal_events google_calendars="<cal>" user="<user>" 
    password="<password>" num_days="14" }
    {start_time format="%g:%i %a"}: {what} ({where})<br>
{/exp:googlecal_events}

Example 2 – TV Shows This Week

{exp:googlecal_events 
    google_calendars="3t2brro1crmt94uuqomrgipqiulm7fs7@import.calendar.google.com"
    user="<user>" password="<password>" num_days="7" 
}
    {start_day}<div style="font: bold 14px Verdana;">
        {start_day_format format="%l, %M %j %Y"}
    </div>{/start_day}
    {start_time format="%g:%i %a"} - {what} <br>
    <div style="margin: 0 4em 1em 4em;">{description}</div>
{/exp:googlecal_events}

About

Display events from Google Calendar in ExpressionEngine.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages