Comment numbering in Blogger

by Deineshd on October 19, 2008

Share


Last day when I was converting a wordpress theme into Blogger I saw the comment numbering in the wordpress theme and I tried to show the Comment numbering in that Blogger Theme.So I searched the hack to show comment numbering and Finally found that hack in randomness.

comment+numbering Comment numbering in BloggerIt was not so hard to show comment numbering in Blogger.It is just like showing commentators photo inside comments in Blogger.So I have brought this hack to you.Just follow the tutorial below.

Goto Blogger Edit Html page , Expand Widget Templates and Search for the Following block of codes.

<dl id=’comments-block’>
<b:loop values=’data:post.comments’ var=’comment’>
<dt class=’comment-author’ expr:id=’”comment-” + data:comment.id’>
<a expr:name=’”comment-” + data:comment.id’/>
<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’>
<b:if cond=’data:comment.isDeleted’>
<span class=’deleted-comment’><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<dd class=’comment-footer’>
<span class=’comment-timestamp’>
<a expr:href=’”#comment-” + data:comment.id’ title=’comment permalink’>
<data:comment.timestamp/>
</a>
<b:include data=’comment’ name=’commentDeleteIcon’/>
</span>
</dd>
</b:loop>
</dl>

Now in second step , replace the above block of codes with the following block of codes.

<dl id=’comments-block’>

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

<b:loop values=’data:post.comments’ var=’comment’>

<div class=” expr:id=’data:comment.id’>

<dt expr:class=’”comment-author ” + data:comment.authorClass’ expr:id=’data:comment.anchorName’>
<a expr:name=’data:comment.anchorName’/>
<b:if cond=’data:comment.authorUrl’>
<a expr:href=’data:comment.authorUrl’><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>

<span class=’comment-number’>
<a expr:href=’”#comment-” + data:comment.id’ title=’Comment Link’>
<script type=’text/javascript’>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter)
</script>
</a>
</span>

</dt>
<dd class=’comment-body’>
<b:if cond=’data:comment.isDeleted’>
<span class=’deleted-comment’><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>
<dd class=’comment-footer’>
<span class=’comment-timestamp’>
<a expr:href=’data:comment.url’ title=’comment permalink’>
<data:comment.timestamp/>
</a>
<b:include data=’comment’ name=’commentDeleteIcon’/>
</span>
</dd>

</div>

</b:loop>
</dl>

Now in last Step you need to style the numbering.For that add the following codes just above ]]></b:skin>: in your Template.

.numberingcomments{
float: right;
display: block;
width: 50px;
margin-right: 5px;
margin-top: -35px; /*comments-counter position*/
text-align: right;
font-family: ‘Century Gothic’,'Lucida Grande’,Arial,Helvetica,Sans-Serif;
font-size: 30px;
font-weight: normal;
}

/*since the numbers are actually links, we need to force the color properties*/

.numberingcomments a:link, .numberingcomments a:visited {color: #445566 !important; text-decoration: none !important;}
.numberingcomments a:hover, .numberingcomments a:active {color: #FF9933 !important; text-decoration: none !important;}

After you complete the above steps,Save the Template and see the comment numbering in your blog.If yu got any problem then let us know about it.

Consider to Subscribe to our RSS feed or Follow us at Twitter or Join our Facebook Fan Page.Enter your Email below to subscribe to our updates via Email.

Enter your email address:

Delivered by FeedBurner

Similar Posts

Powered by Thesis

Thesis Theme

An amazing WordPress Theme, nothing beats the versatility and SEO friendliness of the Thesis framework.

From beginners, to the most advanced WordPress developers, Thesis makes it easy for anyone to customize it.

{ 5 comments… read them below or add one }

techniqueal t. November 9, 2008 at 1:00 pm

cool hack!

Reply

.:Honey Tamil:. November 10, 2008 at 6:34 am

this is best and easy steps….THANX

Reply

Fernandooo1 November 17, 2008 at 4:48 am

Thanks for the publicity! XD

Reply

Stefani January 18, 2010 at 6:05 am

I would like to learn how to do this for the Blogger Classic templates.
.-= Stefani´s last blog ..Cool And FREE Twitter Tools =-.

Reply

ishan June 4, 2010 at 3:56 pm

One of the main feature of using third party comment system is Reply option to comments which blogger lack.
I recently saw this tutorial on How to add reply option to blogger comments and thought to share with you

Reply

Leave a Comment

{ 1 trackback }

Previous post:

Next post: