35 Inline comments for classic Blogger templates
October 08, 2007 /

After posting the hack for inline comments in Blogger layouts templates, I was asked if the same is also possible for classic html based templates. The answer is "yes" it is certainly possible! So for the benefit of those using classic Blogger templates (non-layouts) I will explain how to edit your template to feature inline comments on post pages.

The hack for inline comments in classic templates is perhaps a little simpler than for layouts templates, and is very easy to do. Also it is possible to preview the changes with classic templates (including seeing your post pages) so that you can be sure the inline comments act correctly before saving your template.

Here is my step by step guide:

  • First of all, make a back-up of your template by copying the whole of your existing template into a text editor. This is just a precaution in case you make a mistake and need to restore your template at a later point.
  • Next, go to the settings section of your Blogger dashboard and click on "Comments". You need to choose "Show comments in a pop-up window" for this hack to work effectively. Save this setting, then go to "Formatting". Choose "Enable post pages" if you have not already done so, then save this setting too.
  • Next open the "Edit template" section and search for this section in the template code:
    <p class="post-footer">
    <em><$I18NPostedByAuthorNickname$> <$I18NAtTimeWithPermalink$></em>
    <MainOrArchivePage><BlogItemCommentsEnabled>

    <a class="comment-link" href="<$BlogItemCommentCreate$>"<$BlogItemCommentFormOnclick$>><span style="text-transform:lowercase"><$I18NNumComments$></span></a>

    </BlogItemCommentsEnabled><BlogItemBacklinksEnabled>
    <a class="comment-link" href="<$BlogItemPermalinkUrl$>#links"><span style="text-transform:lowercase"><$I18NLinksToThisPost$></span></a>
    </BlogItemBacklinksEnabled>
    </MainOrArchivePage> <$BlogItemControl$>
    </p>
    Change the line highlighted in red to this instead:
    <a class="comment-link" href="<$BlogItemPermalinkUrl$>#comments"><span style="text-transform:lowercase"><$I18NNumComments$></span></a>
  • Next, find the comments section of your template. This may be highlighted by comments to explain what the section is for, and should look something like this:


    This section of code displays comments on post pages, and also provides the link to the comments pop-up page. We need to hide this section, rather than delete it, and also add code to display the iframe which will contain both existing comments and the "create comment" box.

    Take a look at the modified comments section below, and add all of the code which is highlighted in RED:
  • At this point, you may want to preview your template to ensure everything looks okay. You can click on the item titles to get to the post pages and preview the inline comments too! (this is something we "layouts" users are unable to do).
  • If all looks okay and the inline comments appear as they should, then save your template and enjoy your new inline comments feature!

I have tested this extensively on one of my test blogs and have found this seems to work fine in both Firefox and Internet Explorer browsers. When you view post pages in IE, you may receive a notice that you are viewing pages over a secure connection; this is because Blogger's commenting system uses a secure connection, and since you are viewing comments inside the post page, the secure connection is activated.

I hope this enables classic template users to feature inline comments in their blogs too! Please feel free to leave your comments and suggestions below.

Technorati Tags: | |

Author: Amanda Kennedy

Amanda is a professional blogger and web designer living in Sheffield, United Kingdom.

In addition to curating Blogger Buster, you can find Amanda on Twitter, Facebook or add her to your circle on Google+.

Like to share?

You may also like to subscribe to Blogger Buster's RSS feed or receive free email updates of our latest posts.

