<?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>Eric Wendelin&#039;s Blog &#187; Microformats</title>
	<atom:link href="http://eriwen.com/category/microformats/feed/" rel="self" type="application/rss+xml" />
	<link>http://eriwen.com</link>
	<description>Programming productively with open-source tools</description>
	<lastBuildDate>Thu, 26 Apr 2012 18:48:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Microformats: Add hCard to your blogroll in 2 minutes flat</title>
		<link>http://eriwen.com/microformats/add-hcard-to-blogroll/</link>
		<comments>http://eriwen.com/microformats/add-hcard-to-blogroll/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 13:48:31 +0000</pubDate>
		<dc:creator>Eric Wendelin</dc:creator>
				<category><![CDATA[Microformats]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://eriwen.com/microformats/add-hcard-to-blogroll/</guid>
		<description><![CDATA[<img alt="" src="http://static.eriwen.com/images/orange_microformat.png" style="float: left; margin: 0px 8px 4px 0px" />As a supporter of <a href="http://microformats.org" target="_blank">microformats</a>, I want to provide you some amazingly easy ways to add them to your blog. To kick this off, I'm going to tell you how you can turn your WordPress or Blogger blogroll into a list of <a href="http://microformats.org/wiki/hcard-examples#References_to_People_in_Blogrolls" target="_blank">hCard</a>s in less than 2 minutes!
 <a href="http://eriwen.com/microformats/add-hcard-to-blogroll/">Continue reading <span class="meta-nav">&#8594;</span></a>


Related posts:<ol><li><a href='http://eriwen.com/javascript/measure-ems-for-layout/' rel='bookmark' title='Javascript: Measure those &#8220;em&#8221;s for your layout'>Javascript: Measure those &#8220;em&#8221;s for your layout</a></li>
<li><a href='http://eriwen.com/css/color-palette-with-css-and-moo/' rel='bookmark' title='Create a Color Palette Using CSS and MooTools 1.2'>Create a Color Palette Using CSS and MooTools 1.2</a></li>
<li><a href='http://eriwen.com/css/use-the-table-layout-css-property-to-speed-up-table-rendering/' rel='bookmark' title='Use the table-layout CSS property to speed up table rendering'>Use the table-layout CSS property to speed up table rendering</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img alt="" src="http://static.eriwen.com/images/orange_microformat.png" style="float: left; margin: 0px 8px 4px 0px" />As a supporter of <a href="http://microformats.org" target="_blank">microformats</a>, I want to provide you some amazingly easy ways to add them to your blog. To kick this off, I&#8217;m going to tell you how you can turn your WordPress or Blogger blogroll into a list of <a href="http://microformats.org/wiki/hcard-examples#References_to_People_in_Blogrolls" target="_blank">hCard</a>s in less than 2 minutes!</p>
<h2>WordPress</h2>
<p>Doing this in <a href="http://wordpress.org" target="_blank">WordPress</a> is dead simple. Just open up <em>wp-includes/bookmark-template.php</em> and make the following changes. I prefer to download the files here and make edits with <a href="http://www.jedit.org/" target="_blank">jEdit</a> :)</p>
<pre class="brush: plain; light: true; title: ; notranslate">
// Line 6
'show_images' =&gt; 1, 'before' =&gt; '&lt;li&gt;',

// Change to
'show_images' =&gt; 1, 'before' =&gt; '&lt;li class=&quot;vcard&quot;&gt;',
</pre>
<pre class="brush: plain; light: true; title: ; notranslate">
// Line 48 or something similar ;)
$output .= '&lt;a href=&quot;' . $the_link . '&quot;' . $rel . $title . $target. '&gt;';

// Change to
$output .= '&lt;a class=&quot;fn url&quot; href=&quot;' . $the_link . '&quot;' . $rel . $title . $target. '&gt;';
</pre>
<p>You could use the <a href="http://factorycity.net/projects/wp-microformatted-blogroll/" target="_blank">WP Microformatted Blogroll</a> plugin for WordPress, but I like this much better because it looks like it can&#8217;t be used by a dynamic sidebar and maybe I just like to code ok?</p>
<h2>Blogger</h2>
<p>For Blogger you are going to need to edit your template <abbr title="HyperText Markup Language">HTML</abbr>, and make sure you check the <em>Expand Widget Templates</em> checkbox. About 4/5ths of the way down you should see a code block like this:</p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;b:widget id='LinkList1' locked='false' title='Blogroll' type='LinkList'&gt;
  &lt;b:includable id='main'&gt;
    &lt;b:if cond='data:title'&gt;&lt;h2&gt;&lt;data:title/&gt;&lt;/h2&gt;&lt;/b:if&gt;
    &lt;div class='widget-content'&gt;
      &lt;ul&gt;
        &lt;b:loop values='data:links' var='link'&gt;
          &lt;li&gt;&lt;a expr:href='data:link.target'&gt;&lt;data:link.name/&gt;&lt;/a&gt;&lt;/li&gt;
        &lt;/b:loop&gt;
      &lt;/ul&gt;
    &lt;b:include name='quickedit'/&gt;
    &lt;/div&gt;
  &lt;/b:includable&gt;
&lt;/b:widget&gt;
</pre>
<p>You just need to edit the list items in the loop to add <em>&lt;li class=&#8217;vcard&#8217;</em> and <em>&lt;a class=&#8217;fn url&#8217;</em> like so:</p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;ul&gt;
  &lt;b:loop values='data:links' var='link'&gt;
    &lt;li class='vcard'&gt;&lt;a class='fn url' expr:href='data:link.target'&gt;&lt;data:link.name/&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/b:loop&gt;
&lt;/ul&gt;
</pre>
<p>However, to add <abbr title="XHTML Friends Network">XFN</abbr> as well you will have to remove the loop and create the &lt;li&gt; tags yourself. You can find out more about <a href="http://gmpg.org/xfn/" target="_blank">XFN here</a>.</p>
<pre class="brush: xml; light: true; title: ; notranslate">
&lt;ul&gt;
  &lt;li class=&quot;vcard&quot;&gt;
    &lt;a class=&quot;fn url&quot; href=&quot;http://davidwalsh.name&quot; rel=&quot;friend&quot;&gt;David Walsh&lt;/a&gt;
  &lt;/li&gt;
  &lt;li class=&quot;vcard&quot;&gt;
    &lt;a class=&quot;fn url&quot; href=&quot;http://casedogdesigns.com&quot; rel=&quot;friend colleague met&quot;&gt;Casey Watson&lt;/a&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>That&#8217;s all! Easy, right? What other ways have you incorporated microformats into your website or blog? <a href="http://eriwen.com/feed/">Stay tuned</a> for more simple ways you can jazz up your blog with microformats!</p>


<p>Related posts:<ol><li><a href='http://eriwen.com/javascript/measure-ems-for-layout/' rel='bookmark' title='Javascript: Measure those &#8220;em&#8221;s for your layout'>Javascript: Measure those &#8220;em&#8221;s for your layout</a></li>
<li><a href='http://eriwen.com/css/color-palette-with-css-and-moo/' rel='bookmark' title='Create a Color Palette Using CSS and MooTools 1.2'>Create a Color Palette Using CSS and MooTools 1.2</a></li>
<li><a href='http://eriwen.com/css/use-the-table-layout-css-property-to-speed-up-table-rendering/' rel='bookmark' title='Use the table-layout CSS property to speed up table rendering'>Use the table-layout CSS property to speed up table rendering</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://eriwen.com/microformats/add-hcard-to-blogroll/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

