How do I embed a google calendar?

kztanya's Avatar

kztanya

13 Feb, 2016 02:57 AM

Hi,
I have created a google calendar that I want to embed on my faculty home page. How do I go about doing this in Cascade? I found a similar question here, but the answers were a bit advanced for me. Can someone point me to a step by step guide that will help me do this?

Thanks

  1. 1 Posted by Wing Ming Chan on 13 Feb, 2016 03:12 PM

    Wing Ming Chan's Avatar

    Hi,

    We are also experimenting this right now. Here is the prototype:

    http://www.upstate.edu/roomcal/lib220.php

    It is very simple to implement. First, we use PHP. Second, we put code of the following type in a text block and attach it to a block chooser:

    <?php $today = date("Ymd");
    print "<iframe src='https://calendar.google.com/calendar/embed?showTitle=0&showDate=0&showPrint=0&showTabs=0&showCalendars=0&showTz=0&mode=DAY&dates=$today/$today&height=600&wkst=1&bgcolor=%23FFFFFF&src=ugeue2am20hh85l7s96ih5kpm11l5pfp%40import.calendar.google.com&color=%2329527A&ctz=America%2FNew_York' style='border-width:0' width='320' height='600' frameborder='0' scrolling='no'></iframe>";
    ?>
    

    That's all about it. If you wish, you can also attach the text block to a region.

    Wing

  2. 2 Posted by kztanya on 13 Feb, 2016 06:59 PM

    kztanya's Avatar

    Hi Wing,

    Thanks! I toyed around and am beginning to understand how this can happen.

    My calendar extends several months in the future. I want to show the month view with the option for viewers to click onto the future months. The prototype you showed is for today view only. How can I adjust for the month?

    Thanks again!

  3. 3 Posted by Wing Ming Chan on 13 Feb, 2016 09:00 PM

    Wing Ming Chan's Avatar

    You need to play with the dates parameter. You need to, for example, calculate the end time using PHP, and plug it after the slash. See Google Calendar render action Template parameter documentation for more info.

  4. Ryan Griffith closed this discussion on 04 Mar, 2016 10:09 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac