- WARNING: This script is not being supported anymore since I moved to a much better blogging system with WordPress.
If you don’t want your blog visitors to be redirected to blogger.com website just to write a comment for your post, you are in the right place.
This page will show you how to include a comment form directly into your post page, just as you can see in this very page, bellow. After installing this solution in your blogger.com blog you’ll feel an instant increase in the number of comments people write for you, because a comment form right in the face of your visitor is way more intuitive and inviting tsule with nowadays blogger.com interfaces, and stepped out from a hack status into a clean, functional and well documented solution.
PLEASE, write a comment here, including a link to your blog so people can know who else is using this solution.
PLEASE, do not make test in this post. PLEASE, leave it for real comments or support questions. PLEASE, use this post to test the form.
- Download this script and make it available somewhere on your website, for example from the URL http://my.website.com/resources/bloggerCommentForm.js (this is the URL we’ll use in our examples).
- Edit your blogger.com template and look for the end of the HTML header marked by the </head> tag.
- Right before the header ending include the following piece of code in a way that everything will look like:
- Save your template and republish your blog.
- Visit one of your posts page, see if the form appears, and try posting some different comments as different users.
Configuring the Form
You can configure the form, specialy for internationalization, in a very clean way without having to change the code. For example, look how it looks in a brazilian portuguese blog post.
- For that, edit your template again and look for the script initialization part you just included in the <head> section.
Additionally, you may want to change the target links in your template to make them point visitors to the comment form in the post page. For example, I have the following piece of code in my template that renders each post footer:
<p class="post-footer"> <em><$BlogItemDateTime$></em> | <a xhref="<$BlogItemPermalinkUrl$>" title="permanent link">permalink</a> <BlogItemCommentsEnabled> <a class="comment-link" xhref="<$BlogItemPermalinkUrl$>#postcomment"><$BlogItemCommentCount$> comments</a> </BlogItemCommentsEnabled> <BlogItemBacklinksEnabled> <a class="comment-link" xhref="<$BlogItemPermalinkUrl$>#links" >links to this post</a> </BlogItemBacklinksEnabled> <$BlogItemControl$> </p>
This script is free and licensed under the LGPL.