Google Calendar Macro
Last modified by Vincent Massol on 2024/07/05 17:43
Display a Google Calendar inside a wiki page |
Type | Doc (Velocity Macro) |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Table of contents
Description
We show on this page different ways to display a Google Calendar using the XWiki Google Calendar Macro. We are using the French holidays calendar as an example.
Simple display of a calendar
#includeMacros("XWiki.GoogleCalendarMacros")
#googlecal("french__fr@holiday.calendar.google.com")
#googlecal("french__fr@holiday.calendar.google.com")
Param name | Description |
---|---|
id | ID of the google account to display the calendar for |
Showing a calendar with a custom size
#includeMacros("XWiki.GoogleCalendarMacros")
#googlecalsize("french__fr@holiday.calendar.google.com","200", "200")
#googlecalsize("french__fr@holiday.calendar.google.com","200", "200")
Param name | Description |
---|---|
id | ID of the google account to display the calendar for |
width | Width of the calendar |
height | Height of the calendar |
Showing a fully custom calendar
#includeMacros("XWiki.GoogleCalendarMacros")
## $id $token $width $height $showTitle $showNav $showDate $showPrint $showTabs $showCalendars $showTz $mode $language $bgcolor $color $ctz $border
#googlecalcustom("french__fr@holiday.calendar.google.com","","800", "600","0","0","0","0","0","1","1","WEEK","fr","%232952A3","","","3")
## $id $token $width $height $showTitle $showNav $showDate $showPrint $showTabs $showCalendars $showTz $mode $language $bgcolor $color $ctz $border
#googlecalcustom("french__fr@holiday.calendar.google.com","","800", "600","0","0","0","0","0","1","1","WEEK","fr","%232952A3","","","3")
Param name | Description |
---|---|
id | ID of the google account to display the calendar for |
token | Private token giving access to the Calendar. This token is 32 chars long and can be retrieved in the "Agenda Details" when accessing your "Private URL" of your calendar. You should use this parameter with care as it will display all your calendar events to anybody that can access the page in which you use this macro |
width | Width of the calendar |
height | Height of the calendar |
showTitle | 0 to not show the title |
showNav | 0 to not show the navigation buttons allowing to switch to previous/next week or month |
showDate | 0 to not show the current period displayed |
showPrint | 0 to not show the print button |
showTabs | 0 to not show the tabs allowing to switch between MONTH,WEEK,AGENDA mode |
showCalendars | 0 to not show the calendars list drop down button |
showTz | Show a message saying the timezone of the dates/hours |
mode | Default mode to display (empty is Month display, WEEK is Week dispaly, AGENDA is the event display) |
language | Language to display in (en,fr,de,..) |
bgcolor | Background color of the calendar in the form #255455 |
color | Color of the events in the form #234567 |
ctz | Timezone in which to display the calendar. Leave empty for default calendar Timezone |
border | Border in pixels (1,2,3) |
Showing a Private calendar
You will need a token to show a private calendar. This token is 32 chars long and can be retrieved in the "Agenda Details" when accessing your "Private URL" of your calendar. You should use this parameter with care as it will display all your calendar events to anybody that can access the page in which you use this macro
#includeMacros("XWiki.GoogleCalendarMacros")
#googlecalprivate("french__fr@holiday.calendar.google.com","wrongtoken")
#googlecalprivatesize("french__fr@holiday.calendar.google.com","wrongtoken","200","200")
#googlecalprivate("french__fr@holiday.calendar.google.com","wrongtoken")
#googlecalprivatesize("french__fr@holiday.calendar.google.com","wrongtoken","200","200")
Param name | Description |
---|---|
id | ID of the google account to display the calendar for |
token | Private token giving access to the Calendar. This token is 32 chars long and can be retrieved in the "Agenda Details" when accessing your "Private URL" of your calendar. You should use this parameter with care as it will display all your calendar events to anybody that can access the page in which you use this macro |
width | Width of the calendar |
height | Height of the calendar |