<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lee Kelleher's Weblog</title>
	<atom:link href="http://blog.leekelleher.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.leekelleher.com</link>
	<description>random posts on code, .NET, Umbraco and WordPress</description>
	<lastBuildDate>Sat, 09 Jan 2010 22:44:42 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='blog.leekelleher.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/efd5300436e0d5c27a06c26b7580bcdb?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Lee Kelleher's Weblog</title>
		<link>http://blog.leekelleher.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.leekelleher.com/osd.xml" title="Lee Kelleher&#8217;s Weblog" />
		<item>
		<title>Bit.ly Url Shortener DataType for Umbraco</title>
		<link>http://blog.leekelleher.com/2010/01/09/bit-ly-url-shortener-datatype-for-umbraco/</link>
		<comments>http://blog.leekelleher.com/2010/01/09/bit-ly-url-shortener-datatype-for-umbraco/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 22:43:52 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Bit.ly]]></category>
		<category><![CDATA[DataType]]></category>
		<category><![CDATA[Umbraco]]></category>
		<category><![CDATA[URL]]></category>
		<category><![CDATA[Url Shortener]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=194</guid>
		<description><![CDATA[Over the weekend, I coded up a little treat&#8230; a Bit.ly Url Shortener data-type for Umbraco!
The new data-type lets you shorten your Umbraco page URLs using the Bit.ly API service.
For more information, go to the project page over on Our Umbraco.
 Tagged: Bit.ly, DataType, Umbraco, URL, Url Shortener      <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=194&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Over the weekend, I coded up a little treat&#8230; <a href="http://our.umbraco.org/projects/bitly-url-shortener">a Bit.ly Url Shortener data-type for Umbraco</a>!</p>
<p>The new data-type lets you shorten your <a href="http://umbraco.org/">Umbraco</a> page URLs using the <a href="http://bit.ly/">Bit.ly</a> API service.</p>
<p>For more information, go to the project page over on <a href="http://our.umbraco.org/projects/bitly-url-shortener">Our Umbraco</a>.</p>
 Tagged: Bit.ly, DataType, Umbraco, URL, Url Shortener <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/194/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/194/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/194/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=194&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2010/01/09/bit-ly-url-shortener-datatype-for-umbraco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>Updated Robots.txt Editor for Umbraco</title>
		<link>http://blog.leekelleher.com/2010/01/08/updated-robots-txt-editor-for-umbraco/</link>
		<comments>http://blog.leekelleher.com/2010/01/08/updated-robots-txt-editor-for-umbraco/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 10:53:38 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Robots.txt]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=192</guid>
		<description><![CDATA[Last night I released version 2 of the Robots.txt Editor for Umbraco.
Changes &#38; new features:

Restructured the package files, they all live in a folder called &#8220;robots-txt&#8221; (still under the /umbraco folder &#8211; but self-contained)
Errors are now displayed using the Feedback control (as opposed to the Speech Bubble in the bottom-right corner).
Robots.txt editor has buttons for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=192&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Last night I released version 2 of the <a href="http://our.umbraco.org/projects/robotstxt-editor">Robots.txt Editor for Umbraco</a>.</p>
<p>Changes &amp; new features:</p>
<ul>
<li>Restructured the package files, they all live in a folder called &#8220;robots-txt&#8221; (still under the /umbraco folder &#8211; but self-contained)</li>
<li>Errors are now displayed using the Feedback control (as opposed to the Speech Bubble in the bottom-right corner).</li>
<li>Robots.txt editor has buttons for adding new User-Agent and Disallow rules, as well as comment/uncomment functionality.</li>
<li>Changed the Robot icon&#8230; courtesy of Mozilla Firefox&#8217;s &#8220;about:robots&#8221; favicon.</li>
</ul>
<p>Hope you all enjoy the update&#8230; if you come across any bugs or ideas for a future release, <a href="http://our.umbraco.org/projects/robotstxt-editor/feedback">please let me know via the our.umbraco forum</a>.</p>
 Tagged: ASP.NET, Developer, Editor, Package, Robots.txt, SEO, Umbraco <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/192/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/192/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/192/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=192&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2010/01/08/updated-robots-txt-editor-for-umbraco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>How to use umbraco.library GetMedia in XSLT</title>
		<link>http://blog.leekelleher.com/2009/11/30/how-to-use-umbraco-library-getmedia-in-xslt/</link>
		<comments>http://blog.leekelleher.com/2009/11/30/how-to-use-umbraco-library-getmedia-in-xslt/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 14:33:14 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[GetMedia]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[Umbraco]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=188</guid>
		<description><![CDATA[From time to time I notice a reoccurring post over at the Our Umbraco forum; how to display an image (from the Media section) in XSLT?
A quick answer can be found on the Our Umbraco wiki for the umbraco.library GetMedia method.
For most uses, the last example in the wiki works great.  But I want to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=188&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>From time to time I notice a reoccurring post over at the Our Umbraco forum; how to display an image (from the Media section) in XSLT?</p>
<p>A quick answer can be found on the Our Umbraco wiki for the <a href="http://our.umbraco.org/wiki/reference/umbracolibrary/getmedia">umbraco.library GetMedia</a> method.</p>
<p>For most uses, the last example in the wiki works great.  But I want to show you a &#8220;super safe&#8221; way of dealing with GetMedia in XSLT.</p>
<p>Where I find a lot of the examples go wrong is that they make the assumption that a media node (XML) is returned from the GetMedia call, e.g.</p>
<pre class="brush: xml;">&lt;xsl:value-of select=&quot;umbraco.library:GetMedia($currentPage/data[@alias='mediaId'], 'false')/data[@alias='umbracoFile']&quot; /&gt;</pre>
<p>If the &#8216;mediaId&#8217; property didn&#8217;t contain either a numeric value or a valid media node id, then it would return <strong>null</strong> &#8230; meaning that the following &#8220;<strong>/data</strong>&#8221; would throw an Exception! (Displaying &#8220;<em>Error parsing XSLT file</em>&#8221; message on the front-end.)  Not what you or your users want to see!</p>
<p>In order to consider any user inputs, like media IDs not being selected, or even a referenced media node is deleted in the back-office, here is the &#8220;super safe&#8221; approach:</p>
<pre class="brush: xml;">&lt;xsl:template match=&quot;/&quot;&gt;
	&lt;xsl:variable name=&quot;mediaId&quot; select=&quot;number($currentPage/data[@alias='mediaId'])&quot; /&gt;
	&lt;xsl:if test=&quot;$mediaId &amp;gt; 0&quot;&gt;
		&lt;xsl:variable name=&quot;mediaNode&quot; select=&quot;umbraco.library:GetMedia($mediaId, 0)&quot; /&gt;
		&lt;xsl:if test=&quot;count($mediaNode/data) &amp;gt; 0&quot;&gt;
			&lt;xsl:if test=&quot;string($mediaNode/data[@alias='umbracoFile']) != ''&quot;&gt;
				&lt;img src=&quot;{$mediaNode/data[@alias='umbracoFile']}&quot; alt=&quot;[image]&quot;&gt;
					&lt;xsl:if test=&quot;string($mediaNode/data[@alias='umbracoHeight']) != ''&quot;&gt;
						&lt;xsl:attribute name=&quot;height&quot;&gt;
							&lt;xsl:value-of select=&quot;$mediaNode/data[@alias='umbracoHeight']&quot; /&gt;
						&lt;/xsl:attribute&gt;
					&lt;/xsl:if&gt;
					&lt;xsl:if test=&quot;string($mediaNode/data[@alias='umbracoWidth']) != ''&quot;&gt;
						&lt;xsl:attribute name=&quot;width&quot;&gt;
							&lt;xsl:value-of select=&quot;$mediaNode/data[@alias='umbracoWidth']&quot; /&gt;
						&lt;/xsl:attribute&gt;
					&lt;/xsl:if&gt;
				&lt;/img&gt;
			&lt;/xsl:if&gt;
		&lt;/xsl:if&gt;
	&lt;/xsl:if&gt;
&lt;/xsl:template&gt;</pre>
<p>Here&#8217;s what happens:</p>
<ol>
<li>The &#8220;mediaId&#8221; is pulled from a property of the &#8220;currentPage&#8221; and cast as a number.  Optionally the &#8220;mediaId&#8221; could be passed in via a macro parameter, or somewhere else?</li>
<li>The first condition checks the the &#8220;mediaId&#8221; is numeric, and greater-than zero.</li>
<li>The &#8220;mediaId&#8221; is passed through to &#8220;GetMedia&#8221;, along with the <em>false</em> flag to only pull-back the required node (not it&#8217;s children, for Folder media items).</li>
<li>We check if the media node has any child &#8220;data&#8221; elements &#8211; which contain the data about the image/media.</li>
<li>Then we check if the &#8220;umbracoFile&#8221; property has any data &#8211; if not, then there is no point displaying an image.</li>
<li>There are extra conditions for the &#8220;height&#8221; and &#8220;width&#8221; properties &#8211; these are optional.</li>
</ol>
<p>Personally, I add an &#8220;altText&#8221; property to the Image media-type &#8230; and use that in the XSLT &#8211; again this is optional, but strongly recommended!</p>
<p>I can see how this &#8220;super safe&#8221; approach is overkill &#8211; especially compared with a single line of XSLT &#8230; but from my experience, it&#8217;s better to be safe than sorry &#8211; especially when dealing with user data-input &#8211; your assumptions and expectations of how users will use the system aren&#8217;t always correct!</p>
<p><strong><span style="text-decoration:underline;">Update:</span></strong> OK, I agree the extra &#8220;if&#8221; statements are overkill&#8230; so here&#8217;s a condensed version &#8211; assuming that the &#8220;umbracoHeight&#8221; and &#8220;umbracoWidth&#8221; properties are always there&#8230;</p>
<pre class="brush: xml;">&lt;xsl:template match=&quot;/&quot;&gt;
	&lt;xsl:variable name=&quot;mediaId&quot; select=&quot;number($currentPage/data[@alias='mediaId'])&quot; /&gt;
	&lt;xsl:if test=&quot;$mediaId &amp;gt; 0&quot;&gt;
		&lt;xsl:variable name=&quot;mediaNode&quot; select=&quot;umbraco.library:GetMedia($mediaId, 0)&quot; /&gt;
		&lt;xsl:if test=&quot;count($mediaNode/data) &amp;gt; 0 and string($mediaNode/data[@alias='umbracoFile']) != ''&quot;&gt;
			&lt;img src=&quot;{$mediaNode/data[@alias='umbracoFile']}&quot; alt=&quot;[image]&quot; height=&quot;{$mediaNode/data[@alias='umbracoHeight']}&quot; width=&quot;{$mediaNode/data[@alias='umbracoWidth']}&quot; /&gt;
		&lt;/xsl:if&gt;
	&lt;/xsl:if&gt;
&lt;/xsl:template&gt; </pre>
 Tagged: code, GetMedia, snippet, Umbraco, XSLT <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=188&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/11/30/how-to-use-umbraco-library-getmedia-in-xslt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>WordPress Plugin Development: Beginner&#8217;s Guide, by Vladimir Prelovac</title>
		<link>http://blog.leekelleher.com/2009/10/20/wordpress-plugin-development-beginners-guide-by-vladimir-prelovac/</link>
		<comments>http://blog.leekelleher.com/2009/10/20/wordpress-plugin-development-beginners-guide-by-vladimir-prelovac/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 23:34:22 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[book review]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=181</guid>
		<description><![CDATA[ I have recently finished reading Vladimir Prelovac book on WordPress plug-in development, (WordPress Plug-in Development: Beginner&#8217;s Guide, Packt Publishing, 2009).
As an experienced WordPress plug-in developer, I was pessimistic at the start &#8211; there is already a wealth of documentation and detailed tutorials on the web, who would need a book?  However with Vladimir [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=181&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><a href="http://www.packtpub.com/wordpress-plug-in-development/mid/231009wn330g?utm_source=blog.leekelleher.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_001175"><img class="size-full wp-image-182 alignleft" title="wordpress-plugin-development-book" src="http://leekelleher.files.wordpress.com/2009/10/wordpress-plugin-development-book.jpg?w=195&#038;h=240" alt="wordpress-plugin-development-book" width="195" height="240" /></a> I have recently finished reading <a href="http://www.prelovac.com/vladimir/">Vladimir Prelovac</a> book on WordPress plug-in development, (<a href="http://www.packtpub.com/wordpress-plug-in-development/mid/231009wn330g?utm_source=blog.leekelleher.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_001175">WordPress Plug-in Development: Beginner&#8217;s Guide</a>, <a href="https://www.packtpub.com/">Packt Publishing</a>, 2009).</p>
<p>As an experienced WordPress plug-in developer, I was pessimistic at the start &#8211; there is already a wealth of documentation and detailed tutorials on the web, who would need a book?  However with Vladimir being a well-respected WordPress plug-in developer, I was curious to see his approach on the subject, and you never know &#8211; I may learn a thing or two? (<em>hint: I did!</em>)</p>
<p><a href="http://www.amazon.co.uk/gp/product/1847193595?ie=UTF8&amp;tag=leekelleher-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=1847193595">WordPress Plug-in Development (Beginner&#8217;s Guide)</a> is a great introduction to the WordPress platform, the plug-in architecture and the ever-growing community surrounding it.</p>
<p>The first thing I noticed was that the book is centred around WordPress 2.6, (at the time of writing the latest version is 2.8.4, with 2.9 due out very soon), unfortunately all of the screenshots for the admin back-end are outdated, since there was a complete overhaul to the design in version 2.7. This is no fault of the author, but an example of how fast paced the WordPress developer community is.  Luckily, the principles that Vladimir explains are focused on the core WordPress functionality, which are solid and stable.</p>
<p>Throughout the book, Vladimir encourages you to &#8220;<a href="http://catb.org/~esr/faqs/hacker-howto.html">hack</a>&#8221; around with code, which for me is a great experience &#8211; it&#8217;s how I learnt to code! As the tagline of the book states: &#8220;<em>Learn by doing: less theory, more results</em>&#8220;.</p>
<p>There is also a great awareness of 3rd-party applications, libraries and resources, (like <a href="http://digg.com/">Digg</a>, <a href="http://jquery.com/">jQuery</a>, <a href="http://www.poedit.net/">Poedit</a>, etc), which is fine for experienced web-developers, but for beginners &#8211; it will open up a world of exciting developments!  Thinking back to when I first played with jQuery&#8230; or pulling my photos back from Flickr&#8217;s API&#8230; so cool!</p>
<p>The very nice people at <a href="https://www.packtpub.com/">Packt Publishing</a> have a sample chapter available on-line; <a href="http://www.packtpub.com/files/wordpress-plugin-development-sample-chapter-2-social-bookmarking.pdf">Chapter 2: Social Bookmarking, covers how to develop your own Digg button for your blog</a>.</p>
<p>Vladimir covers all areas of WordPress development, from action and filter hooks to shortcodes and widgets to localisation (i18n &amp; L10n).  Even I didn&#8217;t know about the &#8220;wp_localize_script&#8221; function!</p>
<p>The mantra of the book is to leverage WordPress whenever you can, try not to re-invent the wheel. Which reminds me of <a href="http://www.catonmat.net/blog/about-this-blog">Peteris Krumins</a>&#8216; blog quote: <strong>&#8220;good coders code, great reuse&#8221;</strong>!</p>
<p>As the book progresses, each chapter&#8217;s example plug-in becomes more challenging and complex. The focus on localisation over the last few chapters was most interesting for me, as it is (probably) the least understood concept in WordPress plug-in development!</p>
<p>Often it is easy for WordPress users to take plug-in functionality for granted, this book exposes the amount of thought, planning, design and skill that goes into every (popular) WordPress plug-in.</p>
<p>In summary, <a href="http://www.amazon.co.uk/gp/product/1847193595?ie=UTF8&amp;tag=leekelleher-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=1847193595">WordPress Plug-in Development (Beginner&#8217;s Guide)</a> is perfect for anyone who is interested in extending the functionality of WordPress &#8211; it goes without saying that a little PHP knowledge is required, but that isn&#8217;t a show-stopper, you can learn whilst you &#8220;hack&#8221;!</p>
<p><img style="border:none!important;margin:0!important;" src="http://www.assoc-amazon.co.uk/e/ir?t=leekelleher-21&amp;l=as2&amp;o=2&amp;a=1847193595" border="0" alt="" width="1" height="1" /></p>
 Tagged: book, book review, development, plug-in, review, WordPress <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=181&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/10/20/wordpress-plugin-development-beginners-guide-by-vladimir-prelovac/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/10/wordpress-plugin-development-book.jpg" medium="image">
			<media:title type="html">wordpress-plugin-development-book</media:title>
		</media:content>

		<media:content url="http://www.assoc-amazon.co.uk/e/ir?t=leekelleher-21&#38;l=as2&#38;o=2&#38;a=1847193595" medium="image" />
	</item>
		<item>
		<title>Putting your ASP.NET Web Application in Maintenance Mode (using ISAPI_Rewrite)</title>
		<link>http://blog.leekelleher.com/2009/09/29/putting-your-asp-net-web-application-in-maintenance-mode-using-isapi_rewrite/</link>
		<comments>http://blog.leekelleher.com/2009/09/29/putting-your-asp-net-web-application-in-maintenance-mode-using-isapi_rewrite/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 13:22:14 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[App_Offline]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[ISAPI_Rewrite]]></category>
		<category><![CDATA[Maintenance]]></category>
		<category><![CDATA[Offline]]></category>
		<category><![CDATA[Redirect]]></category>
		<category><![CDATA[Umbraco]]></category>
		<category><![CDATA[web-application]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=177</guid>
		<description><![CDATA[Prompted by @slace&#8217;s tweet:
 i wish there was a way to use app_offline but still view from certain ip&#8217;s
I replied with a suggestion that we&#8217;ve used in the past. Aaron said I should blog about it&#8230; so here I am (again)!
A while ago we needed to do an Umbraco upgrade (from v3 to v4) on [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=177&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Prompted by <a href="http://twitter.com/slace/status/4466099083">@slace&#8217;s tweet</a>:</p>
<blockquote><p><a href="http://twitter.com/slace/"><img src="http://a1.twimg.com/profile_images/304684998/me_bigger.png" alt="Aaron Powell" width="32" height="32" align="absmiddle" border="0" /></a> i wish there was a way to use app_offline but still view from certain ip&#8217;s</p></blockquote>
<p>I <a href="http://twitter.com/leekelleher/status/4466197573">replied</a> with a suggestion that we&#8217;ve used in the past. <a href="http://twitter.com/slace/status/4466254905">Aaron said I should blog about it&#8230;</a> so here I am (again)!</p>
<p>A while ago we needed to do an Umbraco upgrade (from v3 to v4) on a production server &#8211; in my opinion it was a pretty major upgrade on a live site, we had done a couple of test upgrades on dev and staging, all was successful.  But since there was various parts of the site that we need to regression test, I felt it best to take the entire site offline whilst we upgraded.</p>
<p>Usually creating an &#8220;<a href="http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx">App_Offline.htm</a>&#8221; page in the root of your web app is enough to take it offline.  However that was no good for testing&#8230; so what to do?</p>
<p>This is where <a href="http://www.helicontech.com/isapi_rewrite/">ISAPI_Rewrite</a> is your best friend, (or <a href="http://en.wikipedia.org/wiki/Htaccess">.htaccess</a> to be precise).  We needed to configure the site to allow access for us and redirect everyone else to a &#8220;Site under maintenance&#8221; page.  I found a few examples across the web, but to save you all that hassle, here are the .htaccess rules that we use:</p>
<pre class="brush: xml;"># BEGIN Maintanence Mode
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/offline.html$
RewriteCond %{REMOTE_ADDR} !^82\.13\.23\.230$
RewriteRule ^(.*)$ /offline.html [R=302,L]
&lt;/IfModule&gt;
# END Maintanence Mode</pre>
<p>What does it do? The first &#8220;RewriteCond&#8221; rule checks that you are not requesting the &#8220;offline.html&#8221; page (otherwise you would end up in a constant loop!) The second &#8220;RewriteCond&#8221; checks the IP address of the visitor &#8211; in my case it was &#8220;82.13.23.230&#8243; (remember to escape the dots).  If those two rules aren&#8217;t satisfied, then the &#8220;RewriteRule&#8221; is used, redirecting the visitor to the &#8220;offline.html&#8221; page.</p>
<p>As always, I am open to any suggestions or improvements!</p>
 Tagged: App_Offline, ASP.NET, htaccess, ISAPI_Rewrite, Maintenance, Offline, Redirect, Umbraco, web-application <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/177/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/177/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/177/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=177&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/09/29/putting-your-asp-net-web-application-in-maintenance-mode-using-isapi_rewrite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://a1.twimg.com/profile_images/304684998/me_bigger.png" medium="image">
			<media:title type="html">Aaron Powell</media:title>
		</media:content>
	</item>
		<item>
		<title>How to convert NameValueCollection to a (Query) String [Revised]</title>
		<link>http://blog.leekelleher.com/2009/09/19/how-to-convert-namevaluecollection-to-a-query-string-revised/</link>
		<comments>http://blog.leekelleher.com/2009/09/19/how-to-convert-namevaluecollection-to-a-query-string-revised/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 23:08:34 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[QueryString]]></category>
		<category><![CDATA[revised]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=171</guid>
		<description><![CDATA[Following on from a comment on my previous post about converting a NameValueCollection to a (query) string &#8211; I have finally got around to revising my code snippet.  Now the method will handle same key multiple values, (it no longer comma-separates them).
I have also added extra parameters so that you can define your own delimiter [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=171&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Following on from a comment on my previous post about <a href="http://blog.leekelleher.com/2008/06/06/how-to-convert-namevaluecollection-to-a-query-string/#comment-148">converting a NameValueCollection to a (query) string</a> &#8211; I have finally got around to revising my code snippet.  Now the method will handle same key multiple values, (it no longer comma-separates them).</p>
<p>I have also added extra parameters so that you can define your own delimiter (since the <a href="http://en.wikipedia.org/wiki/Query_string#Structure">HTTP specification</a> says that you can use both ampersands <code>&amp;</code> and semicolons <code>;</code>) and there is an option for omitting keys with empty values.</p>
<pre class="brush: csharp;">/// &lt;summary&gt;
/// Constructs a NameValueCollection into a query string.
/// &lt;/summary&gt;
/// &lt;remarks&gt;Consider this method to be the opposite of &quot;System.Web.HttpUtility.ParseQueryString&quot;&lt;/remarks&gt;
/// &lt;param name=&quot;parameters&quot;&gt;The NameValueCollection&lt;/param&gt;
/// &lt;param name=&quot;delimiter&quot;&gt;The String to delimit the key/value pairs&lt;/param&gt;
/// &lt;returns&gt;A key/value structured query string, delimited by the specified String&lt;/returns&gt;
public static String ConstructQueryString(NameValueCollection parameters, String delimiter, Boolean omitEmpty)
{
	if (String.IsNullOrEmpty(delimiter))
		delimiter = &quot;&amp;&quot;;

	Char equals = '=';
	List&lt;String&gt; items = new List&lt;String&gt;();

	for (int i = 0; i &lt; parameters.Count; i++)
	{
		foreach (String value in parameters.GetValues(i))
		{
			Boolean addValue = (omitEmpty) ? !String.IsNullOrEmpty(value) : true;
			if (addValue)
				items.Add(String.Concat(parameters.GetKey(i), equals, HttpUtility.UrlEncode(value)));
		}
	}

	return String.Join(delimiter, items.ToArray());
}</pre>
 Tagged: ASP.NET, C#, code, QueryString, revised, snippet <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/171/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/171/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/171/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=171&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/09/19/how-to-convert-namevaluecollection-to-a-query-string-revised/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>Umbraco: Ultimate Picker XSLT Example</title>
		<link>http://blog.leekelleher.com/2009/09/08/umbraco-ultimate-picker-xslt-example/</link>
		<comments>http://blog.leekelleher.com/2009/09/08/umbraco-ultimate-picker-xslt-example/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 22:38:14 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Data Types]]></category>
		<category><![CDATA[Template]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Ultimate Picker]]></category>
		<category><![CDATA[Umbraco]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=157</guid>
		<description><![CDATA[Chatting with Dan (my partner-in-code at Bodenko) about the Ultimate Picker data-type in Umbraco, we realised that we couldn&#8217;t find any examples of how to use the data in XSLT.  So obviously needing an excuse to write-up a new blog post, here we go.
If you need a quick overview about the Ultimate Picker data-type, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=157&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Chatting with Dan (my partner-in-code at <a href="http://bodenko.com/">Bodenko</a>) about the Ultimate Picker data-type in Umbraco, we realised that we couldn&#8217;t find any examples of how to use the data in XSLT.  So obviously needing an excuse to write-up a new blog post, here we go.</p>
<p>If you need a quick overview about the Ultimate Picker data-type, see <a href="http://www.nibble.be/?p=38">Tim Geyssens&#8217; blog post</a>.</p>
<p>For my example, using a default Umbraco install (with Runway), we will create a new data-type using the Ultimate Picker, (let&#8217;s call it &#8220;<em>Runway Textpage Picker</em>&#8220;), we select the &#8216;<strong>Database datatype</strong>&#8216; to be &#8220;Nvarchar&#8221;; the &#8216;<strong>Type</strong>&#8216; as a &#8220;List Box&#8221;; The &#8216;<strong>Parent nodeid</strong>&#8216; is &#8220;1048&#8243; and the &#8216;<strong>Document Alias</strong>&#8216; filter is &#8220;RunwayTextpage&#8221; &#8211; we also tick the &#8216;<strong>Show grandchildren</strong>&#8216; checkbox.</p>
<div id="attachment_158" class="wp-caption aligncenter" style="width: 160px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-datatype.png"><img class="size-thumbnail wp-image-158 " title="UltimatePicker-DataType" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-datatype.png?w=150&#038;h=112" alt="Ultimate Picker Data Type settings" width="150" height="112" /></a><p class="wp-caption-text">Ultimate Picker Data Type settings</p></div>
<p>Next, we will assign the new &#8220;<em>Runway Textpage Picker</em>&#8220; data-type to a property of the Runway Textpage, we will call it &#8220;<em>Related Content</em>&#8220;. For more information about working with document types, please refer to the our.umbraco.org wiki page, (<a href="http://our.umbraco.org/wiki/how-tos/working-with-document-types">Working with document types</a>).</p>
<div id="attachment_160" class="wp-caption aligncenter" style="width: 160px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-doctype.png"><img class="size-thumbnail wp-image-160 " title="UltimatePicker-DocType" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-doctype.png?w=150&#038;h=112" alt="Adding Ultimate Picker to a Document Type" width="150" height="112" /></a><p class="wp-caption-text">Adding Ultimate Picker to a Document Type</p></div>
<p>Once the document-type is saved, we move on to the &#8216;<strong>Content</strong>&#8216; section. Select any of the Runway Textpages.  You should now see the &#8216;<em>Related Content</em>&#8216; property panel, containing a list of all the other Runway Textpages.  To select multiple items, hold-down the CTRL (or Command on the Mac) button.  When you have finished, click the &#8217;<strong>Save and publish</strong>&#8216; button.</p>
<div id="attachment_162" class="wp-caption aligncenter" style="width: 160px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-relatedcontent.png"><img class="size-thumbnail wp-image-162" title="UltimatePicker-RelatedContent" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-relatedcontent.png?w=150&#038;h=112" alt="Selecting related content" width="150" height="112" /></a><p class="wp-caption-text">Selecting related content</p></div>
<p>For the next part we get to the real meat of this blog post&#8230; the XSLT!</p>
<div id="attachment_163" class="wp-caption aligncenter" style="width: 160px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-createmacro.png"><img class="size-thumbnail wp-image-163 " title="UltimatePicker-CreateMacro" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-createmacro.png?w=150&#038;h=112" alt="Create a new XSLT" width="150" height="112" /></a><p class="wp-caption-text">Create a new XSLT</p></div>
<p>Create a new XSLT called &#8220;<em>RelatedContent</em>&#8221; (without the .xslt extension), keep it &#8216;Clean&#8217; and tick the &#8216;<strong>Create Macro</strong>&#8216; checkbox.  Next a quick short-cut for you; copy-n-paste the following XSLT into the main editor window.</p>
<div id="attachment_164" class="wp-caption aligncenter" style="width: 160px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-xslt.png"><img class="size-thumbnail wp-image-164" title="UltimatePicker-XSLT" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-xslt.png?w=150&#038;h=112" alt="Copy-n-paste the XSLT" width="150" height="112" /></a><p class="wp-caption-text">Copy-n-paste the XSLT</p></div>
<pre class="brush: xml;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE xsl:stylesheet [ &lt;!ENTITY nbsp &quot;&amp;#xA0;&quot;&gt; ]&gt;
&lt;xsl:stylesheet
	version=&quot;1.0&quot;
	xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;
	xmlns:msxml=&quot;urn:schemas-microsoft-com:xslt&quot;
	xmlns:umbraco.library=&quot;urn:umbraco.library&quot;
	exclude-result-prefixes=&quot;msxml umbraco.library&quot;&gt;
	&lt;xsl:output method=&quot;xml&quot; omit-xml-declaration=&quot;yes&quot;/&gt;

	&lt;xsl:param name=&quot;currentPage&quot;/&gt;

	&lt;xsl:template match=&quot;/&quot;&gt;
		&lt;xsl:variable name=&quot;preNodes&quot;&gt;
					&lt;xsl:variable name=&quot;relatedContent&quot; select=&quot;$currentPage/data[@alias='RelatedContent']&quot; /&gt;
					&lt;xsl:variable name=&quot;nodeIds&quot; select=&quot;umbraco.library:Split($relatedContent, ',')&quot; /&gt;
					&lt;xsl:for-each select=&quot;$nodeIds/value&quot;&gt;
						&lt;xsl:copy-of select=&quot;umbraco.library:GetXmlNodeById(.)&quot;/&gt;
					&lt;/xsl:for-each&gt;
		&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;nodes&quot; select=&quot;msxml:node-set($preNodes)/node&quot; /&gt;
		&lt;xsl:if test=&quot;count($nodes) &gt; 0&quot;&gt;
&lt;div class=&quot;related-content&quot;&gt;
&lt;h3&gt;Related Content&lt;/h3&gt;
&lt;ul&gt;
					&lt;xsl:for-each select=&quot;$nodes&quot;&gt;
	&lt;li&gt;
							&lt;a href=&quot;{umbraco.library:NiceUrl(@id)}&quot;&gt;
								&lt;xsl:value-of select=&quot;@nodeName&quot; /&gt;
							&lt;/a&gt;&lt;/li&gt;
&lt;/xsl:for-each&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/xsl:if&gt;
	&lt;/xsl:template&gt;

&lt;/xsl:stylesheet&gt;</pre>
<p>Here&#8217;s a quick explanation of what is happening in the XSLT.  We are provided with a list of comma-separated nodeIds from the Ultimate Picker, which we need to parse/split &#8211; then pull back the XML node data, then we can transform it however we like!</p>
<p>The way we do this is 2-tiered, first we must loop through the comma-separated list, pulling back the XML node for each nodeId, adding it to an XSLT variable.  Doing this will cause the XSLT variable to be a fragmented node-tree, which means that we need to convert the node-tree fragment into a node-set.  (*Note: there are a gazillion ways to skin a cat &#8211; suggestions are welcome &#8211; this method works for me).</p>
<p>Once we have the complete XML node-set, we can transform into whatever HTML we  like.</p>
<p>Now that we are done with the XSLT, we can edit our template in the &#8216;<strong>Settings</strong>&#8216; section. Select the &#8220;<em>Runway Textpage</em>&#8221; template. Somewhere after the &#8216;<em>bodyText</em>&#8216; property item, click on the &#8216;Insert Macro&#8217; button.  From the &#8216;<strong>Choose a macro</strong>&#8216; drop-down, select the &#8216;<em>Related Content</em>&#8216; option &#8211; this will add the macro code to the template.</p>
<div id="attachment_167" class="wp-caption aligncenter" style="width: 160px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-template.png"><img class="size-thumbnail wp-image-167" title="UltimatePicker-Template" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-template.png?w=150&#038;h=112" alt="Insert the macro into the template" width="150" height="112" /></a><p class="wp-caption-text">Insert the macro into the template</p></div>
<p>Save the template and view the front-end page. We can now see the <em>Related Content</em> pages. Tada!</p>
<div id="attachment_168" class="wp-caption aligncenter" style="width: 310px"><a href="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-frontend.png"><img class="size-medium wp-image-168" title="UltimatePicker-FrontEnd" src="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-frontend.png?w=300&#038;h=225" alt="The end result! Related Content" width="300" height="225" /></a><p class="wp-caption-text">The end result! Related Content</p></div>
 Tagged: Data Types, Template, Tutorial, Ultimate Picker, Umbraco, XSLT <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/157/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/157/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/157/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=157&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/09/08/umbraco-ultimate-picker-xslt-example/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-datatype.png?w=150" medium="image">
			<media:title type="html">UltimatePicker-DataType</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-doctype.png?w=150" medium="image">
			<media:title type="html">UltimatePicker-DocType</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-relatedcontent.png?w=150" medium="image">
			<media:title type="html">UltimatePicker-RelatedContent</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-createmacro.png?w=150" medium="image">
			<media:title type="html">UltimatePicker-CreateMacro</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-xslt.png?w=150" medium="image">
			<media:title type="html">UltimatePicker-XSLT</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-template.png?w=150" medium="image">
			<media:title type="html">UltimatePicker-Template</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/09/ultimatepicker-frontend.png?w=300" medium="image">
			<media:title type="html">UltimatePicker-FrontEnd</media:title>
		</media:content>
	</item>
		<item>
		<title>Robots.txt Editor for Umbraco</title>
		<link>http://blog.leekelleher.com/2009/07/20/robots-txt-editor-for-umbraco/</link>
		<comments>http://blog.leekelleher.com/2009/07/20/robots-txt-editor-for-umbraco/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 22:18:23 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[Package]]></category>
		<category><![CDATA[Robots.txt]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=144</guid>
		<description><![CDATA[Following up on my recent post of using Robots.txt with Umbraco, I decided that it would be nice to be able to edit the robots.txt directly from the Umbraco back-end.  (Also I wanted to play a bit more with the BaseTree/ITree classes).
This afternoon I had a few hours to spare &#8211; actually I was procrastinating [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=144&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p>Following up on my recent post of using <a href="http://blog.leekelleher.com/2009/07/07/robots-txt-for-use-with-umbraco/">Robots.txt with Umbraco</a>, I decided that it would be nice to be able to edit the robots.txt directly from the Umbraco back-end.  (Also I wanted to play a bit more with the BaseTree/ITree classes).</p>
<p>This afternoon I had a few hours to spare &#8211; actually I was procrastinating on another job, (don&#8217;t tell my client &#8211; I&#8217;ll finish it off later tonight) &#8211; so I got down to some coding.</p>
<p>The <a href="http://umbracoext.codeplex.com/SourceControl/changeset/view/35482">source-code is available</a> on the <a href="http://umbracoext.codeplex.com/">Umbraco Extensions project</a> (on CodePlex) and created <a href="http://our.umbraco.org/projects/robotstxt-editor">a project page</a> on the new <a href="http://our.umbraco.org/">Our Umbraco community</a> website. (Don&#8217;t forget to give it some karma points! ;-p)</p>
<p><a href="http://our.umbraco.org/media/wiki/5402/633837309506210000_Robotstxt_Editor_10.zip">A direct download to the package installer (zip) is available here.</a></p>
<p>Very special thanks to <a href="http://webdeveloper2.com/">Dave Kinsella</a> for providing the <a href="http://twitpic.com/b01nb">Robot icon</a> <img class="alignnone size-full wp-image-149" title="robot icon" src="http://leekelleher.files.wordpress.com/2009/07/18477911.png?w=16&#038;h=16" alt="robot icon" width="16" height="16" /> &#8211; although I know Dave, it was great <a href="http://twitter.com/leekelleher/statuses/2738891885">proof that Twitter really does work!</a> (Thanks to <a href="http://twitter.com/DanielBowden">Dan</a> too for his <a href="http://twitpic.com/b03gf">Johnny 5</a> attempt! <img class="alignnone size-full wp-image-150" title="18480255" src="http://leekelleher.files.wordpress.com/2009/07/18480255.png?w=16&#038;h=15" alt="18480255" width="16" height="15" /> &#8211; Here was <a href="http://twitpic.com/b06dk">my attempt</a> too!  <img class="alignnone size-full wp-image-151" title="18484040" src="http://leekelleher.files.wordpress.com/2009/07/18484040.png?w=16&#038;h=16" alt="18484040" width="16" height="16" />)</p>
<p>If you have any bugs, comments, feedback or suggestions – please feel free to get in touch with me via the <a href="http://our.umbraco.org/projects/robotstxt-editor/feedback">Our Umbraco forums</a>.</p>
 Tagged: ASP.NET, Developer, Editor, Package, Robots.txt, SEO, Umbraco <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=144&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/07/20/robots-txt-editor-for-umbraco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/07/18477911.png" medium="image">
			<media:title type="html">robot icon</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/07/18480255.png" medium="image">
			<media:title type="html">18480255</media:title>
		</media:content>

		<media:content url="http://leekelleher.files.wordpress.com/2009/07/18484040.png" medium="image">
			<media:title type="html">18484040</media:title>
		</media:content>
	</item>
		<item>
		<title>Add YouTube Plug-in to Umbraco/TinyMCE</title>
		<link>http://blog.leekelleher.com/2009/07/16/add-youtube-plugin-to-umbraco-tinymce/</link>
		<comments>http://blog.leekelleher.com/2009/07/16/add-youtube-plugin-to-umbraco-tinymce/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 15:07:25 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[TinyMCE]]></category>
		<category><![CDATA[Umbraco]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=134</guid>
		<description><![CDATA[Update: Following on from Dirk and Ismail&#8217;s comments, I found out that this YouTube plug-in does not work with TinyMCE v3 (which is the default richtext editor in Umbraco v4). This guide is written to works  for Umbraco v3 only, (using TinyMCE v2).
If you are looking for similar functionality in Umbraco v4, (TinyMCE v3), then all [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=134&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><strong><span style="text-decoration:underline;"><em>Update:</em></span></strong><em> Following on from <a href="#comment-224">Dirk and Ismail&#8217;s comments</a>, I found out that this YouTube plug-in does not work with TinyMCE v3 (which is the default richtext editor in Umbraco v4). This guide is written to works  for Umbraco v3 <strong>only</strong>, (using TinyMCE v2).</em></p>
<p><em>If you are looking for similar functionality in Umbraco v4, (TinyMCE v3), then all you need to do is enable the &#8216;Flash/media&#8217; button in your Richtext editor data-type and embed the YouTube video like any other Flash movie (swf) &#8211; <a href="#comment-225">more details in my comment below</a>.</em></p>
<p><em><strong><span style="text-decoration:underline;">/End of update.</span></strong></em></p>
<hr />
Recently one of my clients wanted the ability to insert YouTube video clips directly into the TinyMCE editor within Umbraco.  My initial thought was to create a macro that would take a YouTube video URL, parse it and display it on the rendered (front-end) page.  <a href="http://www.nibble.be/?p=36">Tim G has a blog post on how to do this on his Nibble blog</a>, (love the <a href="http://www.youtube.com/watch?v=fruHQhNe-UM">Surfin&#8217; Bird</a> reference).</p>
<p>This approached worked fine, but we ran into problems trying to edit the YouTube video URL, along with that, my client had an additional step of selecting a macro, then entering the YouTube URL.</p>
<p>After a little researching, I eventually found a native <a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1669296&amp;group_id=103281&amp;atid=738747">YouTube plug-in for TinyMCE</a>, (<a href="http://sourceforge.net/tracker/download.php?group_id=103281&amp;atid=738747&amp;file_id=217845&amp;aid=1669296">direct link to ZIP download</a>).</p>
<p>Here is how I integrated in Umbraco:</p>
<ol>
<li>Extract the contents of the <code>youtube.zip</code> archive to your <code>/umbraco_client/tinymce/plugins/youtube/</code></li>
<li>In your <code>/config/</code> folder, open the <code>tinyMceConfig.config</code> file.</li>
<li>Insert the following lines:<br />
After the last <code>&lt;command /&gt;</code> entry, add&#8230;
<pre class="brush: xml;">&lt;command&gt;
	&lt;umbracoAlias&gt;mceYoutube&lt;/umbracoAlias&gt;
	&lt;icon&gt;../umbraco_client/tinymce/plugins/youtube/images/youtube.gif&lt;/icon&gt;
	&lt;tinyMceCommand value=&quot;&quot; userInterface=&quot;true&quot; frontendCommand=&quot;youtube&quot;&gt;youtube&lt;/tinyMceCommand&gt;
&lt;priority&gt;75&lt;/priority&gt;
&lt;/command&gt;</pre>
<p>Then after the last <code>&lt;plugin /&gt;</code> entry, add&#8230;</p>
<pre class="brush: xml;">
&lt;plugin loadOnFrontend=&quot;false&quot;&gt;youtube&lt;/plugin&gt;</pre>
</li>
<li>Once the XML config entries are in place, you will need to restart the  Umbraco application &#8211; the quickest way of doing this is by modifying your <code>Web.config</code>, (literally open it, add a space, remove it, hit save).</li>
<li>The YouTube button is now available in Umbraco. <strong>However, it&#8217;s not quite ready yet, there is still one more step!</strong></li>
<li>In your Umbraco back-end, go to the &#8220;Developer&#8221; section, expand the &#8220;DataTypes&#8221; folder and then select &#8220;Richtext editor&#8221;. In the &#8220;Buttons&#8221; section you should see a YouTube icon. Check the box next to the icon, and you&#8217;re done! If you don&#8217;t see the YouTube icon, then check that the did the config steps above, and/or check that the read permissions are set correctly on your <code>/umbraco_client/</code> folder, (re-apply them if needs be).</li>
</ol>
 Tagged: plug-in, TinyMCE, Umbraco, YouTube <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=134&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/07/16/add-youtube-plugin-to-umbraco-tinymce/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
		<item>
		<title>Robots.txt for use with Umbraco</title>
		<link>http://blog.leekelleher.com/2009/07/07/robots-txt-for-use-with-umbraco/</link>
		<comments>http://blog.leekelleher.com/2009/07/07/robots-txt-for-use-with-umbraco/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 16:10:30 +0000</pubDate>
		<dc:creator>Lee Kelleher</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[Robots.txt]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://blog.leekelleher.com/?p=132</guid>
		<description><![CDATA[I originally posted this over at the Our Umbraco community wiki. [Robots.txt for use with Umbraco] I am only posting it on my blog as a cross-reference. The Our Umbraco wiki version will evolve with the community&#8217;s experience and knowledge.
The Robots Exclusion Protocol has been around for many years, yet there are a lot of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=132&subd=leekelleher&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<br /><p><em>I originally posted this over at the Our Umbraco community wiki. [<a href="http://our.umbraco.org/wiki/reference/umbraco-best-practices/robotstxt-for-use-with-umbraco">Robots.txt for use with Umbraco</a>] I am only posting it on my blog as a cross-reference. The Our Umbraco wiki version will evolve with the community&#8217;s experience and knowledge.</em></p>
<p>The Robots Exclusion Protocol has been around for many years, yet there are a lot of web-developers who are unaware of the reasons for having a robots.txt file in the root of their websites.</p>
<p>There have been many rumours around whether the bigger search engine crwalers (i.e. Googlebot) consider your website amateurish if you didn&#8217;t have a robots.txt &#8211; and if handled badly, could lead to your site being invisible on SERPs.</p>
<p>If you are happy for a crawler to crawl/index all of your website&#8217;s content, then you can use the following:</p>
<pre class="brush: bash;">User-agent: *
Disallow:</pre>
<p>However, when using Umbraco to power my websites, it is preferable to define which folders are accessible by the crawler. Personally, I would not like to see the contents of my <code>/umbraco/</code> folder to be returned in Google&#8217;s SERPs.</p>
<p>Here is an example of the robots.txt that I have used on several Umbraco-powered websites.</p>
<pre class="brush: bash;"># robots.txt for Umbraco
User-agent: *
Disallow: /aspnet_client/
Disallow: /bin/
Disallow: /config/
Disallow: /css/
Disallow: /data/
Disallow: /scripts/
Disallow: /umbraco/
Disallow: /umbraco_client/
Disallow: /usercontrols/
Disallow: /xslt/</pre>
<p>From my perspective, there is no reason for a search engine crawler to be crawling/indexing files from any of the above folders &#8211; you may have a different perspective, to which you can amend your robots.txt accordingly.</p>
<p>For more information about the robots.txt standard, please refer to the official website: <a href="http://www.robotstxt.org/robotstxt.html">http://www.robotstxt.org/robotstxt.html</a></p>
 Tagged: Robots.txt, SEO, Umbraco <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/leekelleher.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/leekelleher.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/leekelleher.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/leekelleher.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/leekelleher.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/leekelleher.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/leekelleher.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/leekelleher.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/leekelleher.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/leekelleher.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.leekelleher.com&blog=2580820&post=132&subd=leekelleher&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.leekelleher.com/2009/07/07/robots-txt-for-use-with-umbraco/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a8e6348aa8c014a012bde96c9b04270?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">vertino</media:title>
		</media:content>
	</item>
	</channel>
</rss>