Technical Blog

New Inline Comments Form

Posted on

See this page for a similar hack for the new version of Blogger.

This hack does not work with Blogger BETA.

After considerable use and some feedback from both users and implementors I have redone my inline comments form hack. The new hack should be simpler, cleaner, and XHTML-valid. Previous implementors will have to remove the old hack before continuing.

You might also wish to check out the asynchronous version of this hack 🙂

This hack is now coComment-compatible.

  1. Word verification for comments must be turned off (to do this go to the ‘comments’ tab in your blog settings, scroll to ‘Show word verification for comments?’ and select ‘No’)
  2. Turn comment posting by anonymous users on (to do this go to the ‘comments’ tab in your blog settings, scroll to ‘Who Can Comment?’ and select ‘Anyone’)
  3. Insert the following code into the <head> section of your blog template :
    <script type=”text/javascript”>

    function toggleitem(postid,linkid,newtxt,displaytype) {
    if(!displaytype) {displaytype = ‘block’;}
    var whichpost = document.getElementById(postid);
    if ( != “none”) { = “none”;
    } else { = displaytype;
    if(linkid) {
    var lnk = document.getElementById(linkid);
    lnk.href = “javascript:toggleitem(‘”+postid+”‘,'”+linkid+”‘,'”+lnk.innerHTML+”‘);”;
    lnk.innerHTML = newtxt;


  4. Replace the <$BlogItemCreate$> tag with the following code:
    <!– COMMENT FORM –>
    <script type=”text/javascript”>

    var blogTool = “Blogger”;
    var blogURL = “<$BlogURL$>/”;
    var blogTitle = “<$BlogTitle$>”;
    var postURL = “<$BlogItemPermalinkUrl$>”;
    var postTitle = “<BlogItemTitle><$BlogItemTitle$></BlogItemTitle>”;
    var commentAuthorFieldName = “anonName”;
    var commentAuthorLoggedIn = “false”;
    var commentFormID = “cformtag<$BlogItemNumber$>”;
    var commentTextFieldName = “postBody”;
    var commentButtonName = “post”;
    var cocomment_force = false;


    <script type=”text/javascript” src=” </script>
    <ItemPage><a href=”javascript:toggleitem(‘cform’);”>Post a Comment</a>
    <div style=”display:block;” id=”cform”></ItemPage>
    <MainOrArchivePage><a href=”javascript:toggleitem(‘cform<$BlogItemNumber$>’);”>Post a Comment</a>
    <div style=”display:none;” id=”cform<$BlogItemNumber$>”></MainOrArchivePage>
    <form action=” onsubmit=”isSubmit=true;” method=”post”><div>
    <input type=”hidden” name=”blogID” value=”<$BlogID$>” />
    <input type=”hidden” name=”postID” value=”<$BlogItemNumber$>” />
    <h2 class=”sidebar-title form-title”><label class=”cbody”>Leave your comment </label></h2>
    <h2 class=”sidebar-title”> You can use some HTML tags, such as <b> &lt;b&gt;, &lt;i&gt;, &lt;a&gt; </b> </h2>
    <textarea name=”postBody” class=”comment” rows=”8″ cols=”40″></textarea>
    <h2 class=”sidebar-title identity”> Choose an identity </h2>
    <input type=”radio” name=”iden” value=”Blogger” checked=”checked” onchange=”toggleitem(‘cfo<$BlogItemNumber$>’);” />
    <label> Your Blogger display name </label>
    <input type=”radio” name=”iden” value=”Other” onchange=”toggleitem(‘cfo<$BlogItemNumber$>’);” />
    <div style=”display:none;” id=”cfo<$BlogItemNumber$>”>
    <table style=”margin-left: 4em;” cellpadding=”0″ cellspacing=”0″>
    <tr> <td colspan=”2″ style=”padding-top:.4em;position:relative;left:-4em;” align=”left”> These fields are optional, but I would appreciate it if you filled them out. </td></tr>
    <tr> <td> <label> Name </label> </td>
    <td> <div class=”errorbox-good”> <input type=”text” name=”anonName” value=”” maxlength=”100″ class=”text” /> </div> </td> </tr>
    <tr> <td> <label> Your web page </label> </td>
    <td> <div class=”errorbox-good”> <input type=”text” name=”anonURL” value=”” maxlength=”100″ class=”text” /> </div> </td> </tr>
    <div class=”diff-user”> Or you can sign in <a href=”;$BlogID$>%26postID%3D<$BlogItemNumber$>”> as a different user</a>.</div>
    <div class=”errorbox-good”> </div>
    <p class=”buttons”>
    <input style=”margin-right:.3em” name=”post” value=”Publish Your Comment” class=”publish” onclick=”isSubmit=true;” type=”submit” tabindex=”2″ />
    <input value=”Preview” type=”submit” name=”preview” onclick=”isSubmit=true;” tabindex=”3″ />

  5. Save your template and republish your blog

90 Responses

neuroendocrine pancreas tumor

” REL=”nofollow”>de eau hilton parfum paris ” REL=”nofollow”>military payday loans ” REL=”nofollow”>short term personal loans ” REL=”nofollow”>phentermine site ” REL=”nofollow”>propecia tablet

insurance life life whole

” REL=”nofollow”>major medical insurance rate ” REL=”nofollow”>investing brokerage online broker ” REL=”nofollow”>effects ionamin side ” REL=”nofollow”>maryland restaurants + keno lottery ” REL=”nofollow”>cost eye laser surgery

investment firm houston

” REL=”nofollow”>drug interaction ionamin ” REL=”nofollow”>keno patterns ” REL=”nofollow”>rochester lasik laser eye surgery ” REL=”nofollow”>laser resurfacing los angeles ” REL=”nofollow”>levitra play

senior life insurance

” REL=”nofollow”>lipitor long term side effects ” REL=”nofollow”>payday loan without direct deposit ” REL=”nofollow”>hydrocodone lortab ” REL=”nofollow”>work online make money free ” REL=”nofollow”>mesotherapy forum

how effective is celexa for panic attacks

” REL=”nofollow”>air business business cheap class flight flight fly ticket ” REL=”nofollow”>really really really cheap airline ticket ” REL=”nofollow”>chin double surgery ” REL=”nofollow”>cipro 250mg ” REL=”nofollow”>ultimate colon cleanser

alprazolam galactorrhea

” REL=”nofollow”>cheap ambien ” REL=”nofollow”>bad car credit loan refinance uk ” REL=”nofollow”>debt consolidation loan with bad credit australia ” REL=”nofollow”>american board of bariatric medicine ” REL=”nofollow”>best song in the world jack black

online schools

” REL=”nofollow”>online trading ” REL=”nofollow”>parfum ” REL=”nofollow”>payday loans ” REL=”nofollow”>personal loan ” REL=”nofollow”>phentermine

leg veins

” REL=”nofollow”>levitra ” REL=”nofollow”>lipitor ” REL=”nofollow”>loan ” REL=”nofollow”>lortab ” REL=”nofollow”>make money online

horny goat weed beauty

” REL=”nofollow”>hollywood horse park racing result ” REL=”nofollow”>hydrocodone international pharmacy ” REL=”nofollow”>knee injury settlement ” REL=”nofollow”>canadian canadian canadian canadian immigrant insurance insurance insurance medical travel travel travel ” REL=”nofollow”>foreclosure investing pre

paramedic online continuing education

” REL=”nofollow”>virtual online casino gambling poker ” REL=”nofollow”>online pharmacy rx ” REL=”nofollow”>as kiss play roulette russian we ” REL=”nofollow”>online trading game ” REL=”nofollow”>estee lauder parfum

instant online auto insurance quote

” REL=”nofollow”>canadian online pharmacy valium ” REL=”nofollow”>poker roulette ” REL=”nofollow”>genuine online trading forex ” REL=”nofollow”>armani parfum ” REL=”nofollow”>georgia payday loans

antique auto car insurance

” REL=”nofollow”>airport car national rental ” REL=”nofollow”>arkansas celebrex effects side ” REL=”nofollow”>airline cheap cheap discount discounted flight flight flight greece kos ticket ticket travel ” REL=”nofollow”>air cheap airline ticket ” REL=”nofollow”>double chin plastic surgery

bank of america cash advance

” REL=”nofollow”>lawyer montana celebrex ” REL=”nofollow”>air airfare cheap flight lowest ” REL=”nofollow”>cheap discount discount free free plane ticket travel ” REL=”nofollow”>chin photo reduction surgery ” REL=”nofollow”>cipro dosage

celexa depression

” REL=”nofollow”>cheap city flight new york ” REL=”nofollow”>cheap air plane ticket to mexico ” REL=”nofollow”>double chin reduction surgery ” REL=”nofollow”>cipro and pregnancy ” REL=”nofollow”>tony colon


Kiss you! I think this is the best site in the net I have ever visited!

Really, very nice site. I check it regularly!

Hydrocodone – Levitra – Ativan – valium
All Major Medications are available right here at:


Hi there,
I’m pretty new to all this code stuff so please could you help me out…
I keep getting the following message when I try to save my template with your code included…
How can I stop this?

“We were unable to save your template

Please correct the error below, and submit your template again.
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The content of elements must consist of well-formed character data or markup.”

online trading

For a list of online trading brokers and a profile of an online trading broker recommended by

others visit online trading

Stock trading links. Features tools, indicators and charts
online stock trading

வ�ுவ�ர் �ுமார்

Hi Stephen
I went thro this hack baut my template doesn’t have < $BlogItemCreate$>.Can guide me a bit?
Actually my concern is
I have a script in blog to write in my native language.When they type their comments and click send,the comment should go to the default comment box.But its not showing up in default box,propably hidden.How I give link between the default comment box and the posting box?.
I hope I made it clear.
Pl help me.
The way it works in your blog.


If you do not have a <$BlogItemCreate$> tag, just put the code right after the code that displays the comments.


HI! I just wanted to tell you that i really liked your site and you did a great job with it. Just for your note / has great music there.


If you do not have a < $BlogItemCreate$> tag, just put the code right after the code that displays the comments.

what do we look for?

Stephen Paul Weber

@Pednaud – this hack is known to basically not work at all anymore. Layout problems are likely the least of your worries 🙂 You might try one of the new hacks listed in the updates to the post 🙂


when i try to paste the first code , I’m getting error massages and also I cannot find tag in my template . can enyone help me please.




Im using classic blogger.

the hack doesn’t work bro, every time i clik on publish it redirects me to “HTTP method POST is not supported by this URL
Error 405″ and if change the method=”get” it redirects me to 404 php error….what should i do, any clue?



Im using classic blogger.

the hack doesn’t work bro, every time i clik on publish it redirects me to “HTTP method POST is not supported by this URL
Error 405″ and if change the method=”get” it redirects me to “Not Found Error 404″….what should i do, any clue?



so can you recommend me with one who works with my new classic blogger? (and sorry for the double post)

win now

Could you please send to me the contacts of developer of your site? It looks so damn good!


Can someone kindly help me out with with locationg “”
so I can accomplish the following step-:
“Replace the tag with the following code:” which is step no. 4 of this hack. For the life of me I cannot locate “” anywhere in edit html section.
Thanks a bunch.


Cool…i followed your instructions but messed it up somewhere, but what i was really looking for was the $BlogItemCreate$ tag because i found a pretty layout somewhere but it didn’t have the option for comments. but i like the idea of this even though i couldn’t get it to work.

Leave a Response