Another one of those things I stash here for future use. This one is about how to have Blogger's comments be numbered. Ease of reference, and all.
The source for the good numberedness code is Fernandooo1 at Quite Random. Reproducing here for my stashliness. Also to show a few amendments, and to rail about Internet Explorer failing.
First, the code. If you know Javascript at all, it's actually wicked easy - declare a counting variable just before the comment starts, then increment and print.
<b:includable id='comments' var='post'> [...] <dl id='comments-block'> <script type='text/javascript'>var CommentsCounter = 0;</script> <b:loop values='data:post.comments' var='comment'> <dt style='clear: both;' class='comment-author' expr:id='"comment-" + data:comment.id'> <a expr:name='"comment-" + data:comment.id'/> <span class='numberingcomments'> <a expr:href='data:comment.url' title='Comment Link'> <script type='text/javascript'> CommentsCounter++; document.write('#' + CommentsCounter + ': '); </script> </a> </span> <b:if cond='data:comment.authorUrl'> <a expr:href='data:comment.authorUrl' rel='nofollow'> <data:comment.author/> </a> <b:else/> <data:comment.author/> </b:if> <data:commentPostedByMsg/> </dt> <dd class='comment-body'> [...] </dd> </b:loop> </dl>
In the CSS block at the top, style .numberingcomments however you like.
This is slightly different from the original code at Quite Random, primarily in that I did not want the number off to the right. It currently displays as image, number#, author.
What I wanted was to change the dl/dt/dd stuff to ol/li/p stuff. However, it seems that Internet Explorer has a little hasLayout issue. When I changed the tags as noted just now, the icons (for anonymous, OpenID, Blogger, &c) would be vertically aligned to the middle, rather than the top, and no numbers would appear.
If I can figure out how to get around that for Internet Explorer, I will absolutely post that here. I've nothing against Javascript, I just prefer simpler solutions.
