General Actions:
Log-in
Wiki:
Courses
▼
:
Document Index
»
Space:
XWiki
▼
:
Document Index
»
Page:
GoogleCalendarMacrosX2
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
GoogleCalendarMacrosX2
Wiki source code of
GoogleCalendarMacrosX2
Last modified by
Hal Eden
on 2010/08/24 23:28
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: #** 2: * Displays a public google calendar with all buttons and displays 3: * The size of the display is 800x600 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. 7: * 8: * @param id ID of the google account to display the calendar for 9: *### 10: #macro(googlecal $id) 11: {{html}} 12: <iframe src="http://www.google.com/calendar/embed?height=600&wkst=1&bgcolor=%23FFFFFF&src=${id.replaceAll("@","%40")}&color=%232952A3" style=" b 13: order-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>{{/html}} 14: #end 15: #** 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 21: *### 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}&wkst=1&bgcolor=%23FFFFFF&src=${id.replaceAll("@","%40")}&color=%232952A3" sty 30: le=" border-width:0 " width="${width}" height="${height}" frameborder="0" scrolling="no"></iframe>{{/html}}#end 31: #** 32: * Displays a private google calendar with all buttons 33: * 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 37: *### 38: #macro(googlecalprivate $id $token) 39: {{html}} 40: <iframe src="http://www.google.com/calendar/embed?pvttk=${token}&height=600&wkst=1&bgcolor=%23FFFFFF&src=${id.replaceAll("@","%40")}&color=% 41: 232952A3" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe> 42: {{/html}}#end 43: #** 44: * Displays a private google calendar with all buttons 45: * @param id ID of the google account to display the calendar for 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 48: * @param width Width of the calendar 49: * @param height Height of the calendar 50: *### 51: #macro(googlecalprivatesize $id $token $width $height) 52: #if($width=="") 53: #set($width = "800") 54: #end 55: #if($height=="") 56: #set($height = "600") 57: #end 58: {{html}} 59: <iframe src="http://www.google.com/calendar/embed?pvttk=${token}&height=${height}&wkst=1&bgcolor=%23FFFFFF&src=${id.replaceAll("@","%40")}&c 60: olor=%232952A3" style=" border-width:0 " width="${width}" height="${height}" frameborder="0" scrolling="no"></iframe> 61: {{/html}}#end 62: #** 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 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 70: * @param width Width of the calendar 71: * @param height Height of the calendar 72: * @param showTitle 0 to not show the title 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 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 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 84: * @param border Border in pixels (1,2,3) 85: *### 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 103: {{html}}<iframe src="//www.google.com/calendar/embed?title=Test&showTitle=${showTitle}&showNav=${showNav}&showDate=${showDate}&showPrint=${showPrint}&showTabs=${showTabs}&showCalendars=${showCalendars}&showTz=${showTz}&mode=${mode}&height=${height}&wkst=2&hl=${language}&bgcolor=${bgcolor}&src=${id.replaceAll("@","%40")}&color=${color}&ctz=${ctz}" style=" border:solid ${border}px #777 " width="${width}" height="${height}" frameborder="0" scrolling="no"></iframe>{{/html}} 104: #end
Welcome
Welcome to this XWiki!
Quick Links
DSSF 2008
DCNM 2009
HCCF 2010
Document Index
Sandbox
My Recent Modifications
ASSIGNMENTNAME