Sunday, July 13, 2008

Blogger hack

If you haven't already activated draft.blogger.com, you should.I don't think that Blogger, or Google in general, makes errors very often. However, their "help article" on how to make an automatic link to the profile of a post's author in the post footer simply doesn't work. The XML of the link written by the script is parsed wrong. So, with the help of a forum tip, I made a custom little snippet of code to automatically display the profile of someone who posts to the Godless Columbia blog:
<xml><b:if cond='data:post.author == "XXX" '>
<data:top.authorlabel>
<a href="http://www.blogger.com/profile/YYYY" title="author profile">
<span class="fn">
<data:post.author></data:post.author>
</span></a><b:else>
INSERT REPEAT HERE IF NECESSARY
</b:else>
</b:if>
</xml>