Wiki source code of GoogleCalendarMacrosX2

Last modified by Hal Eden on 2010/08/24 23:28

Hide last authors
Hal Eden 1.1 1 #**
2 * Displays a public google calendar with all buttons and displays
3 * The size of the display is 800x600
Hal Eden 2.34 4 *
5 * This macro displays the public part of the calendar specified. However if the visiting user is logged in in Google Calendar
6 * and has rights to the private part of the calendar then the information will be displayed.
Hal Eden 1.1 7 *
8 * @param id ID of the google account to display the calendar for
Hal Eden 3.4 9 *###
Hal Eden 1.1 10 #macro(googlecal $id)
Hal Eden 2.2 11 {{html}}
Hal Eden 1.1 12 <iframe src="http://www.google.com/calendar/embed?height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=${id.replaceAll("@","%40")}&amp;color=%232952A3" style=" b
Hal Eden 2.2 13 order-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>{{/html}}
Hal Eden 1.1 14 #end
Administrator 2.26 15 #**
Administrator 2.30 16 * Displays a public google calendar with all buttons and displays and a custom size
17 *
18 * @param id ID of the google account to display the calendar for
19 * @param width Width of the calendar
20 * @param height Height of the calendar
Hal Eden 3.4 21 *###
Administrator 2.30 22 #macro(googlecalsize $id $width $height)
23 #if($width=="")
24 #set($width = "800")
25 #end
26 #if($height=="")
27 #set($height = "600")
28 #end
29 {{html}}<iframe src="http://www.google.com/calendar/embed?height=${height}&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=${id.replaceAll("@","%40")}&amp;color=%232952A3" sty
30 le=" border-width:0 " width="${width}" height="${height}" frameborder="0" scrolling="no"></iframe>{{/html}}#end
31 #**
Hal Eden 1.1 32 * Displays a private google calendar with all buttons
33 *
Administrator 2.16 34 * @param id ID of the google account to display the calendar for
35 * @param 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.
36 * 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
Hal Eden 3.3 37 *###
Hal Eden 1.1 38 #macro(googlecalprivate $id $token)
Hal Eden 2.2 39 {{html}}
Hal Eden 1.1 40 <iframe src="http://www.google.com/calendar/embed?pvttk=${token}&amp;height=600&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=${id.replaceAll("@","%40")}&amp;color=%
41 232952A3" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>
Hal Eden 2.2 42 {{/html}}#end
Hal Eden 1.1 43 #**
Hal Eden 2.34 44 * Displays a private google calendar with all buttons
Hal Eden 1.1 45 * @param id ID of the google account to display the calendar for
Hal Eden 2.34 46 * @param 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.
47 * 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
Hal Eden 1.1 48 * @param width Width of the calendar
49 * @param height Height of the calendar
Hal Eden 3.3 50 *###
Administrator 2.7 51 #macro(googlecalprivatesize $id $token $width $height)
Hal Eden 1.1 52 #if($width=="")
53 #set($width = "800")
54 #end
55 #if($height=="")
56 #set($height = "600")
57 #end
Hal Eden 2.38 58 {{html}}
Hal Eden 1.1 59 <iframe src="http://www.google.com/calendar/embed?pvttk=${token}&amp;height=${height}&amp;wkst=1&amp;bgcolor=%23FFFFFF&amp;src=${id.replaceAll("@","%40")}&amp;c
60 olor=%232952A3" style=" border-width:0 " width="${width}" height="${height}" frameborder="0" scrolling="no"></iframe>
Hal Eden 2.32 61 {{/html}}#end
62 #**
Hal Eden 1.1 63 * Displays a public or private google calendar with a wide range of settings
64 * You can check the effect of these settings using the Google Calendar Embed Helper
65 * http://www.google.com/calendar/embedhelper
Hal Eden 2.32 66 *
67 * @param id ID of the google account to display the calendar for
68 * @param 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.
69 * 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
Hal Eden 1.1 70 * @param width Width of the calendar
71 * @param height Height of the calendar
72 * @param showTitle 0 to not show the title
Hal Eden 2.33 73 * @param showNav 0 to not show the navigation buttons allowing to switch to previous/next week or month
74 * @param showDate 0 to not show the current period displayed
Hal Eden 1.1 75 * @param showPrint 0 to not show the print button
76 * @param showTabs 0 to not show the tabs allowing to switch between MONTH,WEEK,AGENDA mode
77 * @param showCalendars 0 to not show the calendars list drop down button
78 * @param showTz Show a message saying the timezone of the dates/hours
79 * @param mode Default mode to display (empty is Month display, WEEK is Week dispaly, AGENDA is the event display)
80 * @param language Language to display in (en,fr,de,..)
81 * @param bgcolor Background color of the calendar in the form #255455
Hal Eden 2.32 82 * @param color Color of the events in the form #234567
83 * @param ctz Timezone in which to display the calendar. Leave empty for default calendar Timezone
Hal Eden 1.1 84 * @param border Border in pixels (1,2,3)
Hal Eden 3.4 85 *###
Hal Eden 1.1 86 #macro(googlecalcustom $id $token $width $height $showTitle $showNav $showDate $showPrint $showTabs $showCalendars $showTz $mode $language $bgcolor $color $ctz $border)
87 #if($width=="")
88 #set($width = "800")
89 #end
90 #if($height=="")
91 #set($height = "600")
92 #end
93 #if($color!="")
94 #set($color = $color.replaceAll("#","%23"))
95 #else
96 #set($color = "%232952A3")
97 #end
98 #if($bgcolor!="")
99 #set($bgcolor = $color.replaceAll("#","%23"))
100 #else
101 #set($bgcolor = "%232952A3")
102 #end
Hal Eden 3.5 103 {{html}}<iframe src="//www.google.com/calendar/embed?title=Test&amp;showTitle=${showTitle}&amp;showNav=${showNav}&amp;showDate=${showDate}&amp;showPrint=${showPrint}&amp;showTabs=${showTabs}&amp;showCalendars=${showCalendars}&amp;showTz=${showTz}&amp;mode=${mode}&amp;height=${height}&amp;wkst=2&amp;hl=${language}&amp;bgcolor=${bgcolor}&amp;src=${id.replaceAll("@","%40")}&amp;color=${color}&amp;ctz=${ctz}" style=" border:solid ${border}px #777 " width="${width}" height="${height}" frameborder="0" scrolling="no"></iframe>{{/html}}
Hal Eden 1.1 104 #end