<?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>Software and Opinions &#187; drupal</title>
	<atom:link href="http://ianloic.com/tag/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://ianloic.com</link>
	<description>from Ian McKellar</description>
	<lastBuildDate>Thu, 19 Nov 2009 22:05:43 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Moving from Drupal to WordPress for blogging</title>
		<link>http://ianloic.com/2008/01/12/moving-from-drupal-to-wordpress-for-blogging/</link>
		<comments>http://ianloic.com/2008/01/12/moving-from-drupal-to-wordpress-for-blogging/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 00:06:03 +0000</pubDate>
		<dc:creator>Ian McKellar</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://scratch.ianloic.com/wordpress/2008/01/12/moving-from-drupal-to-wordpress-for-blogging/</guid>
		<description><![CDATA[I really like Drupal quite a lot. It&#8217;s powerful and flexible, it&#8217;s code is clear and well written and it&#8217;s extension mechanism is one of the best I&#8217;ve ever seen. All this flexibility tends to distract me from actually writing blog posts. So I&#8217;ve moved back to WordPress. If you&#8217;re reading this over RSS expect [...]]]></description>
			<content:encoded><![CDATA[<p>I really like <a href="http://www.drupal.org/">Drupal</a> quite a lot. It&#8217;s powerful and flexible, it&#8217;s code is clear and well written and it&#8217;s extension mechanism is one of the best I&#8217;ve ever seen. All this flexibility tends to distract me from actually writing blog posts. So I&#8217;ve moved back to <a href="http://www.wordpress.org/">WordPress</a>. If you&#8217;re reading this over RSS expect the usual disruption.</p>
<p>I first discovered WordPress late in 2003 from Mark Finlay, an Irish GNOME contributor. On December 24th 2003 <a href="http://www.advogato.org/person/sisob/diary/103.html">he posted</a>:</p>
<blockquote><p>Everyone go look at Wordpress: Seriouslessly sexy blogging Software, looks like it&#8217;s gonna kick MT&#8217;s ass.</p></blockquote>
<p>I did, and in the end he was right. Unfortunately <a href="http://www.advogato.org/article/741.html">he died</a> January 10th 2004. WordPress always reminds me of the three months when we lost <a href="http://www.gnome.org/start/2.6/notes/rnmemorial.html">Ettore, Chema and Mark</a>.</p>
<p>There were a few scripts around for moving Drupal posts to WordPress but they were all pretty out of date so I took one and updated it. It has a lot of commentary in it. Take a look: <a href="http://scratch.ianloic.com/wordpress/wp-content/uploads/2008/01/drupal-to-wordpress.sql" title="drupal-to-wordpress.sql">drupal-to-wordpress.sql</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ianloic.com/2008/01/12/moving-from-drupal-to-wordpress-for-blogging/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenID for the mathematically challenged</title>
		<link>http://ianloic.com/2007/05/16/openid_for_the_mathematically_challenged/</link>
		<comments>http://ianloic.com/2007/05/16/openid_for_the_mathematically_challenged/#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>Ian McKellar</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[openid]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[The other day I got the <a href="http://openid.net/">OpenID</a> bee in my bonnet and grabbed <a href="http://walkah.net/">James Walker</a>'s <a href="http://drupal.org/project/openid">module</a> and installed it on my server. Actually I grabbed it from CVS, and then discovered that the CVS version is half-ported to some new Drupal 6 form API, so I ended up using the DRUPAL-5 tag.

Anyway, I use <a href="http://www.dreamhost.com/">Dreamhost</a> which I love for many many reasons (primarilly it's really cheap and seems to work really well). Unfortunately they don't build their PHP with <a href="http://php.net/bc">BCMath</a> or even <a href="http://www.php.net/manual/en/ref.gmp.php">GMP</a>, which means my PHP can't do the <a href="http://openid.net/specs/openid-authentication-2_0-11.html#sign_algos">hard math</a> that's required for crypto. Luckily there's a mode of OpenID that doesn't require any work on the relaying party side. So I made a small change that allows James' module to work in this "dumb" mode.
]]></description>
			<content:encoded><![CDATA[<p>The other day I got the <a href="http://openid.net/">OpenID</a> bee in my bonnet and grabbed <a href="http://walkah.net/">James Walker</a>&#8217;s <a href="http://drupal.org/project/openid">module</a> and installed it on my server. Actually I grabbed it from CVS, and then discovered that the CVS version is half-ported to some new Drupal 6 form API, so I ended up using the DRUPAL-5 tag.</p>
<p>Anyway, I use <a href="http://www.dreamhost.com/">Dreamhost</a> which I love for many many reasons (primarilly it&#8217;s really cheap and seems to work really well). Unfortunately they don&#8217;t build their PHP with <a href="http://php.net/bc">BCMath</a> or even <a href="http://www.php.net/manual/en/ref.gmp.php">GMP</a>, which means my PHP can&#8217;t do the <a href="http://openid.net/specs/openid-authentication-2_0-11.html#sign_algos">hard math</a> that&#8217;s required for crypto. Luckily there&#8217;s a mode of OpenID that doesn&#8217;t require any work on the relaying party side. So I made a small change that allows James&#8217; module to work in this &#8220;dumb&#8221; mode.</p>
<pre class="prettyprint">
Index: openid.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid/openid.install,v
retrieving revision 1.2
diff -u -p -r1.2 openid.install
--- openid.install      25 Mar 2007 06:38:00 -0000      1.2
+++ openid.install      16 May 2007 22:59:56 -0000
@@ -2,24 +2,6 @@</code>

/**
- * OpenID module requires bcmath
- */
-function openid_requirements($phase) {
-  if ($phase == 'runtime') {
-    $requirements['bcmath']['title'] = t('BCMath');
-    if (function_exists('bcadd')) {
-      $requirements['bcmath']['severity'] = REQUIREMENT_OK;
-      $requirements['bcmath']['value'] = t('Enabled');
-    }
-    else {
-      $requirements['bcmath']['severity'] = REQUIREMENT_ERROR;
-      $requirements['bcmath']['description'] = t('OpenID needs the bcmath extension for encryption.');
-    }
-  }
-  return $requirements;
-}
-
-/**
* Implementation of hook_install
*/
function openid_install() {
Index: openid.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid/openid.module,v
retrieving revision 1.2
diff -u -p -r1.2 openid.module
--- openid.module       25 Mar 2007 06:38:00 -0000      1.2
+++ openid.module       16 May 2007 22:59:56 -0000
@@ -133,10 +133,14 @@ function openid_login_form_submit($formi

$idp_endpoint = $services[0]['uri'];
$_SESSION['openid_idp_endpoint'] = $idp_endpoint;
-  $assoc_handle = openid_association($claimed_id, $idp_endpoint);
-  if (empty($assoc_handle)) {
-    drupal_set_message(t('OpenID Association failed'), 'error');
-    return;
+
+  // if we have BCMath, we should use OpenID smart mode
+  if (function_exists('bcadd')) {
+      $assoc_handle = openid_association($claimed_id, $idp_endpoint);
+      if (empty($assoc_handle)) {
+        drupal_set_message(t('OpenID Association failed'), 'error');
+        return;
+      }
}
</pre>
<p>Also, I put the patch <a href="http://drupal.org/node/144334">up on Drupal.org</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ianloic.com/2007/05/16/openid_for_the_mathematically_challenged/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>State of Drupal</title>
		<link>http://ianloic.com/2007/04/30/state_of_drupal/</link>
		<comments>http://ianloic.com/2007/04/30/state_of_drupal/#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>Ian McKellar</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[I just watched Dries' <a href="http://buytaert.net/state-of-drupal-march-2007">State of Drupal</a> talk. It's an interesting insight into where he sees the project going. He discusses how Drupal has eliminated the need for the webmaster and is moving towards eliminating the need for a developer, and there's some discussion of how to eliminate the designer.]]></description>
			<content:encoded><![CDATA[<p>I just watched Dries&#8217; <a href="http://buytaert.net/state-of-drupal-march-2007">State of Drupal</a> talk. It&#8217;s an interesting insight into where he sees the project going. He discusses how Drupal has eliminated the need for the webmaster and is moving towards eliminating the need for a developer, and there&#8217;s some discussion of how to eliminate the designer.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianloic.com/2007/04/30/state_of_drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burning your Drupal feed in two easy steps</title>
		<link>http://ianloic.com/2007/03/04/burning_your_drupal_feed_in_two_easy_steps/</link>
		<comments>http://ianloic.com/2007/03/04/burning_your_drupal_feed_in_two_easy_steps/#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>Ian McKellar</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[feedburner]]></category>
		<category><![CDATA[rss]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[[flickr-photo:id=136409681,size=m] <a href="http://www.feedburner.com/">FeedBurner</a> provides all kinds of neat stats, but it didn't seem straight-forward to "burn" my blog feed since I'm using <a href="http://www.drupal.org/">Drupal</a> 5. After a little fiddling I think I've got a pretty good idea how to make it work in probably the simplest way possible. In fact, it doesn't require and Drupal configuration at all.

<ol>
<li>First I set up a <a href="http://www.feedburner.com/">FeedBurner</a> account and burned my feed. The feed Drupal produces for me is: <code>http://ianloic.com/rss.xml</code>. Now when I access http://feeds.feedburner.com/ianloic I get the contents of that feed. It's pretty simple, but so far nobody is going to see that feed.</li>
<li>Then I simply told Apache to redirect all requests for that feed, except the ones from the FeedBurner bot to my FeedBurner feed. With the slight of hand magic of <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">mod_rewrite</a> this is pretty straight forward. In the root of every Drupal install there's an <code>.htaccess</code> file containing a bunch of stuff. I just added a few lines to the <code>mod_rewrite.c</code> block of that file:<pre>
  # Rewrite rss.xml to http://feeds.feedburner.com/ianloic
  # unless FeedBurner is requesting the feed
  RewriteCond %{HTTP_HOST} ^ianloic\.com$ [NC]
  RewriteCond %{HTTP_USER_AGENT} !FeedBurner.*
  RewriteRule ^rss.xml$ http://feeds.feedburner.com/ianloic [L,R=301]</pre>
This will cause Apache to send a 301 redirect to <code>http://feeds.feedburner.com/ianloic</code> any time anyone requests <code>http://ianloic.com/rss.xml</code>, unless their HTTP User Agent begins with <code>FeedBurner</code>.</li>

Now I've got access to all the FeedBurner statistics and fun features. Since I didn't actually touch the Drupal configuration I'm pretty sure a similar approach can be taken to applying FeedBurner to any feed.</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.feedburner.com/">FeedBurner</a> provides all kinds of neat stats, but it didn&#8217;t seem straight-forward to &#8220;burn&#8221; my blog feed since I&#8217;m using <a href="http://www.drupal.org/">Drupal</a> 5. After a little fiddling I think I&#8217;ve got a pretty good idea how to make it work in probably the simplest way possible. In fact, it doesn&#8217;t require and Drupal configuration at all.</p>
<ol>
<li>First I set up a <a href="http://www.feedburner.com/">FeedBurner</a> account and burned my feed. The feed Drupal produces for me is: <code>http://ianloic.com/rss.xml</code>. Now when I access http://feeds.feedburner.com/ianloic I get the contents of that feed. It&#8217;s pretty simple, but so far nobody is going to see that feed.</li>
<li>Then I simply told Apache to redirect all requests for that feed, except the ones from the FeedBurner bot to my FeedBurner feed. With the slight of hand magic of <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">mod_rewrite</a> this is pretty straight forward. In the root of every Drupal install there&#8217;s an <code>.htaccess</code> file containing a bunch of stuff. I just added a few lines to the <code>mod_rewrite.c</code> block of that file:
<pre class="prettyprint">
  # Rewrite rss.xml to http://feeds.feedburner.com/ianloic
  # unless FeedBurner is requesting the feed
  RewriteCond %{HTTP_HOST} ^ianloic\.com$ [NC]
  RewriteCond %{HTTP_USER_AGENT} !FeedBurner.*
  RewriteRule ^rss.xml$ http://feeds.feedburner.com/ianloic [L,R=301]</pre>
<p>This will cause Apache to send a 301 redirect to <code>http://feeds.feedburner.com/ianloic</code> any time anyone requests <code>http://ianloic.com/rss.xml</code>, unless their HTTP User Agent begins with <code>FeedBurner</code>.</p>
<p>Now I&#8217;ve got access to all the FeedBurner statistics and fun features. Since I didn&#8217;t actually touch the Drupal configuration I&#8217;m pretty sure a similar approach can be taken to applying FeedBurner to any feed.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ianloic.com/2007/03/04/burning_your_drupal_feed_in_two_easy_steps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Syntax Highlighting for Drupal</title>
		<link>http://ianloic.com/2007/02/16/syntax_highlighting_for_drupal/</link>
		<comments>http://ianloic.com/2007/02/16/syntax_highlighting_for_drupal/#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>Ian McKellar</dc:creator>
				<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[[flickr-photo:id=252312738, size=m] While writing my <a href="http://ianloic.com/flickr_for_dojo">last post</a>, I felt the need to post some source code examples and I wanted them to be pretty. Looking around <a href="http://www.drupal.org"/>drupal.org</a>, I failed to find what I wanted. There were a few options, the <a href="http://drupal.org/project/codefilter">codefilter</a> module, but that only supported PHP highlighting, the <a href="http://www.filbar.org/project/geshifilter">geshifilter</a> module, but that doesn't support Drupal 5.x which I'm running, or patches against codefilter to add <a href="http://qbnz.com/highlighter/">GeSHi</a> support.

So I did what was probably the wrong thing and wrote my own. At least I didn't write it from scratch, I based it largely on codefilter, with some inspiration from the patches to codefilter that add GeSHi support.

I hacked up GeSHi a little as it wants to link keywords of most languages to reference sites. While this sounds like a good idea in theory it was linking HTML keywords off to some random site I didn't really like and didn't think was that good, so I disabled that functionality.

Using the module is pretty straightforward. You wrap your source code in tags that look like
<pre>&#60;code language="LANGUAGE"&#62;...&#60;/code&#62;</pre>
where LANGUAGE is a supported language. If there's an enter in your block then it treats it as a block otherwise it renders it inline. Also, some whitespace is trimmed, so you can force a single line to be treated as a block by putting an enter at the start or the end.

Right now it's being maintained in the same source control as I'm using for my web site, but I'll move it into <a href="http://code.ianloic.com/">Trac and Subversion</a> eventually. For the time being it's attached.]]></description>
			<content:encoded><![CDATA[<p><div class="flickr-photos"><p class="error">Unknown size: m.</p></div> While writing my <a href="http://ianloic.com/flickr_for_dojo">last post</a>, I felt the need to post some source code examples and I wanted them to be pretty. Looking around <a href="http://www.drupal.org"/>drupal.org</a>, I failed to find what I wanted. There were a few options, the <a href="http://drupal.org/project/codefilter">codefilter</a> module, but that only supported PHP highlighting, the <a href="http://www.filbar.org/project/geshifilter">geshifilter</a> module, but that doesn&#8217;t support Drupal 5.x which I&#8217;m running, or patches against codefilter to add <a href="http://qbnz.com/highlighter/">GeSHi</a> support.</p>
<p>So I did what was probably the wrong thing and wrote my own. At least I didn&#8217;t write it from scratch, I based it largely on codefilter, with some inspiration from the patches to codefilter that add GeSHi support.</p>
<p>I hacked up GeSHi a little as it wants to link keywords of most languages to reference sites. While this sounds like a good idea in theory it was linking HTML keywords off to some random site I didn&#8217;t really like and didn&#8217;t think was that good, so I disabled that functionality.</p>
<p>Using the module is pretty straightforward. You wrap your source code in tags that look like</p>
<pre>&lt;code language="LANGUAGE"&gt;...&lt;/code&gt;</pre>
<p>where LANGUAGE is a supported language. If there&#8217;s an enter in your block then it treats it as a block otherwise it renders it inline. Also, some whitespace is trimmed, so you can force a single line to be treated as a block by putting an enter at the start or the end.</p>
<p>Right now it&#8217;s being maintained in the same source control as I&#8217;m using for my web site, but I&#8217;ll move it into <a href="http://code.ianloic.com/">Trac and Subversion</a> eventually. For the time being it&#8217;s attached.</p>
]]></content:encoded>
			<wfw:commentRss>http://ianloic.com/2007/02/16/syntax_highlighting_for_drupal/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