35 Comments:

  1. just trying out

    ReplyDelete
  2. I've applied in my blog, and it's a big success, thank you Amanda for writing this hack online.

    ReplyDelete
  3. At last! An inline comment hack that ACTUALLY works!

    Well, nearly works. I can't get the 'close this window' link on the comments box to work.

    ReplyDelete
  4. am i missing something here? i tested and it looks exactly the same. my main page does not have inline comments and when i click on 'comments' it opens a new window with inline comments (which it does without this code as well). am i assuming incorrectly thinking this would put inline comments on all my posts on the MAIN page? thanks in advance!

    ReplyDelete
  5. so hard to understand.. so hard to implement.. =(

    ReplyDelete
  6. Hi, I was wondering if there was a way to have related posts in classic blogger. Thanx.

    ReplyDelete
  7. I couldnt find this codes on mine.
    but I found it on my old one.
    both classics why?

    ReplyDelete
  8. Very good site, I will recommend to my group of friends, ----> How can I be part of an Internet Marketing Affiliate Program? Someone has the answer?

    ReplyDelete
  9. Hello, I could not get the code section in the windows of this page to come up. It just keeps saying "service is temporarily unavailible."

    Thanks,

    Wade

    ReplyDelete
  10. This is so frustrating. I wished this worked for me. I absolutely ADORE my template and do NOT want to give it up, but I just can't get comments to work for me. Not even with this.

    ReplyDelete
  11. I think is useful. I just try out.

    ReplyDelete
  12. thank you so much! been searching this since forever! my template didnt have all the codes but being a smart girl that i am i cpoied all the code given above & pasted it to my blog editor. now it is all solved! i literally made my own comment section now, didnt i? thanks again! :)

    ReplyDelete
  13. hi, i tried to do it.
    it shows the posted by author, 0 comment and a pencil icon.
    when i tried to test whether it works, i clicked the o comment button but nothing happened accept that it shows the specific post that we want to comment.
    i tried to click the pencil icon but it brings to the edit posts. please help me as soon as you can. i appreciate it. thanx.

    ReplyDelete
  14. please help me!
    it works only for some posts only.
    why did this happen?
    another posts also shows the posted by author and the pencil icon but not the '0 comment' which we have to click to write the comment.please help me please.

    ReplyDelete
  15. Hi - two of the example html codes arent showing up any more. I'm having problems getting the comments to show up with my customized template and I think your codes will do the trick. Please help!

    ReplyDelete
  16. yahooooo~ my comment box finally worked out!
    thx so much~~

    ReplyDelete
  17. can you please update this post? I am having problems with my classic blogger comment form... and i think this is the only thing reliable i can find. please.

    ReplyDelete
  18. i don't have the "p class="post-footer"..." code in my html template. what should I do? :(

    ReplyDelete
  19. can you please update this? the dialogue boxes aren't working. thanks! :)

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. i think this is the same post... http://bloghack20.blogspot.com/2008/04/tricks-makes-comment-box-inside-post-at.html

    btw how to change the background of the iframe?

    ReplyDelete
  22. ok, so I can not find the HTML that you said to look for at all. What should I do? Can I insert the whole thing myself? If so, where?

    I would REALLY appreciate any of your help. I hope that you are having a wonderful day! :)

    ReplyDelete
  23. can anyone help me with my template? i love it to bits and pieces and would appreciate a comment box on every single post!

    ReplyDelete
  24. i like this post.thanks to post it.i will back every day because it is very helpfull to me.i love news post!

    ReplyDelete
  25. I just want to know if the codes above are working. I see the two examples are google error.

    ReplyDelete
  26. I am thoroughly convinced in this said post. I am currently searching for ways in which I could enhance my knowledge in this said topic you have posted here. It does help me a lot knowing that you have shared this information here freely. I love the way the people here interact and shared their opinions too. I would love to track your future posts pertaining to the said topic we are able to read.

    ReplyDelete
  27. Thanks for taking the time to discuss this, I feel strongly about information and love learning more on this. If possible, as you gain expertise, It is extremely helpful for me. would you mind updating your blog with more information

    ReplyDelete
  28. I think that your steeps are the first ones in the computer programming, I like to read more about it.. this is so interesting

    ReplyDelete
  29. Hi, could someone please help me with my template?
    I wanted to add the html shown in this blog post to my template but I realized that I have no html for the layout of my posts!!

    www.dancesingirl.blogspot.com

    ReplyDelete
  30. good information thanks for sharing it

    ReplyDelete
  31. Excellent post! I'm studying php. and html. and the codes you post here are the codes that I was looking for to work on a blog of a friend. Great post!

    ReplyDelete
  32. Can you post some blogger components? it would be so nice!

    ReplyDelete
  33. cheap uggs outletThis is the array of flowers will one thousand spiritual Heaven, heaven and earth has been closed, escape, can only fight them off the hook, have a chance of survival.discount ugg bootsLarge array shape, chill atmosphere, and shrouded from.discount uggs.

    ReplyDelete
  34. great site, it is useful! thank you for your sharing! xxv

    ReplyDelete

Great! You've decided to leave a comment! Please bear in mind that comments are often moderated and that rel="nofollow" is in use and spammy comments will be deleted. Let's have a meaningful conversation instead. Thanks for stopping by!

Browse through the Archives

All existing posts are still available to view while I'm working on the site, albeit seen in a much simpler interface. Feel free to browse through the archives to find tutorials, templates and articles to help you build a better blog:

Blog Archive

© Blogger Buster 2010 Home | About | Contact | Hire Me