Template:Gcal: Difference between revisions

From VrlWiki
Jump to navigation Jump to search
Jadrian Miles (talk | contribs)
No edit summary
Jadrian Miles (talk | contribs)
No edit summary
Line 1: Line 1:
<noinclude>{{Help:Template:gcal}}</noinclude><includeonly><html><iframe src="http://www.google.com/calendar/embed?showTitle=</html>{{{showTitle|0}}}<html>&amp;showPrint={@{showPrint|0}@}&amp;showCalendars={@{showCalendars|0}@}&amp;mode={@{mode|MONTH}@}&amp;height={@{height|500}@}&amp;wkst=1&amp;src={@{src}@}&amp;ctz={@{ctz|America%2FNew_York}@}" style="border: 0" width="100%" height="{@{height|500}@}" frameborder="0" scrolling="no"></iframe></html></includeonly>
<noinclude>{{Help:Template:gcal}}</noinclude><includeonly><iframe src="http://www.google.com/calendar/embed?showTitle={@{showTitle|0}@}&amp;showPrint={@{showPrint|0}@}&amp;showCalendars={@{showCalendars|0}@}&amp;mode={@{mode|MONTH}@}&amp;height={@{height|500}@}&amp;wkst=1&amp;src={@{src}@}&amp;ctz={@{ctz|America%2FNew_York}@}" style="border: 0" width="100%" height="{@{height|500}@}" frameborder="0" scrolling="no"></iframe></html></includeonly>

Revision as of 22:48, 23 September 2008

Template:gcal adds a Google calendar to the including page. The template looks like this:

{{#shtml:Template:gcal
|src=<a_long_ID_string>
|mode=[AGENDA|WEEK|MONTH]
|height=500
}}

Note that you must include values for each argument. Figure out the values by the following procedure:

  1. Open up Google calendar.
  2. Select the drop-down menu for the calendar you want and select "Calendar settings".
  3. Scroll down to "Embed This Calendar".
    • You may also want to click the "customize" link to get other options.
  4. In the text box containing the embed code, look for a string like http://www.google.com/calendar/embed?<key_1>=<val_1>&amp;<key_2>=<val_2>...
  5. For each of the arguments above, look for the corresponding key in the embed code and set the argument to the corresponding value.
    • src will be a long string, probably ending with "group.calendar.google.com".
    • mode is one of AGENDA, WEEK, or MONTH.
    • height is 500 by convention on our wiki but you may choose any height in pixels.