One of my read­ers asked for a step-by-step set of instruc­tions to install MyGoogleCal2.php. My orig­i­nal posts for restyling Google Cal­en­dar did assume a cer­tain level of exper­tise. This should hope­fully help those who are still confused.

  1. Down­load mygooglecal2.zip.

  2. Unzip the file on your server, typ­i­cally into a sub­folder named ‘mygooglecal’.

  3. If your web server sup­ports .htac­cess files and your site does not already have one, just move the .htac­cess file that was in the zip file to the root of your site. If your web site already has an .htac­cess file, then you will need to copy the mod_rewrite rules from the the zip file’s .htac­cess file to the exist­ing one.

  4. If you have not already done so, go to the Embed­d­a­ble Cal­en­dar Helper and gen­er­ate the HTML code for the cal­en­dar. Place this code into the page that will dis­play the calendar.

  5. The HTML code for the Google Cal­en­dar is an <iframe> tag. You need to edit the src attribute to point to MyGoogleCal2.php on your server and not http://www.google.com/calendar/embed. See ‘USAGE:’ in the MyGoogleCal2.php file for an example.

  6. That’s the basic instal­la­tion. You should be able to edit the included CSS file. If you want to use a dif­fer­ent CSS file or move it some­where else, make sure to update the $stylesheet vari­able in MyGoogleCal2.php. Remem­ber, the CSS file is not guar­an­teed to be up-to-date so you may have to down­load your own copy. Just fol­low the direc­tions listed in MyGoogleCal2.php.

Some addi­tional notes:

  • Some of the col­ors that the Google Cal­en­dar uses are: #c3d9ff, #bcd, #cde, #e8eef7, #e5ecf9, and #112abb. That should help when edit­ing the CSS file. I highly rec­om­mend using Fire­fox and the Fire­bug exten­sion. The exten­sion has an Inspect fea­ture that let’s you select a DOM object and see its ele­ment ID, class, and style attrib­utes. That will help iden­tify which CSS rule you need change.

  • If the dis­play of the cal­en­dar is blank, that usu­ally means your PHP con­fig­u­ra­tion is wrong and most likely the curl mod­ule is not installed or dis­abled. Open the phpinfo.php file included in the zip file. This will list a bunch of debug infor­ma­tion about your web server’s PHP con­fig­u­ra­tion. If you do not see curl listed or curl is listed but dis­abled, then you will need to talk to your sys­tem admin­is­tra­tor to fix it.

9 Responses to “How To Install MyGoogleCal2.php”

  1. jeffk said on March 23rd, 2008 at 1:13 pm:

    Well, I’ll start the moronic ques­tions (thanks for this, by the way)

    I’m get­ting the blank cal­en­dar prob­lem. I think it’s the curl thing (I don’t see any men­tion of it on the PHP con­fig­u­ra­tion page.) Since my host is some large sin­is­ter cor­po­ra­tion I’m guess­ing that mak­ing this hap­pen will involve pain, but that’s an aside I sup­pose. I just want to check every­thing else first. So: what’s a “.htac­cess” file, and how do I know if my web server sup­ports it? If my web server doesn’t sup­port it (I don’t already have one), could this also cause the blank cal­en­dar problem?

    Also, should “blank” be *lit­er­ally* blank? Like, when I check the page source when I point my browser towards my MyGoogleCal2.php page, there’s sim­ply noth­ing there at all.

  2. jeffk said on March 23rd, 2008 at 1:23 pm:

    Update: My php con­fig­u­ra­tion file doesn’t men­tion CURL (http://www.arrowtownhousing.org/googlecal/phpinfo.php) but the host claims they sup­port CURL.

  3. Brian said on March 23rd, 2008 at 2:51 pm:

    Jeff,

    Your MyGoogleCal2.php page is work­ing just fine. You can test this by going to

    http://www.arrowtownhousing.org/googlecal/MyGoogleCal2.php?src=user%40domain.tld

    and replace ‘user%40domain.tld’ with your Google Cal­en­dar account. So curl is work­ing fine. If your web server is Apache it will sup­port .htac­cess files. Other web servers han­dle URL rewrit­ing dif­fer­ently and will prob­a­bly require con­vert­ing the .htac­cess file into another format.

  4. jeffk said on March 23rd, 2008 at 6:13 pm:

    You’re one of those internet-dwelling saints. Thanks so much.

  5. Vale said on July 18th, 2008 at 2:32 pm:

    IS there any­way to change the white back­ground or blue bor­der on the Google Cal­en­dar when Ifram­ing it?

    Vale Kel­ley
    Three Lakes Mar­ket­ing
    http://www.Threelakesmarketing.com

  6. Brandon said on August 12th, 2008 at 12:52 am:

    Agenda doesn’t work for me…

  7. Benno said on June 8th, 2009 at 2:15 am:

    hi,

    is it pos­si­ble to dis­play more than one cal­en­dar at once? if i do it as it is writ­ten in the tuto­r­ial it takes the first cal­en­dar of my account only … but i want them all (in dif­fer­ent colors) …

    thanks in advance,
    benno

  8. Brian said on June 8th, 2009 at 9:11 am:

    Yes. You should be able to dis­play more than one cal­en­dar. See the Usage sec­tion or bet­ter yet, use the Embed­d­a­ble Cal­en­dar Helper linked in Step 4 above.

    I’ve noticed that not all cal­en­dars are embed­d­a­ble if they’re imported from a non-Google source.

  9. Linden LAN » Blog Archive » Restyle Google Calendar 4 said on July 14th, 2009 at 8:25 pm:

    […] instal­la­tion of MyGoogleCal4 is the same as the instal­la­tion for MyGoogleCal2 except you down­load the zip file above. You can ignore step 3 regard­ing the .htac­cess file. As far […]

Subscribe to this post/thread