The hCard microformat is used to make contact information machine readable. In BlogEngine.NET 1.4.5 this is being supported in the post comments. However, if you are writing your own custom theme, you need to add a little bit of code to your CommentView.ascx theme file.

The themes bundled in BlogEngine.NET 1.4.5 already have these small pieces of code embedded, so let’s take a look at the Standard theme’s CommentView.ascx file.

The containing <div> now have two classes: vcard and comment. The vcard class is new and is the one that triggers the hCard microformat. It looks like this:

<div id="id_<%=Comment.Id %>" class="vcard comment...

If the vcard class is added, machines will expect to find an hCard microformat within that <div>, but we need to add one more class to make it a valid hCard – the fn class name.

In the Standard theme’s CommentView.ascx file you can see where the name of the comment author is written. If it author supplied her website URL an hyperlink is created, otherwise a span tag. The hyperlink has a class attribute with two class names: fn and url. This tells the hCard crawlers that this is both the full name and the URL of the contact. In the span, only the fn class name is needed.

So, if you want to support microformats in your custom themes; take a look at the Standard theme’s CommentView.ascx file and make the appropriate modifications. BlogEngine.NET 1.4.5 already adds the appropriate classes to the avatar image and country flag, so you don’t have to do anything there.

As I wrote 10 days ago, a new BlogEngine.NET release had to be made to deal with some issues found in version 1.4. It’s exactly one month since the release of the 1.4 version and a lot has been fixed, tweaked and changed.

Besides some new cool features, more than 50 work items from the issue tracker at CodePlex have been implemented. That’s a lot of modified code and the result is significant. Here’s a list of some of the changes in version 1.4.5.

One of the exiting new things is that BlogEngine.NET now is released with SQL Server, MySQL, SQLite and VistaDB scripts and databases. That makes it really easy to choose the database that suits you best if you don’t want to go with the default XML provider. And by easy I mean as easy as copying a couple of files to the bin and App_Data folder and you’re all set to go.

I know some of you have had some issues with the 1.4 release, so I really hope you’ll enjoy this new version.

Download it now