Help:Widget:Google Calendar: Difference between revisions

Jump to navigation Jump to search
add info about widget, usage info and more exaples
(stub out headings and add sample code)
(add info about widget, usage info and more exaples)
Line 1: Line 1:
== What is #widget:Google Calendar ==
== What is #widget:Google Calendar ==
This widget allows you to add '''[http://www.google.com/calendar/embedhelper Google Calendar]''' widget to your wiki page.
It was originally created by [[mediawikiwiki:User:Sergey Chernyshev|Sergey Chernyshev]] for [http://www.techpresentations.org/Conferences#Current_.26_Upcoming_conferences upcoming conference calendar] on TechPresentations.org
[http://www.mediawikiwidgets.org/Google_Calendar Learn about about this widget].
== How do you use #widget:Google Calendar? ==
== How do you use #widget:Google Calendar? ==
To insert this widget, use the following code:
<nowiki>{{#widget:</nowiki>{{PAGENAME}}<nowiki>
|id=<calendar-id>
}}</nowiki>
== Parameters ==
* '''id''' - is a calendar ID (including <code>@calendar.google.com</code>, come match user email addresses) - can be found on calendar settings page
* '''title''' - new title if you want to override calendar title (optional)
* '''height''' and '''width''' define calendar dimensions, 100%x600 is default (only width can be defined in %).
* '''color''' - events color (hex value. e.g. 5229A3) - only color used in [http://www.google.com/calendar/embedhelper Google's wizard] can be used.
* '''bgcolor''' - background/border color (hex value. e.g. ffcc66)
* '''weekstart''' - first day of the week (1-7)
* '''lang''' - interface language (en, fr, ru and etc).
* '''view''' - default view MONTH (default)/WEEK/AGENDA)
* '''timezone''' - time zone defined as a string like "America/New_York", should be automatically detected if omitted
* '''pvttk''' - This key is used to access non-public calendars.  All calendars must be on a single account. [Depreciated by Google: See https://support.google.com/calendar/answer/1631300?hl=en]
* '''style''' - The style attribute to be applied to the iframe.
* You can also trigger parts of the interface on and off:
** '''showtitle''' - true (default)/false - shows title
** '''shownav''' - true (default)/false - shows navigation arrows
** '''showdate''' - true (default)/false - shows date
** '''showtabs''' - true (default)/false - shows view tabs
** '''showcals''' - true (default)/false - shows a calendar list
** '''showprint''' - true (default)/false - shows a print icon
** '''showtz''' - true (default)/false - shows timezone
** '''border''' - true/false (default) - draws thin border around the widget
* '''app''' - for [http://www.google.com/apps/ Google Apps for Your Domain] Calendars, specify the domain name for the account (<code><nowiki>http://www.google.com/calendar/hosted/</nowiki>'''yourdomain.com'''/render</code>)
=== Share your Google Calendar ===
In order for the calendar to be visible on MozillaWiki, you need to share the calendar publicly.
[[File:Google_Calendar_share_step_1.png]]
[[File:Google_Calendar_share_step_2.png]]
Once you've shared the calendar, you'll need to get it's ID. You can find this in the calendar's settings page, towards the bottom:
[[File:Google_Calendar_-_get_id.png]]
== Real Example ==
== Real Example ==
This example shows US holidays.
<nowiki>{{#widget:Google Calendar
|id=usa@holiday.calendar.google.com
|title=US Holidays
}}</nowiki>
{{#widget:Google Calendar
|id=usa@holiday.calendar.google.com
|title=US Holidays
}}
This example shows US holidays using the weekly view:


  <nowiki>{{#widget:Google Calendar
  <nowiki>{{#widget:Google Calendar
|id=usa@holiday.calendar.google.com
|id=usa@holiday.calendar.google.com
|color=528800
|view=WEEK
|title=US Holidays
|title=US Holidays
}}</nowiki>
}}</nowiki>
Line 11: Line 74:
{{#widget:Google Calendar
{{#widget:Google Calendar
|id=usa@holiday.calendar.google.com
|id=usa@holiday.calendar.google.com
|color=528800
|view=WEEK
|title=US Holidays
|title=US Holidays
}}
}}
canmove, Confirmed users, Bureaucrats and Sysops emeriti
3,698

edits

Navigation menu