<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The One with the Thoughts of Frans &#187; Internet</title>
	<atom:link href="http://fransdejonge.com/category/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://fransdejonge.com</link>
	<description>Just a personal blog, sharing some thoughts and findings.</description>
	<lastBuildDate>Wed, 28 Jul 2010 12:34:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dealing With cPanel: Setting Up a 301 Redirect to Your Main Domain And Preventing .htaccess Hell</title>
		<link>http://fransdejonge.com/2010/07/28/dealing-with-cpanel-setting-up-a-301-redirect-to-your-main-domain-and-preventing-htaccess-hell/</link>
		<comments>http://fransdejonge.com/2010/07/28/dealing-with-cpanel-setting-up-a-301-redirect-to-your-main-domain-and-preventing-htaccess-hell/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 12:32:35 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Sites]]></category>

		<guid isPermaLink="false">http://fransdejonge.com/?p=1718</guid>
		<description><![CDATA[cPanel is surprisingly ill-suited for managing domains. In this post I discuss two methods I use to prevent some issues that arise from this problem.]]></description>
			<content:encoded><![CDATA[<p>cPanel is surprisingly ill-suited for managing domains. Rather than treating each domain as a separate entity, you get one main domain and various so-called add-on domains. The most annoying aspect of this is that it always creates a subdomain when you add a new add-on domain. There should be no such thing as an add-on domain, just a bunch of domains. cPanel has some features that help you work around these defects, but I wasn&#8217;t too thrilled with those. It now seems to automatically redirect the www-subdomain to your no-www domain and you can easily set up subdomains to redirect through the interface, but it doesn&#8217;t satisfy me.</p>
<h3>Setting Up a 301 Redirect</h3>
<p>Instead of having to bother with a plethora of settings in cPanel itself, I came up with the following to stick at the top of .htaccess. A quick look around on the Internet brought up <a href="http://www.fayazmiraz.com/remove-subdomain-access-from-addon-domain/">Fayaz Miraz&#8217;s blog</a>, but while the solution suggestion was close, it misses one crucial aspect: it only redirects from the main page as far as I can tell. This is fixed easily by the addition of $1 (i.e. everything that was added after the main page).</p>
<pre><code>&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On

RewriteCond %{HTTP_HOST} !^fransdejonge\.com$
RewriteRule ^(.*)$ http://fransdejonge.com/$1 [R=301,L]

&lt;/IfModule&gt;</code></pre>
<p>Simply put, it matches all possible routes of approach (whether through www or through a subdomain of another domain) and if it&#8217;s not fransdejonge.com, it will 301 redirect to fransdejonge.com. The L means no further rewriting will occur after that rule. Mostly because it would just be inefficient, and partially because something else further down the line might mess things up.</p>
<h3>Preventing .htaccess Hell</h3>
<p>Another problem is that cPanel automatically creates a <code>/public_html/addondomain</code> directory. This is bad, because <code>/public_html</code> already contains a .htaccess file for the main domain. When accessing <code>/public_html/addondomain</code>, it would first parse the .htaccess file in <code>/public_html</code> before moving on and overriding it in <code>/public_html/addondomain</code>, and that&#8217;s assuming none of the rules in <code>/public_html</code> make anything go awry!</p>
<p>To prevent this kind of nightmare from occurring I took the simple precaution of creating a new directory <code>/domains</code>. This domain is contained in <code>/domains/fransdejonge.com</code>, for instance, and any other add-on or subdomains can reside in their own <code>/domains/domain.com</code> directory to prevent any added load from needlessly parsing .htaccess files.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/07/28/dealing-with-cpanel-setting-up-a-301-redirect-to-your-main-domain-and-preventing-htaccess-hell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What Is a Malamanteau?</title>
		<link>http://fransdejonge.com/2010/05/29/what-is-a-malamanteau/</link>
		<comments>http://fransdejonge.com/2010/05/29/what-is-a-malamanteau/#comments</comments>
		<pubDate>Sat, 29 May 2010 12:22:35 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Language]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1694</guid>
		<description><![CDATA[Rescued from Wikipedia.]]></description>
			<content:encoded><![CDATA[<p>The following article appeared on Wikipedia for a very short time due to <a href="http://xkcd.com/739/">a recent xkcd comic</a>. It&#8217;s a reference back to <a href="http://languagelog.ldc.upenn.edu/nll/?p=2314">Language Log</a>, which references xkcd sometimes, but the reverse seldom happens.</p>
<blockquote><p>A <b>malamanteau</b> (plural malamanteaux) is a neologism for a portmanteau created by incorrectly combining a malapropism with a neologism. It is itself a portmanteau of <a href="/wiki/Malapropism" title="Malapropism">malapropism</a> and <a href="/wiki/Portmanteau" title="Portmanteau">portmanteau</a>. In a less strict definition, a portmanteau of a malapropism with another word can also be considered a malamanteau. The contained malapropism must be typically a very common one, probably most people are not aware of, in order to be able to regain the meaning of a malamanteau.</p>
<p>A malamanteau often is created when somebody tries to use a neologism (alternatively, an idiom) but mistakenly confuses a word with another one. However, unlike a malapropism or an <a href="/wiki/Eggcorn" title="Eggcorn">eggcorn</a>, the fumbled word is not completely replaced, but merely transfixed to the new one. A famous example is: &#8220;misunderestimate&#8221; which was popularized by the 43rd President of the United States, <a href="/wiki/George_W._Bush" title="George W. Bush">George W. Bush</a>. Probably it was intended to be &#8220;underestimate&#8221; but mistakenly jumbled with &#8220;misunderstand.&#8221;</p>
<h3><span class="mw-headline" id="Examples">Examples</span></h3>
<ul>
<li>Somebody describes his misunderstanding of what someone was saying by stating, &#8220;I misconscrewed it up.&#8221;</li>
<li>Somenone explains his inability to talk while being upset by saying he was &#8220;flustrated.&#8221;</li>
<li>A meaningful malamanteau is &#8220;ambiviolent,&#8221; as in: &#8220;Beatrix Kiddo in <a href="/wiki/Kill_Bill" title="Kill Bill">Kill Bill</a> was ambiviolent. She didn&#8217;t know who to kill first.&#8221;</li>
</ul>
</blockquote>
<p>I was going to write more about it when I made this draft, but by now it&#8217;s two weeks later and I&#8217;ve lost interest. Booyah.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/05/29/what-is-a-malamanteau/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera and Link Targets</title>
		<link>http://fransdejonge.com/2010/05/09/opera-and-link-targets/</link>
		<comments>http://fransdejonge.com/2010/05/09/opera-and-link-targets/#comments</comments>
		<pubDate>Sun, 09 May 2010 12:20:49 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1693</guid>
		<description><![CDATA[How to customize Opera's handling of links.]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me and you aren&#8217;t particularly fond of sites opening in new tabs without your explicit command, you might be interested in activating <a href="opera:config#Ignore%20Target">Opera&#8217;s Ignore Target setting</a>. This setting &#8220;Unfortunately &#8230; also disables the <em>window.open()</em> method, breaking the functionality of many sites,&#8221; so you might prefer to utilize <a href="http://extendopera.org/userjs/content/remove-blank-targets">JKing&#8217;s UserJS which stops most links from opening in new windows</a>.</p>
<p>On the other hand, you might prefer all links to external sites to open in a new tab. I recently wrote <a href="http://extendopera.org/userjs/content/external-links-new-window" title="A script that opens external links in a new tab.">a script that does just that</a> for someone on the MyOpera forum.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/05/09/opera-and-link-targets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Acceptable Advertisements</title>
		<link>http://fransdejonge.com/2010/03/31/acceptable-advertisements/</link>
		<comments>http://fransdejonge.com/2010/03/31/acceptable-advertisements/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 12:52:06 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1685</guid>
		<description><![CDATA[Advertisements should be quiet and unobtrusive.]]></description>
			<content:encoded><![CDATA[<p>I agree with everything that Faruk Ateş wrote about <a href="http://farukat.es/journal/2010/03/409-ad-blockers-versus-flash-blockers">ad blockers and flash blockers</a>, but I would like to add one more point, with which I presume he will agree; I think it&#8217;s implied by his writing by referring to certain advertisements as being beautiful and fitting with the content, but never explicified. My point is simple: the advertisements have to be compatible with the type of media I&#8217;m viewing.</p>
<p>I don&#8217;t block Flash as it typically crashes separately from Opera on Linux, nor does it seem to slow things down for me. I don&#8217;t typically block ads, either — though it is really annoying if one ad is making the entire page load slowly. However, I will generally close a page while it&#8217;s loading if I am annoyed by the ads. When do ads annoy me? Simple: <strong>when they do not fit the type of content I&#8217;m looking at</strong>. If I want to read some text, I&#8217;m fine with static textual or image-based ads. I don&#8217;t want animation, although I suppose it&#8217;s possible to change ads now and then without it being too obtrusive. Anything that utilizes Flash typically breaks these rules and comes with distracting animation. Worse, it often even comes with sound. It doesn&#8217;t really matter what I&#8217;m doing; as long as I&#8217;ve got my sound system turned on I don&#8217;t want any sound to come from my speakers that I did not explicitly ask for.</p>
<p>Now if I&#8217;m going to watch a video, like on <a href="http://www.uitzendinggemist.nl/">Uitzendinggemist</a>, then I&#8217;m perfectly fine with a video-based advertisement with audio. <small class="sidenote">Uitzendinggemist literally means &#8220;missed broadcast.&#8221; It&#8217;s an online archive of most of Dutch public television broadcasts.</small> After all, I&#8217;m requesting video with sound. A 10-15 second advertisement prior to actually viewing the particular video I requested is perfectly acceptable. Similarly, I welcome short audio clips or endorsements in podcasts if they help pay for the podcast. But don&#8217;t start playing such messages at random. Although I don&#8217;t frequently use Firefox for regular browsing, my favorite extension is StopAutoPlay. This isn&#8217;t just about ads of course and applies just as much to people who decide to stick background music on their site, or to start playing videos automatically (I&#8217;m looking at you, YouTube), though if I opened a video somewhere it&#8217;s usually not too hard to figure out where the noise is coming from.</p>
<p>What could be an acceptable form of a video-based advertisement on a non-moving Internet page would be something akin to YouTube embedded videos. These don&#8217;t autoplay, but you have to click the play button first.</p>
<p>Everything I said applies just as much to things that aren&#8217;t advertisements, but too many advertisements seem to be made as annoyingly as possible on purpose. I hope that nobody has ever gained any business from such advertisements. They sure haven&#8217;t from me.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/03/31/acceptable-advertisements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tubes Beats Yahoo Pipes: Feed Fixup</title>
		<link>http://fransdejonge.com/2010/03/21/tubes-beats-yahoo-pipes-feed-fixup/</link>
		<comments>http://fransdejonge.com/2010/03/21/tubes-beats-yahoo-pipes-feed-fixup/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 13:01:51 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Tubes]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1626</guid>
		<description><![CDATA[An unexpected extension of Tubes took little time to write.]]></description>
			<content:encoded><![CDATA[<p>Although it has only been a couple of weeks since I started work on <a href="http://bitbucket.org/frenzie/tubes/">Tubes</a>, the mechanism I put in place to output feeds is already serving me very well. So well that it&#8217;s approaching all of my personal needs. This may potentially be bad for other people, but it&#8217;s great for me. Besides, I put the code out there; it should be easy enough to fork it if you wish it to do more! Bitbucket is also said to make it easy to merge such changes in later. I should also point out that the large majority of the work was of course done by the people who made SimplePie.</p>
<p>Anyway, I wanted to subscribe to the UN News podcast. To my surprise, gPodder was incapable of handling it. No surprise, as it turns out, because it&#8217;s not even proper according to the iTunes enclosure specification (although I imagine it works in iTunes). SimplePie had a nice get_enclosure() function already, so the first step, adding a proper enclosure to my Tube&#8217;s output feed, was a matter of minutes. The UN also fails to specify any size information, however, which I can&#8217;t say I was too enthused about in my trusty gPodder interface. Another 10 minutes or so later, I finished adding some cURL magic to my application. I should probably stash it away into a class later and see if I can somehow make it utilize SimplePie&#8217;s cache system to minimize useless traffic, but for now I just stuck it straight in the feed generation code. Now the UN feed is transformed from something gPodder couldn&#8217;t handle into something that essentially fixes all the UN did wrong. Thank you SimplePie for providing this great foundation!</p>
<p>Before (RSS):</p>
<pre><code>&lt;item&gt;
  &lt;title&gt;UN Daily News 12 March 2010&lt;/title&gt;
  &lt;itunes:author&gt;United Nations Radio&lt;/itunes:author&gt;
  &lt;itunes:subtitle&gt;News and features from United Nations Radio.&lt;/itunes:subtitle&gt;
  &lt;itunes:summary&gt;&lt;/itunes:summary&gt;
  &lt;enclosure url="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3" length="" type="audio/mpeg" /&gt;
  &lt;guid&gt;http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3&lt;/guid&gt;
  &lt;pubDate&gt;Fri, 12 Mar 2010 11:42:32 EST&lt;/pubDate&gt;
  &lt;itunes:duration&gt;0:00&lt;/itunes:duration&gt;
&lt;/item&gt;</code></pre>
<p>After (Atom):</p>
<pre><code>&lt;entry&gt;
  &lt;author&gt;
   &lt;name&gt;United Nations Radio&lt;/name&gt;
  &lt;/author&gt;
  &lt;title&gt;UN Daily News 12 March 2010&lt;/title&gt;
  &lt;summary&gt; &lt;/summary&gt;
  &lt;published&gt;2010-03-12T11:42:32-05:00&lt;/published&gt;
  &lt;updated&gt;2010-03-12T11:42:32-05:00&lt;/updated&gt;
  &lt;id&gt;http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3&lt;/id&gt;
  &lt;link rel="enclosure" type="audio/mpeg" href="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3" length="6720384" /&gt;
  &lt;link rel="alternate" type="text/html" href="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3"/&gt;
&lt;/entry&gt;</code></pre>
<p>I realize the alternate link currently has the wrong type attribute, which I&#8217;ll look into fixing, but at least my gPodder can handle the feed now.</p>
<p>I also set up <a href="http://frans.lowter.us/test/tubes/index.php?feedset=news">a little demo</a> so you can check the difference with <a href="http://www.unmultimedia.org/radio/english/rss/itunes.xml">the original feed</a> for yourselves. I&#8217;d be curious to hear how different podcatchers handle both feeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/03/21/tubes-beats-yahoo-pipes-feed-fixup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3" length="6720384" type="audio/mpeg" />
<enclosure url="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3" length="6720384" type="audio/mpeg" />
<enclosure url="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3" length="6720384" type="audio/mpeg" />
<enclosure url="http://downloads.unmultimedia.org/radio/en/ltd/mp3/2010/10031200.mp3" length="6720384" type="audio/mpeg" />
		</item>
		<item>
		<title>Microsoft and Video on The Web</title>
		<link>http://fransdejonge.com/2010/03/16/microsoft-and-video-on-the-web/</link>
		<comments>http://fransdejonge.com/2010/03/16/microsoft-and-video-on-the-web/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 20:47:29 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1632</guid>
		<description><![CDATA[An open letter to Microsoft worth reading.]]></description>
			<content:encoded><![CDATA[<p>Opera employee Haavard posted an <a href="http://my.opera.com/haavard/blog/2010/03/16/microsoft-letter">open letter to Microsoft regarding video on the web</a>. I&#8217;m just going to quote the last and best part.</p>
<blockquote cite="Haavard"><p>I know you are a patent licensor in the MPEG LA, and this would actually make your actions even more powerful and meaningful. You could show just how serious you are about interoperability on the Web by supporting the free and open codec rather than the one that would best suit your short-term interests.</p>
<p>This is a unique opportunity for you to win back the hearts and minds of people who might have otherwise dismissed you as carrying on with &#8220;business as usual&#8221;.</p>
<p>Are you up for it?</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/03/16/microsoft-and-video-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lighttpd and PHP on Ubuntu</title>
		<link>http://fransdejonge.com/2010/03/12/lighttpd-and-php-on-ubuntu/</link>
		<comments>http://fransdejonge.com/2010/03/12/lighttpd-and-php-on-ubuntu/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 11:51:11 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1615</guid>
		<description><![CDATA[Summarized guide to installing Lighttpd on Ubuntu.]]></description>
			<content:encoded><![CDATA[<p>I prefer Lighttpd over Apache on my personal computers because of its phenomenal speed and reduced memory usage. It&#8217;s surprisingly easy to get Lighttpd and PHP running on Ubuntu. For an extensive guide, including how to enable MySQL, <a href="http://www.ubuntugeek.com/lighttpd-webserver-setup-with-php5-and-mysql-support.html">Ubuntu Geek</a> is the place to be.</p>
<p>This entry only deals with the basics of getting Lighttpd up and running with PHP. To get started, use:</p>
<pre><code>sudo apt-get install lighttpd php5-cgi</code></pre>
<p>Then run <code>lighty-enable-mod</code> and enter <code>fastcgi</code>.</p>
<p>Then you can edit /etc/lighttpd/lighttpd.conf. Stick the following at the end:</p>
<pre><code>fastcgi.server = ( “.php” => ((
“bin-path” => “/usr/bin/php5-cgi”,
“socket” => “/tmp/php.socket”
)))</code></pre>
<p>Recommended: <code>sudo apt-get install php5-curl php5-tidy </code> to be able to run <a href="http://bitbucket.org/frenzie/tubes/">Tubes</a> with all functionality, and of course any other modules you might like. There&#8217;s nothing to it; you don&#8217;t even have to edit php.ini.</p>
<p>When you&#8217;re done customizing things to your liking, use <code>sudo /etc/init.d/lighttpd restart</code> to see the changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/03/12/lighttpd-and-php-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Way Alternative Text Should Be Rendered</title>
		<link>http://fransdejonge.com/2010/03/05/the-way-alternative-text-should-be-rendered/</link>
		<comments>http://fransdejonge.com/2010/03/05/the-way-alternative-text-should-be-rendered/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:12:40 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Browsers]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1611</guid>
		<description><![CDATA[Webkit doesn't even display alternative text. What a crock.]]></description>
			<content:encoded><![CDATA[<p>Vlad Alexander describes how <a href="http://rebuildingtheweb.com/en/how-should-browsers-render-alt-text/">browsers mess up horribly</a> on alternative text. I noticed the deficiencies in Opera and Firefox before, but what Webkit does is simply ridiculous. I don&#8217;t entirely agree with him since I don&#8217;t think that the alternative content should display without any indication that it&#8217;s alternative text whatsoever. I consider Opera&#8217;s behavior best in this regard (as opposed to the obtrusive icons most other browsers throw in there), except for the part where it applies width and height meant for images to the text thus cutting them off.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/03/05/the-way-alternative-text-should-be-rendered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Opera 10.50</title>
		<link>http://fransdejonge.com/2010/03/03/opera-10-50/</link>
		<comments>http://fransdejonge.com/2010/03/03/opera-10-50/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 12:30:01 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/2010/03/03/opera-10-50/</guid>
		<description><![CDATA[For those of you who read my blog, use Opera and don&#8217;t follow the latest releases, Opera 10.50 for Windows was released yesterday. Download it now!]]></description>
			<content:encoded><![CDATA[<p>For those of you who read my blog, use Opera and don&#8217;t follow the latest releases, Opera 10.50 for Windows was released yesterday. <a href="http://opera.com">Download</a> it now!</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/03/03/opera-10-50/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SimplePie-based Feed Mashup</title>
		<link>http://fransdejonge.com/2010/02/14/simplepie-based-feed-mashup/</link>
		<comments>http://fransdejonge.com/2010/02/14/simplepie-based-feed-mashup/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 15:44:03 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1583</guid>
		<description><![CDATA[I wrote a basic feed mashup tool in PHP. Get it here.]]></description>
			<content:encoded><![CDATA[<p class="update">This tool is now named <strong>Tubes</strong> and is <a href="http://bitbucket.org/frenzie/tubes/">hosted on Bitbucket</a>.</p>
<p>As I wrote a few months ago, <a href="http://frans.lowter.us/2009/12/04/fun-with-yahoo-pipes-and-podcasts/">Yahoo Pipes is a nice tool</a>. Nonetheless, it has a few shortcomings which annoyed me because I could neither fix nor work around them. Therefore, I decided to write my own mashup tool. For the impatient, you can <a href="http://frans.lowter.us/wp-content/uploads/2010/02/opera-feeds.zip">download the file right now</a> before reading anything else.</p>
<p>Since SimplePie seems to be the feed aggregation library of choice for many projects, I decided to go with it. I ran into a few minor issues, but nothing I couldn&#8217;t handle easily. The code I wrote is based on the multifeeds.php demo file and SimplePie 1.1.3, because in 1.2 it didn&#8217;t work (the multifeeds demo, that is — by extension I suppose this file won&#8217;t either). It&#8217;s a little rough around the edges, and SimplePie is clearly meant for HTML output rather than XML (although its HTML isn&#8217;t quite decent either, even if the input feed is), so I decided to fix the whole thing up with Tidy, which takes care of low quality input material as well. Hopefully that makes this whole thing more robust than it would otherwise be. The code is based around bringing various Opera feeds I read together in one big feed, but this can very easily be changed.</p>
<p>So now that I&#8217;ve got the basics of output into a feed taken care of, I can easily duplicate other functionality of Yahoo Pipes if I want. Much better.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/02/14/simplepie-based-feed-mashup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>30 Days to Becoming an Opera Lover</title>
		<link>http://fransdejonge.com/2010/01/25/30-days-to-becoming-an-opera-lover/</link>
		<comments>http://fransdejonge.com/2010/01/25/30-days-to-becoming-an-opera-lover/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 10:24:08 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Opera]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1368</guid>
		<description><![CDATA[30 Days helped me switch to Opera, and it can still be relevant today.]]></description>
			<content:encoded><![CDATA[<p>The <cite>30 Days to Becoming an Opera 6 Lover</cite> series may very well have been what pulled me over the edge. That which made me choose Opera instead of MyIE2 (now Maxthon). It should therefore be no surprise that I still harbor warm feelings toward it. While it may be old, and the original series is no longer hosted by <a href="http://tntluoma.com/">TnT Luoma</a> as far as I can tell, I think that the series could still teach current (aspiring) users of Opera a thing or two — even the 30 Days series for Opera 6. Due to the large part the Opera 6 series played in my personal discovery of Opera, however, my judgment may be somewhat impaired.</p>
<p>I dug into the Internet Archive and I was pleasantly surprised to discover that the <a href="http://web.archive.org/web/20060709213715/http://www.tntluoma.com/opera/lover/6/download/operalover-HTML-2002-11-29.zip">30 Days series for Opera 6</a> is available through the archive in a nice ZIP file. The <a href="http://web.archive.org/web/20060709213715/www.tntluoma.com/opera/lover/6/">original Opera 6 lover pages</a> do not seem to have been preserved, but the ZIP file is easier to use regardless.</p>
<p>The <a href="http://web.archive.org/web/20080518143933rn_1/operalover.tntluoma.com/day_1_general_preferences">30 Days series for Opera 8</a> was also preserved. <small class="sidenote">The Opera 8 series is still available in the <a href="http://tntluoma.com/category/30days/">archives of TnT Luoma</a>, but the pictures and some other things are broken. Besides, I like the old layout better; it used to be <a href="http://web.archive.org/web/20051225094143/operalover.tntluoma.com/day_1_general_preferences">blue</a>, however, which was even better — you probably don&#8217;t want to read the oldest text available, though.</small> While I would not recommend a detailed read (it is quite outdated after all), I would certainly recommend skimming through most of it.</p>
<p>By the time Opera 8 came out — and consequently, the <cite>30 Days to Becoming an Opera 8 Lover</cite> series — I was already a seasoned Opera user, so the series didn&#8217;t do much for me. I did discover one very important Opera feature thanks to it, however. In the default keyboard setup, <kbd>Shift</kbd> + <kbd>F2</kbd> is bound to <code>go to nickname</code>. If you don&#8217;t know what nicknames are, you can give bookmarks so-called nicknames; if you type them out in the address bar and press enter it will take you to the bookmark, and it will offer autocomplete suggestions while you&#8217;re typing. Useful, but not a huge time saver.</p>
<p><code>Go to nickname</code> is better, because it starts going to the nickname as soon as it&#8217;s got a match. So if you have only one bookmark with a nickname that starts with a, you&#8217;ll only have to type <kbd>a</kbd> and you&#8217;ll be on your way. I had not realized this prior to reading the Opera 8 Lover series, and it wasn&#8217;t actually written in the series, but without it I might very well never have tried this feature again. After some consideration and major inspiration by Moose I rebound <kbd>F2</kbd> to <code>new page &#038; go to nickname</code>, which means that ever since, pressing <kbd>F2</kbd> automatically opened a new page and this tremendously useful dialog. The introduction of speed dial didn&#8217;t do much for me thanks to this keyboard shortcut. It might take a few seconds more to configure, but it&#8217;s worth it. Additionally, new tabs will open even faster if you disable speed dial.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/01/25/30-days-to-becoming-an-opera-lover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Teaching WordPress Some Manners: Enabling Day/Month/Year Archives</title>
		<link>http://fransdejonge.com/2010/01/22/teaching-wordpress-some-manners-enabling-daymonthyear-archives/</link>
		<comments>http://fransdejonge.com/2010/01/22/teaching-wordpress-some-manners-enabling-daymonthyear-archives/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 13:50:23 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1415</guid>
		<description><![CDATA[Wordpress can't cope with day/month/year permalinks by default.]]></description>
			<content:encoded><![CDATA[<p>WordPress can&#8217;t cope with day/month/year (<code>/%day%/%monthnum%/%year%/</code>) permalinks properly by default. I had no idea because I&#8217;ve always used year/month[/day]. It&#8217;s fine for the posts, but in the archives /date/month/year fails. Luckily WP (WordPress) supports plugins in a clever manner, and it has a great API (application programming interface).</p>
<p>Initially I tried the WP API:</p>
<pre><code>add_rewrite_rule('date/(\d{1,2})/(\d{4})', 'index.php?m=$matches[2]$matches[1]', 'top');</code></pre>
<p>This kept giving me an error which I couldn&#8217;t (be bothered to) debug since it went several functions deep into the WP core, so I gave up on the API and circumvented it with the help of <a href="http://dd32.id.au/files/wordpress/test-rewrite.php">something I found</a>.</p>
<p>Anyhow, here&#8217;s the plugin. Save in a file named rewrite-day-month-year.php or just name it whatever you like.</p>
<pre><code>&lt;?php
/*
Plugin Name: Rewrite Rules for Day/Month/Year
Plugin URI: http://frans.lowter.us/2010/01/22/teaching-wordpress-some-manners-enabling-daymonthyear-archives
Description: WordPress can't cope with /%day%/%monthnum%/%year%/ for some reason. That is to day, it fails when you try to go for an archive in the form of /date/month/year/ This teaches it some manners. Probably/hopefully shouldn't interfere with other structures, but why you'd activate it if you don't need it I wouldn't know.
Version: 1.0
License: GPL
Author: Frans
Author URI: http://frans.lowter.us

Based on http://dd32.id.au/files/wordpress/test-rewrite.php
*/

function test_add_rewrite_rules( $wp_rewrite ) {
	$new_rules = array(
		"date/(\d{2})/(\d{4})" => 'index.php?m=' . $wp_rewrite->preg_index(2) . $wp_rewrite->preg_index(1),
		"date/(\d{4})" => 'index.php?year=' . $wp_rewrite->preg_index(1)
	);
	$wp_rewrite->rules = $new_rules + $wp_rewrite->rules; //NOTE: You must add it to the start of the array, Else WP's greedy rules at the end of the array will eat the request
}

register_activation_hook( __FILE__, 'flush_rules_initiate' );
register_deactivation_hook( __FILE__, 'test_flush_rules' );
// add_action('init','test_flush_rules'); // for testing

function flush_rules_initiate() {
	// Add the permalink override stuff
	add_action('generate_rewrite_rules', 'test_add_rewrite_rules');
	test_flush_rules();
}

function test_flush_rules(){
	//Flush the rewrite rules so that the new rules from this plugin get added,
	//This should only be done when the rewrite rules are changing, Ie. When this plugin is activated(Or Deactivated), For simplicity while developing using WP Rewrite, I flush the rules on every page load
	global $wp_rewrite;
	$wp_rewrite->flush_rules();
}
?></code></pre>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/01/22/teaching-wordpress-some-manners-enabling-daymonthyear-archives/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unobtrusive Input Value Modifier</title>
		<link>http://fransdejonge.com/2010/01/17/unobtrusive-input-value-modifier/</link>
		<comments>http://fransdejonge.com/2010/01/17/unobtrusive-input-value-modifier/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 17:46:38 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1432</guid>
		<description><![CDATA[Inputs that say "search here" are generally messed up. Here's how to do it properly.]]></description>
			<content:encoded><![CDATA[<p>Inputs that say things like &#8220;search here&#8221; are generally messed up. In this post I will first explain why and then I will show you how to do it properly.</p>
<p>The WordPress theme I&#8217;m modifying for my wife had the following HTML in it:</p>
<pre><code>&lt;input type="text" value="Search this site" onfocus="if (this.value == 'Search this site') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search this site...';}" name="s" id="searchbox" /></code></pre>
<p>There are three main problems with this.</p>
<ol>
<li>It prefills the search box with &#8220;Search this site.&#8221; This is incredibly annoying and obnoxious behavior for people with Javascript disabled. <em>If</em> you must add such text, add it through Javascript.</li>
<li>The values don&#8217;t even match up, so if you focus on the <code>INPUT</code>, deselect it and select it again the text stays there. Even for users with Javascript enabled. Errors of this type could easily be avoided if the text value were stored in a variable.</li>
<li>Which brings me to the third problem. The script should be external so it can be cached. That would save bandwidth for both you and your visitors and if there are people with Javascript disabled, they won&#8217;t even have to load the <del datetime="2010-01-17T17:23:45+00:00">junk</del><ins datetime="2010-01-17T17:23:45+00:00">script</ins> once.</li>
</ol>
<p>Because just about every such box I have ever encountered is complete and utter crap (this is actually one of the better ones), I decided to reproduce its functionality in an unobtrusive manner, eliminating all of the mistakes I outlined above.</p>
<p>The HTML is now reduced to this:</p>
<pre><code>&lt;input name="s" id="searchbox"/&gt;</code></pre>
<p>You could remove the trailing slash if you&#8217;re writing HTML, or put a space in between if that&#8217;s the way you write XHTML, but that&#8217;s of no consequence otherwise. The <code>type="text"</code> is not essential because it&#8217;s the default, but it shouldn&#8217;t hurt to leave it in. Also see Anne van Kesteren&#8217;s <a href="http://annevankesteren.nl/2010/01/optimizing-html">Optimizing Optimizing HTML</a> for some tips on going somewhat over the top with minimalism.</p>
<p>The Javascript that changes the text to &#8220;Search this site&#8230;&#8221; is now in an external file:</p>
<pre><code>(function() {
	function searchbox_text_change() {
		var s = document.getElementById('searchbox');
		var s_text = 'Search this site...'
		if (s.value == '') s.value = s_text;
		else if (s.value == s_text) s.value = '';
	}
	document.addEventListener('DOMContentLoaded',
	function(){
		var s = document.getElementById('searchbox');
		searchbox_text_change();
		s.addEventListener('focus', searchbox_text_change, false);
		s.addEventListener('blur', searchbox_text_change, false);
	},
	false);
})();</code></pre>
<p>All of this took me about five minutes. There&#8217;s a tiny bit of redundancy going on, but I can&#8217;t be bothered to fix that. It&#8217;s superior to just about any stupid such script I ever encountered and likely to most of the same type that I will encounter in the future. Use this script as much as you please. You don&#8217;t even have to link back to me, since I just want those bloody things to work in a way that doesn&#8217;t make me cringe.</p>
<p>The same kind of principle applies to autofocus junk. Never ever do any such thing if I started typing something. I&#8217;d rather you never did it at all, but if you really feel that you <em>must</em> do it for some masochistic reason, at the very least check if the value is still empty with <code>if (s.value=='')</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/01/17/unobtrusive-input-value-modifier/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taking Sidenotes to 2010</title>
		<link>http://fransdejonge.com/2010/01/14/taking-sidenotes-to-2010/</link>
		<comments>http://fransdejonge.com/2010/01/14/taking-sidenotes-to-2010/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 16:06:33 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=1266</guid>
		<description><![CDATA[An overview of the improvements made to my sidenotes over the years.]]></description>
			<content:encoded><![CDATA[<p>Five years ago there were lots of posts dealing with people&#8217;s visions of the least-bad method to include sidenotes — or footnotes — to HTML, and like any self-respecting HTML-geek I created <a href='http://frans.lowter.us/wp-content/uploads/2010/01/sidenotes.html'>my own take on the matter</a>. As might be expected from five year old writings it is now outdated, and I&#8217;m glad it is. It means the cruft can be retired, and media queries can be used to their full glory — except in IE8, that is.</p>
<p>The script I wrote to supply non-Opera browsers with faux-media-query functionality assumes that any browser not Opera should have the script applied to it, because at the time Opera 7+ was the only browser that supported media queries. I knew this wasn&#8217;t exactly the proper way to write scripts, but it was meant to be updated to use some more intelligent detection at some point. As such things go, however, it never was. In my defense, the worst the script did was duplicate some functionality that was already provided by media queries, so I rather doubt anybody noticed any adverse effects. Heck, they might have noticed positive effects, since as I wrote at the time, &#8220;For now, it might even be the best solution to apply the Javascript to Opera as well, because Opera does not reapply media queries on resize yet (and it does fire the <code>onresize</code> event as every browser does).&#8221; For good measure I&#8217;m also including <a href='http://frans.lowter.us/wp-content/uploads/2010/01/sidenotes-2006.js'>the script as I used it on my website since 2006</a>. It has this nifty little added feature that it doesn&#8217;t actually do anything if there are no sidenotes present, which is something media queries cannot do. I think I considered writing a more intelligent check based on style features that would be set by the media query back in early &#8217;06, but I can&#8217;t recall why I never did. For those interested in hacking the old script, the way I set it up it should be possible to determine whether media queries are supported very easily by combining a test for at least medium width with the <code>marginRight</code> style property on the sidenotes. If set, media queries are working; if not, go ahead and do some scripting magic.</p>
<p>Now, on to the updated sidenotes. I abandoned absolute positioning in favor of going completely for float. I believe I wanted to do this originally, but there were too many float bugs in all kinds of browsers to make it viable (that means everything not Presto or KHTML). Since these appear to be fixed, there is no reason not to take full advantage of floats, which most important means using <code>clear</code> so that sidenotes will not overlap. <small class="sidenote">Previously I had to seriously consider the placement and frequency of sidenotes.</small> <small class="sidenote">Now I can just add them whenever I want.</small> I still think my original reasoning is quite valid, however, which means I don&#8217;t think sidenotes should be inserted lightly or contain overly long texts.</p>
<blockquote><p>Let&#8217;s start out. How do we markup a sidenote? Well, as HTML contains no way whatsoever to markup a foot- or sidenote, the logical choice is <code>small</code>. Why <code>small</code>? Well, it means that the content of <code>small</code> is less important. A footnote should not be a footnote at all if it&#8217;s as important, or more important than the text itself, right? Thus, the markup of the sidenote is as follows:</p>
<pre><code>&lt;small class=&quot;sidenote&quot;&gt;A sidenote&lt;/small&gt;</code></pre>
</blockquote>
<p>This is still what I use, but <code>ASIDE</code> would be more appropriate in HTML 5.</p>
<blockquote><p>The sidenote as I created it is meant to be put at the end of a sentence, inside a paragraph. Therefore it would be displayed at its original position in the text if author CSS was disabled, or read at its intended location on screenreaders. If it wouldn&#8217;t be put as a separate sentence, it would look strange if not displayed the intended way. The sidenote is placed inside the paragraph with the other text, for if it would require multiple paragraphs, should it be a sidenote?</p>
</blockquote>
<div class="sidenote">
<h3>Were Sidenotes Always Compatible With Any Element?</h3>
<p>You could always apply the <code>sidenote</code> class to any element, such as <code>P</code> or <code>DIV</code>.</p>
</div>
<p>There is one issue I didn&#8217;t take into account five years ago. For example, including two paragraphs or so of background information on a country or city in a sidenote would be an appropriate use of sidenotes since it&#8217;s not really a part of the text. My original stance (although not explicitly written) was that this should be solved with hyperlinks, but I have somewhat revised this stance. The markup would then become something like:</p>
<pre><code>&lt;div class="sidenote"&gt;
	&lt;h3&gt;Were Sidenotes Always Compatible With Any Element?&lt;/h3&gt;
	&lt;p&gt;You could always apply the &lt;code&gt;sidenote&lt;/code&gt; class to any element, such as &lt;code&gt;P&lt;/code&gt; or &lt;code&gt;DIV&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;</code></pre>
<p>Or in HTML 5:</p>
<pre><code>&lt;aside&gt;
	&lt;h3&gt;Were Sidenotes Always Compatible With Any Element?&lt;/h3&gt;
	&lt;p&gt;You could always apply the &lt;code&gt;sidenote&lt;/code&gt; class to any element, such as &lt;code&gt;P&lt;/code&gt; or &lt;code&gt;DIV&lt;/code&gt;.&lt;/p&gt;
&lt;/aside&gt;</code></pre>
<p>The main sidenote CSS is still very similar to what it was in 2005.</p>
<pre><code>.sidenote {
	background: #efd;
	display: block;
	float: right;
	clear: right;
	width: 200px;
	border: 1px solid #eee;
	border-right: 0;
	margin: 2px;
	margin-right: -20px;
	padding: 3px;
	text-indent: 0;
	cursor: help;
}
.sidenote:before { content: '\2190' ' '; }
.sidenote:hover {
	background: #ff0;
}
/* enable usage of code in sidenotes without the layout breaking  */
.sidenote code {
	white-space: normal;
}</code></pre>
<p>There are a few minor differences, but other than the addition of the <code>.sidenote code</code> line nothing worth mentioning. Only a few weeks ago I noticed that adding a line of code to a sidenote somewhat broke my layout because it stretched beyond the viewport. A few more global ways to accomplish normal white space in sidenotes come to mind (such as <code>!important</code> in the main class or <code>.sidenote *</code>), but from what I understand using such methods increases parsing time, if only ever so slightly.</p>
<p>The media queries performing the sidenote magic were significantly slimmed down, and a low-resolution in-line display was added:</p>
<pre><code>@media all and (max-width: 350px) {
	.sidenote {
		display: inline;
		float: none;
		border: 0;
		margin: 0;
	}
	.sidenote:before {content:"";}
}
@media all and (min-width: 750px) {
	#wrapper{margin-right:207px}
	.sidenote {
		border-right:1px;
		margin: 0;
		margin-right:-228px;
	}
}
@media all and (min-width: 980px) {
	#wrapper{margin-right:auto}
}</code></pre>
<p><small class="sidenote"><code>#wrapper</code> is just in there to keep IE from embarrassing itself; if I were creating my blog&#8217;s design today I&#8217;d just go with <code>body</code>.</small> Switching completely to float makes it possible to keep the overrides to a minimum, but that&#8217;s not the important change here. I switched to simple media queries for two reasons.</p>
<ol>
<li>It&#8217;s much easier to maintain and change. No more duplication.</li>
<li>I don&#8217;t think most <a href="http://www.w3.org/TR/CSS21/media.html#media-types">media types</a> are as relevant anymore as I did back then. Specifically, in regard to such things as handheld devices what I want to do is offer different layouts based on screen size, not on whether they consider themselves to be <code>handheld</code>, <code>screen</code>, or some other fancy media type. Safari on the iPhone considers itself a big browser, for instance, but should it really get the &#8220;big&#8221; layout? None of this is especially relevant for my sidenotes, but it does reflect my opinion on it. Additionally, specifically overriding for certain media types rather than being specifically inclusive makes sure that no one is left out. In other words, this is future-safe. If the media type <code>magazine</code> ever emerges (they already did a magazine with an eInk cover, didn&#8217;t they?), my media query is ready for it now. And for those who care about such things, it also avoids an IE bug or two.</li>
</ol>
<p>That&#8217;s it. My sidenotes are ready for the nearby future. They&#8217;re <em>so</em> 2010. Feel free to use or expand on my ideas, but please add a link back to me somewhere if you do.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2010/01/14/taking-sidenotes-to-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Browser Size: Works Best on Annoying Pages</title>
		<link>http://fransdejonge.com/2009/12/26/google-browser-size-works-best-on-annoying-pages/</link>
		<comments>http://fransdejonge.com/2009/12/26/google-browser-size-works-best-on-annoying-pages/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 10:40:32 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=967</guid>
		<description><![CDATA[Browser Size is a utility by Google Labs which overlays a semi-transparent image with percentages indicating what part of the website people can see without scrolling. I don&#8217;t know how long it has been around, but I found out about it, played a couple of minutes with it, and read the about page a couple [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://browsersize.googlelabs.com/" rel="nofollow">Browser Size</a> is a utility by Google Labs which overlays a semi-transparent image with percentages indicating what part of the website people can see without scrolling. I don&#8217;t know how long it has been around, but I found out about it, played a couple of minutes with it, and read the about page a couple of days ago. I mentally stumbled when I read the following.</p>
<blockquote cite="http://browsersize.googlelabs.com/static/about-browser-size.html"><p>Browser Size works best on <em>web pages with a <strong>fixed layout</strong> aligned to the left</em> (emphasis added). If the content reflows as the width is adjusted or it is centered, then the results can be misleading. In this case, you can obtain more accurate results by reducing the browser width to a percentage column, e.g. 90% and seeing what content falls below the 90% horizontal line.</p>
</blockquote>
<p>I realize it would be hard to implement it any other way, and I would certainly hope that most people understand you have to play around with the size of your window to use the tool in a meaningful way without having read the preceding message — those that don&#8217;t probably won&#8217;t read the message either. It seems to me that this should certainly be the preferred way to use the tool — how it works <em>best</em>. Don&#8217;t encourage those who produce such annoying designs by saying their methods work best. What they hopefully <em>meant</em> to say is that it works best to expose web pages with a fixed layout for the excrements they are.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2009/12/26/google-browser-size-works-best-on-annoying-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Show or Hide Deleted Text Button</title>
		<link>http://fransdejonge.com/2009/12/14/add-show-or-hide-deleted-text-button/</link>
		<comments>http://fransdejonge.com/2009/12/14/add-show-or-hide-deleted-text-button/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 12:12:41 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=835</guid>
		<description><![CDATA[A little tutorial based on a simple script I wrote to enhance my weblog.]]></description>
			<content:encoded><![CDATA[<p>For an upcoming post, I used the <code>DEL</code> element quite extensively. I figured that, while potentially interesting, it would help readability to be able to temporarily remove them from display, so I wrote this little script. Incidentally, it was the first time in about three years—meaning the first time since I finished the layout and scripts when I started this blog—that I added any new scripts, or even edited the file containing them. While I am probably far from the most suitable person for this job, I decided to write a little tutorial, explaining what I used and why I used it.</p>
<p>I&#8217;ll start by dropping a major bomb. Here is the script.</p>
<pre><code>// Checks if there is deleted text in post entries. Adds a Show or hide deleted text button if there is.
// Copyright © Frans de jonge 2009. Licensed under a Creative Commons Atrribution 2.0 license.
function AddShowHideDeletedTextButton() {
	var postEntries = document.getElementsByClassName('postentry');
	var postEntry = postEntries[0];
	if ( postEntries.length == 1 &#038;&#038; postEntry.getElementsByTagName('del').length > 0 ) {
		var hideText = 'Hide deleted text', showText = 'Show deleted text';
		var button = document.createElement('input');
		button.setAttribute('type', 'button');
		button.setAttribute('value', hideText);
		button.addEventListener('click',
		function () {
			var e = postEntry.getElementsByTagName('del');
			for ( var i = 0; i&lt;e.length; i++ ) {
				if (e[i].style.display == 'none') {
					e[i].style.display = 'inline';
					this.setAttribute('value', hideText);
				}
				else {
					e[i].style.display = 'none';
					this.setAttribute('value', showText);
				}
			}
		}
		,false);
		postEntry.insertBefore(button,postEntry.firstChild);
	}
}</code></pre>
<p>I&#8217;m going to assume that you have at least a basic understanding of functions and variables, but may not be completely aware of DOM methods and how to use them. A very valuable resource is the <a href="https://developer.mozilla.org/en/The_DOM_and_JavaScript">Mozilla Developer Center</a>, or MDC. It provides information on much more than just JavaScript and the DOM, but while I find the CSS and even HTML specifications fairly easy to get around in, the DOM specifications, with their language neutral, very extensive descriptions are quite hard in comparison. They are exactly the way they ought to be, but this makes it somewhat hard to find relevant information about actual usage and how to use it. That&#8217;s where the MDC comes in. It typically comes with a clear, concise summary at the top of the page, and if you don&#8217;t understand that, it usually comes with more extensive code samples as well.</p>
<pre><code>	var postEntries = document.getElementsByClassName('postentry');
	var postEntry = postEntries[0];
	if ( postEntries.length == 1 &#038;&#038; postEntry.getElementsByTagName('del').length > 0 ) {</code></pre>
<p>DOM methods used:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/DOM/document.getElementsByClassName">document.getElementsByClassName(className)</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/element.getElementsByTagName">element.getElementsByTagName(tagName)</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/element.length">nodeList.length</a></li>
</ul>
<p>In my blog, I have marked up all of the contents of my posts with a <code>DIV</code> element, with, as you might have guessed, a class <code>postentry</code>. This particular bit of code is meant to make sure that we are on the individual page of the post (i.e. not in some kind of overview) and that there are actually deleted elements around. Adding a button on an overview page would result in all kinds of problems—if you add only one it may not be anywhere near where it is needed, so you&#8217;d have to add multiple buttons, check if the post where it will be added has deleted elements, etc.—which are easy to avoid by keeping it restricted to one post.</p>
<pre><code>		var button = document.createElement('input');
		button.setAttribute('type', 'button');
		button.setAttribute('value', hideText);</code></pre>
<p>DOM methods used:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/DOM/document.createElement">document.createElement</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/element.setAttribute">element.setAttribute(attribute, value)</a></li>
</ul>
<p>Here we see the proper way to create an element through the DOM. First we create an element, in this case input, and then we set a few attributes to the values we want. Note that I defined <code>hideText</code> earlier, with the value <q>Hide deleted text</q>.</p>
<pre><code>		button.addEventListener('click',
		function () {
			var e = postEntry.getElementsByTagName('del');
			for ( var i = 0; i&lt;e.length; i++ ) {
				if (e[i].style.display == 'none') {
					e[i].style.display = 'inline';
					this.setAttribute('value', hideText);
				}
				else {
					e[i].style.display = 'none';
					this.setAttribute('value', showText);
				}
			}</code></pre>
<p>DOM methods used:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/DOM/element.addEventListener">element.addEventListener</a></li>
<li><a href="https://developer.mozilla.org/en/DOM/element.style">element.style</a></li>
</ul>
<p>Here we definitely have one of the more interesting parts of the code. Had I written this script about 8 years ago, I would have used something like <code>var button = '&lt;input type="button" value='+hideText+'>'</code> and consequently added an eventListener like <code>button.onclick = someFunction;</code>, where <code>someFunction</code> would be separately defined. I am using the proper DOM method instead. This may cause problems in IE, for which there are <a href="http://ejohn.org/blog/flexible-javascript-events">fixes available</a>, but since this blog is strictly personal I decided not to care about that. Notice how I did not define the function separately, but included it as an anonymous function. Since the function is not intended to be used anywhere else, it&#8217;s easier, and, ideally, it will be completely removed from memory if the button were to be removed.</p>
<p>The <code>element.style</code> property allows you to access and change style properties on an element. As the MDC says, <q>It is generally better to use the <code>style</code> property than to use <code>elt.setAttribute('style', '...')</code>, since use of the <code>style</code> property will not overwrite other CSS properties that may be specified in the <code>style</code> attribute.</q> I may not be defining any other styles on <code>DEL</code> elements yet, but this way the script won&#8217;t break my site if I do add some more style to it in the future, or if someone else wishes to adapt it for use on their own page.</p>
<pre><code>		postEntry.insertBefore(button,postEntry.firstChild);</code></pre>
<p>DOM methods used:</p>
<ul>
<li><a href="https://developer.mozilla.org/En/DOM/Node.insertBefore">parentElement.insertBefore(newElement, referenceElement)</a></li>
<li><a href="https://developer.mozilla.org/En/DOM/Node.firstChild">node.firstChild</a></li>
</ul>
<p>To finish it off, we&#8217;ve got the <code>insertBefore</code> construct. It inserts a node as a child of the node to which it is applied, before a specified other child of this parent node. When I first came across it a few years ago, I thought it was somewhat confusing at first. It should be noted that <em>node</em> means much more than <em>element</em>, but in these specific examples it shouldn&#8217;t matter, so I didn&#8217;t go into it. If you wish to learn more, I recommend you try the MDC or a search engine.</p>
<p>In conclusion, I hope this helped someone out there a bit. I thought it was interesting to reminisce about how I would have written this script if it were 2003.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2009/12/14/add-show-or-hide-deleted-text-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPA Fonts on the Web</title>
		<link>http://fransdejonge.com/2009/12/12/ipa-fonts-on-the-web/</link>
		<comments>http://fransdejonge.com/2009/12/12/ipa-fonts-on-the-web/#comments</comments>
		<pubDate>Sat, 12 Dec 2009 11:07:01 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=545</guid>
		<description><![CDATA[Nowadays, the most obvious way to blend all kinds of UTF-8 characters in nicely with all the other text on your page might be <a href="http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/">Webfonts</a>, but I think there are definitely valid reasons not to utilize those to achieve consistent display of IPA characters on a page. This post will focus on a very simple method which ensures that IPA will look decent across a variety of operating systems and browsers.]]></description>
			<content:encoded><![CDATA[<p>Nowadays, the most obvious way to blend all kinds of UTF-8 characters in nicely with all the other text on your page might be <a href="http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/">Webfonts</a>, but I think there are definitely valid reasons not to utilize those to achieve consistent display of IPA characters on a page. This post will focus on a very simple method which ensures that IPA will look decent across a variety of operating systems and browsers. The issue is nothing but aesthetics; however, the importance should not be underestimated as the following screenshot will demonstrate.</p>
<p><a href="http://frans.lowter.us/wp-content/uploads/2009/12/ipa-font-test.png"><img src="http://frans.lowter.us/wp-content/uploads/2009/12/ipa-font-test.png" alt="ipa-font-test" title="ipa-font-test" width="585" height="73" class="alignnone size-full wp-image-575" /></a><br />
You can <a href='http://frans.lowter.us/wp-content/uploads/2009/12/ipa-font-test.html'>try the results of this yourself</a>, but what it will look like depends on the fonts you have installed.</p>
<p>What I used to achieve the cohesive look of the IPA characters is this simple line of CSS.</p>
<pre><code>.IPA{ font-family: "DejaVu Sans", "Lucida Grande", "Lucida Sans Unicode" }</code></pre>
<p>It&#8217;s an easy concept. Slap <code>class="IPA"</code> on some element—I used <code>SPAN</code>—and it will automatically display in one of these fonts, ensuring that no characters look out of place. <cite>DejaVu Sans</cite> is a font I like a lot; It comes pre-installed on most Linux installations, and is <a href="http://dejavu-fonts.org/">freely available</a> for everybody else. <cite>Lucida Grande</cite> is a font with the sufficient characters that comes with Mac OS X, and <cite>Lucida Sans Unicode</cite> is a font that, as the name implies, is very similar to <cite>Lucida Grande</cite>. It is available in Windows 98 and up.</p>
<h3>References</h3>
<p>&#8220;DejaVu Sans.&#8221; <em>Wikipedia: The Free Encyclopedia</em>. 12 Dec 2009 &lt;<a href="http://en.wikipedia.org/w/index.php?title=DejaVu_fonts&#038;oldid=329693253">http://en.wikipedia.org/w/index.php?title=DejaVu_fonts&#038;oldid=329693253</a>&gt;.<br />
&#8220;Lucida Grande.&#8221; <em>Wikipedia: The Free Encyclopedia</em>. 12 Dec 2009 &lt;<a href="http://en.wikipedia.org/w/index.php?title=Lucida_Grande&#038;oldid=314108882">http://en.wikipedia.org/w/index.php?title=Lucida_Grande&#038;oldid=314108882</a>&gt;.<br />
&#8220;Lucida Sans Unicode.&#8221; <em>Wikipedia: The Free Encyclopedia</em>. 12 Dec 2009 &lt;<a href="http://en.wikipedia.org/w/index.php?title=Lucida_Sans_Unicode&#038;oldid=324714228">http://en.wikipedia.org/w/index.php?title=Lucida_Sans_Unicode&#038;oldid=324714228</a>&gt;.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2009/12/12/ipa-fonts-on-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun With Yahoo Pipes and Podcasts</title>
		<link>http://fransdejonge.com/2009/12/04/fun-with-yahoo-pipes-and-podcasts/</link>
		<comments>http://fransdejonge.com/2009/12/04/fun-with-yahoo-pipes-and-podcasts/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 23:15:27 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Sites]]></category>
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=409</guid>
		<description><![CDATA[Some thoughts on podcasts and how to make aggregated news podcasts more usable.]]></description>
			<content:encoded><![CDATA[<p>I never really got into the whole podcast fad years ago. The available aggregators annoyed me, the available podcasts seemed generally uninteresting, and I didn&#8217;t have an MP3 player. Things change: I&#8217;ve had an MP3 player for a couple of years now. However, I only reevaluated my dislike for podcasts quite recently, when I discovered Wil Wheaton&#8217;s <a href="http://memoriesofthefuturecast.com/">Memories of the Futurecast</a>. I wanted a way to automate the process of getting it onto my MP3 player, and I found it: gPodder seems to do everything I want without getting in my way. Now I can do a quick sync with my MP3 player in the morning and I&#8217;ll have stuff to listen to while, among other things, going to and from the university.</p>
<p>All of that was about a month ago. I&#8217;ve only got a small selection of feeds in there so far, but since I&#8217;m still catching up on literally months of old material, that&#8217;s not an issue as of now. Aside from Wil Wheaton&#8217;s, my favorite podcast right now is <a href="http://electronics.howstuffworks.com/stuff-you-should-know-podcast.htm">Stuff You Should Know</a>. But enough about that.</p>
<p>When I was younger, I usually listened to the radio news at 7 or 8 AM while eating breakfast. I have long since switched to doing some quick reading of my e-mails and feeds, but that&#8217;s not the ideal way to get a quick update on what&#8217;s currently going on. The radio news does a better job of that, but it just feels too much like a waste of time. Cue the podcast. I&#8217;ve known that Dutch public radio has had its broadcasts available as podcasts since 2005 or so. Selecting the podcast most relevant to me was easy: <a href="http://www.rnw.nl/nl/nederlands/radioprogramme/streams-podcasts">Radio Netherlands Worldwide</a>, specifically the <i lang="nl">Nieuwslijn</i> (news line) program. Of course there are competitors, such as BBC&#8217;s <a href="http://www.bbc.co.uk/podcasts/series/globalnews">Global News</a> and the German ARD <a href="http://www.tagesschau.de/infoservices/podcast/index.html">Tagesschau</a>, and I may have missed some other potentially interesting sources—which would presumably mostly mean American or Flemish—, but for now I&#8217;m sticking with this. Alas, there&#8217;s one small problem: there&#8217;s a news broadcast just about each two hours. This makes the new episodes available dialog look rather cluttered. I only want to listen to the news once a day.</p>
<div id="attachment_413" class="wp-caption alignnone" style="width: 410px"><a href="http://frans.lowter.us/wp-content/uploads/2009/12/Screenshot-New-episodes-available.png"><img src="http://frans.lowter.us/wp-content/uploads/2009/12/Screenshot-New-episodes-available-400x271.png" alt="New episodes available in gPodder" title="Screenshot-New episodes available" width="400" height="271" class="size-medium wp-image-413" /></a><p class="wp-caption-text">New episodes available in gPodder</p></div>
<p>That&#8217;s where <a href="http://pipes.yahoo.com/pipes/">Yahoo Pipes</a> comes in. When I start it, it complains about Opera, but I haven&#8217;t been able to discern any difference in functionality between Opera and Firefox on the site. In only a couple of minutes, I have something that only gives me the 8 o&#8217;clock news.</p>
<p><a href="http://frans.lowter.us/wp-content/uploads/2009/12/Screenshot-Yahoo-Pipes.png"><img src="http://frans.lowter.us/wp-content/uploads/2009/12/Screenshot-Yahoo-Pipes-400x357.png" alt="Screenshot-Yahoo-Pipes" title="Screenshot-Yahoo-Pipes" width="400" height="357" class="alignnone size-medium wp-image-416" /></a></p>
<p>If I wanted, I could easily add the BBC and ARD feeds and also strip them to just one item a day. What I can&#8217;t do, however, is output the de facto standard <code>&lt;itunes:image href="http://some-picture" /&gt;</code> with the feed. Nevertheless, I can manually link up a picture in gPodder so it doesn&#8217;t look strange in the feed display list.</p>
<p>For things more complicated than such simplistic mash-ups, Yahoo Pipe&#8217;s graphical programming interface quickly becomes lacking, which is strange considering that it seems to aspire to be more than just a simple mash-up tool. Nevertheless, it certainly makes life a little easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2009/12/04/fun-with-yahoo-pipes-and-podcasts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cute Kitten</title>
		<link>http://fransdejonge.com/2009/11/29/cute-kitten/</link>
		<comments>http://fransdejonge.com/2009/11/29/cute-kitten/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 18:43:36 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Movies]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=354</guid>
		<description><![CDATA[I bet everyone&#8217;s seen this by now, but who cares. I sure don&#8217;t.]]></description>
			<content:encoded><![CDATA[<p>I bet everyone&#8217;s seen this by now, but who cares. I sure don&#8217;t.</p>
<p><object data="http://www.youtube.com/v/0Bmhjf0rKe8&#038;fs=1" type="application/x-shockwave-flash" width="425" height="344"><param name="movie" value="http://www.youtube.com/v/0Bmhjf0rKe8&#038;fs=1"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/></object></p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2009/11/29/cute-kitten/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extend Opera</title>
		<link>http://fransdejonge.com/2009/11/23/extend-opera/</link>
		<comments>http://fransdejonge.com/2009/11/23/extend-opera/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 17:38:58 +0000</pubDate>
		<dc:creator>Frans</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Sites]]></category>

		<guid isPermaLink="false">http://frans.lowter.us/?p=320</guid>
		<description><![CDATA[ExtendOpera.org was launched a few days ago. It&#8217;s a user initiative, aimed at bringing those aspects of Opera customization that Opera software has somewhat abandoned together.]]></description>
			<content:encoded><![CDATA[<p><a href="http://extendopera.org">ExtendOpera.org</a> was launched a few days ago. It&#8217;s a user initiative, aimed at bringing those aspects of Opera customization that Opera software has somewhat abandoned together.</p>
]]></content:encoded>
			<wfw:commentRss>http://fransdejonge.com/2009/11/23/extend-opera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->