Numbering comments in blogger

by Reeze on April 10, 2009

Here is a quick preview of how it will look like.Just check the numbering system of the comments in the preview below.


commentss Numbering comments in blogger

I have made it simple for people who just wants the incrementing numbers in the comments.
You just have to add small piece of Javascript in 2 different places.

Ok, Now lets start with adding the code.

Go to Layout>Edit HTML in your dashboard. Check the “Expand widget templates” box, then search for this section of code and add the 2 Piece of code colored in red in their respective places

Part 1 : Initialization

Search for this line: <b:loop values=’data:post.comments’ var=’comment’>

and add this code in red just BEFORE the above line

<script type=’text/javascript’>var CommentsCounter=0;</script>


Part 2 : Looping the numbers

Search for this line: <b:if cond=’data:comment.authorUrl’>
and add this code in red just BEFORE the above line

<script type=’text/javascript’>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter+&quot;.&quot;)
</script>

Check the screenshot below for reference ( Some codes may be Different )

comment Numbering comments in blogger

Click on Preview. If your blog runs without any errors then,your are done. Save the template

Related posts:

  1. 15 Firefox Addons for productive Blogging

{ 2 comments… read them below or add one }

Agreevecize April 27, 2009 at 7:13 AM

HotaSantmit ArtistAerosse

Reply

Sasya June 9, 2011 at 12:13 PM

if it doesn’t work, simply change all ’ to ‘ (retype apostrophes)

Reply

Leave a Comment

Previous post:

Next post: