Possible Advantages:
* It is a nice way of differencing/identifying each comment (it’s a great feature for giveaway posts!).
* It allows you to get the permalink of each comment, and this may work for future references (e.g.: “You should read this comment [URL goes here], I found it very interesting.”)
* Indispensible for design purposes.
* It allows you to get the permalink of each comment, and this may work for future references (e.g.: “You should read this comment [URL goes here], I found it very interesting.”)
* Indispensible for design purposes.
Possible disadvantages and limitations:
* If your comments are paginated, the counter will reset in each comment page. In Blogger, comments are paginated if they surpass the 200.
* The process requires code modification in several places, so that is not recommended for the beginner bloggers.
Results:
Steps involved in implementing this trick
1. Login to your Blogger Dashboard
2. Go to Template >Edit HTML
3. Choose to expand your Widget templates.
4. Find this line of Code
<dl id='comments-block'>
and replace it with
<dl id='comments-block'>
<script type='text/javascript'>var CommentsCounter=0;</script>
5. Now find this line of code
<dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
and replace it with
<dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName' style='clear: both;'>
6. Now find this line of code
<data:commentPostedByMsg/>
and replace it with
<data:commentPostedByMsg/>
<span class='numberingcomments' style='float: right; font-size: 20px;'>
<a rel='nofollow' expr:href='data:comment.url' title='Comment Link' style='text-decoration:none'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter);
</script>
</a>
</span>
So you should have it working in just 3 replacement steps. If everything went well, you should now have a numbered commenting system on your blog.
Sources and Additional Information:
No comments:
Post a Comment