Tuesday, January 17, 2012


Templates: Is comment author blog admin? An easy test

If you make Blogger templates or template based hacks, this info might interest you. In the comments section, usually in <b:includable id='comments' var='post'>, if one needs to check if the comment author is blog admin, often seen solutions include:
<b:if cond=' == &quot;PUT_USERNAME_HERE&quot;'>
<b:if cond='data:comment.authorUrl == &quot;;'>
But the easiest way, and least error prone, is:
<b:if cond='data:comment.authorClass == &quot;blog-author&quot;'>
After realising this, I updated my How to Hightlight author comments in Blogger hack to use this easier method.
Related Posts Plugin for WordPress, Blogger...
See the hack
for this dynamic
views icon: