<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for iamhigham.com</title>
	<atom:link href="http://iamhigham.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://iamhigham.com</link>
	<description>adventures of a software developer</description>
	<lastBuildDate>Thu, 12 Jan 2012 18:27:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>Comment on Customising an embedded google calendar by Evan</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-351</link>
		<dc:creator>Evan</dc:creator>
		<pubDate>Thu, 12 Jan 2012 18:27:37 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-351</guid>
		<description>Ditto.  It&#039;ll pull a certain chunk of events, but if you navigate into the past or future, it won&#039;t load any more.  In my case it was a couple month&#039;s worth.  This is because the copy of the iframe source saved on the hosting site is a static snapshot of events that were loaded when the wget was run.</description>
		<content:encoded><![CDATA[<p>Ditto.  It&#8217;ll pull a certain chunk of events, but if you navigate into the past or future, it won&#8217;t load any more.  In my case it was a couple month&#8217;s worth.  This is because the copy of the iframe source saved on the hosting site is a static snapshot of events that were loaded when the wget was run.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Blake</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-343</link>
		<dc:creator>Blake</dc:creator>
		<pubDate>Fri, 30 Dec 2011 18:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-343</guid>
		<description>Nice explanation. It worked well for me, I was able to format that plain-Jane title on the calendar to match my site. Thank you for taking the time to post this.</description>
		<content:encoded><![CDATA[<p>Nice explanation. It worked well for me, I was able to format that plain-Jane title on the calendar to match my site. Thank you for taking the time to post this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Mike</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-336</link>
		<dc:creator>Mike</dc:creator>
		<pubDate>Thu, 01 Dec 2011 09:41:29 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-336</guid>
		<description>Thanks for the code, tested this and got it working eventually but found that the initial iframe call only loads the first 5 weeks of events. Clicking the navigation links obviously changes the google output but doesn&#039;t refresh the custom_calendar.php page. I suspect you would need to make changes to the javascript file used by Google to update your own pages too.
I gave up at this point as it wasn&#039;t worth the extra time.</description>
		<content:encoded><![CDATA[<p>Thanks for the code, tested this and got it working eventually but found that the initial iframe call only loads the first 5 weeks of events. Clicking the navigation links obviously changes the google output but doesn&#8217;t refresh the custom_calendar.php page. I suspect you would need to make changes to the javascript file used by Google to update your own pages too.<br />
I gave up at this point as it wasn&#8217;t worth the extra time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by ksvendsboe</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-334</link>
		<dc:creator>ksvendsboe</dc:creator>
		<pubDate>Wed, 09 Nov 2011 17:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-334</guid>
		<description>Genius. THANK YOU!!!</description>
		<content:encoded><![CDATA[<p>Genius. THANK YOU!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Jacob Krekura.com</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-333</link>
		<dc:creator>Jacob Krekura.com</dc:creator>
		<pubDate>Fri, 28 Oct 2011 18:04:51 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-333</guid>
		<description>Worked like a charm. Thanks!</description>
		<content:encoded><![CDATA[<p>Worked like a charm. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Atisha</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-331</link>
		<dc:creator>Atisha</dc:creator>
		<pubDate>Mon, 24 Oct 2011 11:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-331</guid>
		<description>Because of the way that Google outputs the calendar entries, it puts them into a table. In some cases, when one of the items in that table becomes higher than one line (because of our enabling word-wrapping), the entire row that it&#039;s in becomes higher than it needs to be. This creates the appearance of blank lines underneath some of the entries. There is no way to work around this issue since it&#039;s based on how Google exports the calendar information.

It is nice to be able to display multiple lines, however, it&#039;s just a bit of a shame that the formatting doesn&#039;t come out more cleanly.</description>
		<content:encoded><![CDATA[<p>Because of the way that Google outputs the calendar entries, it puts them into a table. In some cases, when one of the items in that table becomes higher than one line (because of our enabling word-wrapping), the entire row that it&#8217;s in becomes higher than it needs to be. This creates the appearance of blank lines underneath some of the entries. There is no way to work around this issue since it&#8217;s based on how Google exports the calendar information.</p>
<p>It is nice to be able to display multiple lines, however, it&#8217;s just a bit of a shame that the formatting doesn&#8217;t come out more cleanly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Atisha</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-330</link>
		<dc:creator>Atisha</dc:creator>
		<pubDate>Sun, 23 Oct 2011 00:36:36 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-330</guid>
		<description>Hi all,
Thanks for presenting this very clever idea, and hopefully lots of people can get benefit from this. Following the pointers in this article, I&#039;ve prepared the code necessary for doing this. You need to create 2 files: custom_calendar.php (the actual calendar file) and custom_calendar.css (a CSS file to style the calendar to your liking). The first file is the main one that makes this possible; the second file allows you to change any of the CSS properties. Figuring out which CSS properties to change to make this suit your exact needs will probably take some experimentation and reverse-engineering.

Your website needs to be able to serve PHP files for this to work.

&lt;b&gt;custom_calendar.php&lt;/b&gt;
&lt;blockquote&gt;
&lt;code&gt;
&lt;?php
	$your_google_calendar=&quot;https://www.google.com/calendar/embed?src=usa__en@holiday.calendar.google.com&amp;gsessionid=OK&quot;;
	$url= parse_url($your_google_calendar);
	$google_domain = $url[&#039;scheme&#039;].&#039;://&#039;.$url[&#039;host&#039;].dirname($url[&#039;path&#039;]).&#039;/&#039;;

	// Load and parse Google&#039;s raw calendar
	$dom = new DOMDocument;
    $dom-&gt;loadHTMLfile($your_google_calendar);
    
	// Change Google&#039;s CSS file to use absolute URLs (assumes there&#039;s only one  element)
    $css = $dom-&gt;getElementByTagName(&#039;link&#039;)-&gt;item(0);
    $css_href = $css-&gt;getAttributes(&#039;href&#039;);
    $css-&gt;setAttributes(&#039;href&#039;, $google_domain . $css_href);
    
	// Change Google&#039;s JS file to use absolute URLs
	$scripts = $dom-&gt;getElementByTagName(&#039;script&#039;)-&gt;item(0);
	foreach ($scripts as $script) {
		$js_src = $script-&gt;getAttributes(&#039;src&#039;);
		if ($js_src) $script-&gt;setAttributes(&#039;src&#039;, $google_domain . $js_src);
	}	
	
    // Create a link to a new CSS file called custom_calendar.css
    $element = $dom-&gt;createElement(&#039;link&#039;);
    $element-&gt;setAttribute(&#039;type&#039;, &#039;text/css&#039;);
    $element-&gt;setAttribute(&#039;rel&#039;, &#039;stylesheet&#039;);
    $element-&gt;setAttribute(&#039;href&#039;, &#039;custom_calendar.css&#039;);

    // Append this link at the end of the  element
    $head = $dom-&gt;getElementByTagName(&#039;head&#039;)-&gt;item(0);
	$head-&gt;appendChild($element);

	// Export the HTML
	echo $dom-&gt;saveHTML();
?&gt;
&lt;/code&gt;
&lt;/blockquote&gt;

&lt;b&gt;custom_calendar.css&lt;/b&gt;
&lt;blockquote&gt;
&lt;code&gt;
.dp-cur, .chip dt, .te, .te-t, .te-rev-s, .rb-n, .rb-i, .agenda, .event-title{
	white-space:normal !important;
}
&lt;/code&gt;
&lt;/blockquote&gt;

In many places having the lines wrap will &quot;mess up&quot; the appearance of the calendar by creating lots of gaps between events. You may need some experimentation to get it to look right for your site.</description>
		<content:encoded><![CDATA[<p>Hi all,<br />
Thanks for presenting this very clever idea, and hopefully lots of people can get benefit from this. Following the pointers in this article, I&#8217;ve prepared the code necessary for doing this. You need to create 2 files: custom_calendar.php (the actual calendar file) and custom_calendar.css (a CSS file to style the calendar to your liking). The first file is the main one that makes this possible; the second file allows you to change any of the CSS properties. Figuring out which CSS properties to change to make this suit your exact needs will probably take some experimentation and reverse-engineering.</p>
<p>Your website needs to be able to serve PHP files for this to work.</p>
<p><b>custom_calendar.php</b></p>
<blockquote><p>
<code><br />
&lt;?php<br />
	$your_google_calendar="https://www.google.com/calendar/embed?src=usa__en@holiday.calendar.google.com&amp;gsessionid=OK";<br />
	$url= parse_url($your_google_calendar);<br />
	$google_domain = $url['scheme'].'://'.$url['host'].dirname($url['path']).'/';</p>
<p>	// Load and parse Google's raw calendar<br />
	$dom = new DOMDocument;<br />
    $dom-&gt;loadHTMLfile($your_google_calendar);</p>
<p>	// Change Google's CSS file to use absolute URLs (assumes there's only one  element)<br />
    $css = $dom-&gt;getElementByTagName('link')-&gt;item(0);<br />
    $css_href = $css-&gt;getAttributes('href');<br />
    $css-&gt;setAttributes('href', $google_domain . $css_href);</p>
<p>	// Change Google's JS file to use absolute URLs<br />
	$scripts = $dom-&gt;getElementByTagName('script')-&gt;item(0);<br />
	foreach ($scripts as $script) {<br />
		$js_src = $script-&gt;getAttributes('src');<br />
		if ($js_src) $script-&gt;setAttributes('src', $google_domain . $js_src);<br />
	}	</p>
<p>    // Create a link to a new CSS file called custom_calendar.css<br />
    $element = $dom-&gt;createElement('link');<br />
    $element-&gt;setAttribute('type', 'text/css');<br />
    $element-&gt;setAttribute('rel', 'stylesheet');<br />
    $element-&gt;setAttribute('href', 'custom_calendar.css');</p>
<p>    // Append this link at the end of the  element<br />
    $head = $dom-&gt;getElementByTagName('head')-&gt;item(0);<br />
	$head-&gt;appendChild($element);</p>
<p>	// Export the HTML<br />
	echo $dom-&gt;saveHTML();<br />
?&gt;<br />
</code>
</p></blockquote>
<p><b>custom_calendar.css</b></p>
<blockquote><p>
<code><br />
.dp-cur, .chip dt, .te, .te-t, .te-rev-s, .rb-n, .rb-i, .agenda, .event-title{<br />
	white-space:normal !important;<br />
}<br />
</code>
</p></blockquote>
<p>In many places having the lines wrap will &#8220;mess up&#8221; the appearance of the calendar by creating lots of gaps between events. You may need some experimentation to get it to look right for your site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Mark</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-320</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Mon, 22 Aug 2011 11:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-320</guid>
		<description>Hey dude, this looks like its awesome but i can&#039;t quite get it to work - Is there anyway you could post your entire iframe embed code rather than just the segments? Obviously block out your calendar link.

I&#039;m just struggling to put all the code together to achieve this.</description>
		<content:encoded><![CDATA[<p>Hey dude, this looks like its awesome but i can&#8217;t quite get it to work &#8211; Is there anyway you could post your entire iframe embed code rather than just the segments? Obviously block out your calendar link.</p>
<p>I&#8217;m just struggling to put all the code together to achieve this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Katie</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-313</link>
		<dc:creator>Katie</dc:creator>
		<pubDate>Tue, 26 Jul 2011 00:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-313</guid>
		<description>Hi Patrick!

I actually did not customize the wrap-text feature; this particular calendar is in agenda view and has enough room for all the titles to stretch. However, if I were to hazard a guess as to which attribute to change in the Google CSS, I would say .agenda .event-title would be the one. For example, my CSS currently reads as follows:

.agenda .event-title {
    clear: none;
    color: #D15600;
    display: block;
    font-size: 12px;
    font-style: normal;
    font-weight: normal;
    margin: 0;
    overflow: hidden;
    white-space: nowrap;
}

I would change that to:
.agenda .event-title {
    clear: none;
    color: #D15600;
    display: block;
    font-size: 12px;
    font-style: normal;
    font-weight: normal;
    margin: 0;
    overflow: hidden;
    white-space: normal;
}

Hope that helps!</description>
		<content:encoded><![CDATA[<p>Hi Patrick!</p>
<p>I actually did not customize the wrap-text feature; this particular calendar is in agenda view and has enough room for all the titles to stretch. However, if I were to hazard a guess as to which attribute to change in the Google CSS, I would say .agenda .event-title would be the one. For example, my CSS currently reads as follows:</p>
<p>.agenda .event-title {<br />
    clear: none;<br />
    color: #D15600;<br />
    display: block;<br />
    font-size: 12px;<br />
    font-style: normal;<br />
    font-weight: normal;<br />
    margin: 0;<br />
    overflow: hidden;<br />
    white-space: nowrap;<br />
}</p>
<p>I would change that to:<br />
.agenda .event-title {<br />
    clear: none;<br />
    color: #D15600;<br />
    display: block;<br />
    font-size: 12px;<br />
    font-style: normal;<br />
    font-weight: normal;<br />
    margin: 0;<br />
    overflow: hidden;<br />
    white-space: normal;<br />
}</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Customising an embedded google calendar by Electronsmith.com &#187; Blog Archive &#187; Applying CSS to Google Calendar Embedded in an iframe</title>
		<link>http://iamhigham.com/2011/01/customising-an-embedded-google-calendar/#comment-312</link>
		<dc:creator>Electronsmith.com &#187; Blog Archive &#187; Applying CSS to Google Calendar Embedded in an iframe</dc:creator>
		<pubDate>Sat, 23 Jul 2011 16:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://iamhigham.com/?p=60#comment-312</guid>
		<description>[...] the web I found one solution: Customising an embedded google calendar, that looked promising. Basically use wget to capture the page that is returned in the embeded code [...]</description>
		<content:encoded><![CDATA[<p>[...] the web I found one solution: Customising an embedded google calendar, that looked promising. Basically use wget to capture the page that is returned in the embeded code [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

