Help:Template:gcal: Difference between revisions

From VrlWiki
Jump to navigation Jump to search
Jadrian Miles (talk | contribs)
New page: '''Template:gcal''' adds a Google calendar to the including page. To embed a calendar into a page, first get its ID: # Open up [http://www.google.com/calendar Google calendar]. # Sele...
 
Jadrian Miles (talk | contribs)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''[[Template:gcal]]''' adds a Google calendar to the including page.  To embed a calendar into a page, first get its ID:
'''[[Template:gcal]]''' adds a Google calendar to the including page.  The template looks like this:
<pre>
{{#shtml:Template:gcal
|src=&lt;a_long_ID_string&gt;
|mode=[AGENDA|WEEK|MONTH]
|height=500
}}
</pre>
 
Note that '''you must include values for each argument'''.  Figure out the values by the following procedure:
# Open up [http://www.google.com/calendar Google calendar].
# Open up [http://www.google.com/calendar Google calendar].
# Select the drop-down menu for the calendar you want and select "Calendar settings".
# Select the drop-down menu for the calendar you want and select "Calendar settings".
# Scroll down to "Embed This Calendar".
# Scroll down to "Embed This Calendar".
# In the text box containing the embed code, look for a string like <code>src=&lt;long_string_of_stuff&gt;&amp;ctz=...</code>
#* You may also want to click the "customize" link to get other options.
# Copy the string between <code>src=</code> and <code>&amp;ctz=</code>
# In the text box containing the embed code, look for a string like <code><nowiki>http://www.google.com/calendar/embed?&lt;key_1&gt;=&lt;val_1&gt;&amp;amp;&lt;key_2&gt;=&lt;val_2&gt;...</nowiki></code>
Now, in the wiki page where you want to embed the calendar, insert the following code snippet, replacing <code>&lt;src_string&gt;</code> with the string you copied in the previous step:
# For each of the arguments above, look for the corresponding key in the embed code and set the argument to the corresponding value.
<pre>
#* <code>src</code> will be a long string, probably ending with "group.calendar.google.com".
{{#shtml:Template:gcal | src=&lt;src_string&gt;}}
#* <code>mode</code> is one of <code>AGENDA</code>, <code>WEEK</code>, or <code>MONTH</code>.
</pre>
#* <code>height</code> is <code>500</code> by convention on our wiki but you may choose any height in pixels.<noinclude>
[[Category:Help|Gcal]]
</noinclude>

Latest revision as of 06:14, 4 November 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.