Blogger Tips - Customize Comment Message

* For the time being I advise against using this modification. I need to look into some issues that arise from it. When the issues have been resolved, this notice will be removed*

I had been looking for a way to customize my blogs comments. I wanted to do away with the boring "X Comments" link. I found what I wanted but it seemed to be only half what I sought. Experiment Garden is where I found the change but the text was only changed once viewing the whole blog post and not the comment count on the home page. So I set out to fix this.

For the first bit, you can follow what Experiment Garden had to say. This will change what readers see when they click on a topic and scroll to the bottom where they comment. Clicky here for that.

The second bit changes the way comments are seen while on the home page or browsing through posts. This is what you do.

1. Open layout -> Edit HTML.
2. Expand widgets.
3. Locate the following...
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a>
Replace it with...
<b:if cond='data:post.numComments == 0'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>Be the first to reply!</a>
<b:else/>
<b:if cond='data:post.numComments == 1'><a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
  1 <data:commentLabel/> so far.  What are your thoughts?</a>
<b:else/>
  <a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
  <data:post.numComments/> <data:commentLabelPlural/> so far.  What are your thoughts? </a>
</b:if>
</b:if> 
If you have any questions, leave them in the comments below.

6 Comments

  1. Neha Kamath said...

    thanks for your help.

    its seems to have worked but only partly.

    if the comments are more than 1, it shows the message but its not clickable to add moe comments.

    could u pls help me sorting that out?

    Neha Kamath said...

    I figured it out with knowing 0 html :)
    Thanks for the help. You helped me do 90% of it.

    I tried posting it but it didn't allow me to.
    Anyway u missed the link line right before the last line.

    Good to see you were able to figure it out. I do not know a lot about html either, I mostly tinker with things until they give a desired result.

    I made the change to the post and it now includes the corrected html. Thanks for pointing it out so clearly.

    Neha Kamath said...

    here's another thing ive noticed.
    so my comments link doesnt completely work properly.
    sometimes to post comments one has to keep saying comment 2-3 times before actually being able to comment.
    also when i check my blog from my phone im unable to open comments.

    do u know what i could do?

    I have not encountered the issue you have but to be safe I am going to do some testing. I have a feeling that this modification may also cause issues when trying to hide labels. I am going to look into both problems when I have some free time.

    Thank you so much! I ended up replacing the stuff between the s with the code from this page:http://www.experimentgarden.com/2009/06/customize-blogger-comment-message-to.html

    BUT, I needed your <a class='comment-link' expr:href='data:post.addCommentUrl' to know where to post it.

    --Jaclyn T
    Silver Twig Necklace GIVEAWAY @ my blog:
    http://positiveponderings.blogspot.com/2011/09/necklace-giveaway.html

Post a Comment

Original theme by Newwpthemes. Modified by MaximusJacobus.