Simple ways to add “Recent Comments” widget in your Blogger( blogspot) Blog
Two readers( our followers), one from Malaysia and other from United States of America, ask us about any ways to add Recent Comments in their blog. We were very happy to answer them through this post.
Benefits of adding a “Recent Comments” widget
Before blogging, serious bloggers should know the power of comments. A sincere comment with a link back to a website or blog will definitely noticed by Search Engines. Such valuable links will help to boost your Page Rank also. So Always remember the “Power of Comments” and try to give some value comments whenever you visit a blog.
This widget will help the Search engines to crawl easily through the Comments and the Commenting blogs and commented post will get much higher appreciation from crawl robots.
This widget will display 5 recent comments from your posts with date, full structure of comment and title of the post.
This will help readers to know what others feel about your blog and your posts. If you usually receive good comments, then installing this Widget is an excellent way of announcing that to all.
The more comments you receive, then you will get more readers as reader psychology is to read what others read.
All blogger blogs, please follow all steps carefully:
Step A:
Log in to your “DASHBOARD’. Then click on “LAYOUT” and then go to “PAGE ELEMENTS”
Step B:
Now Click on “Add a Gadget”. This will reach a page where you can select many widgets. Select “HTML/JavaScript”. After selecting this you will get an Empty widget box where you had to paste the below given HTML. Don’t close or logout. Stay cool and do what we describe in Step C. Before pasting, give a Title “ Recent Comment Box”
Step C:
Now select and copy the whole code given below( given in purple colors) and paste it in the widget box you have just opened in Step B.
<script style="text/javascript">
function showrecentcomments(json) {
var numcomments = 5;
var showcommentdate = true;
var showposttitle = true;
var numchars = 100;
for (var i = 0; i < numcomments; i++) {
var entry = json.feed.entry[i];
var alturl;
if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) {
if (entry.link[k].rel == 'alternate') {
alturl = entry.link[k].href;
break;
}
}
alturl = alturl.replace("#", "#comment-");
var postlink = alturl.split("#");
postlink = postlink[0];
var linktext = postlink.split("/");
linktext = linktext[5];
linktext = linktext.split(".html");
linktext = linktext[0];
var posttitle = linktext.replace(/-/g," ");
posttitle = posttitle.link(postlink);
var commentdate = entry.published.$t;
var cdyear = commentdate.substring(0,4);
var cdmonth = commentdate.substring(5,7);
var cdday = commentdate.substring(8,10);
var monthnames = new Array();
monthnames[1] = "Jan";
monthnames[2] = "Feb";
monthnames[3] = "Mar";
monthnames[4] = "Apr";
monthnames[5] = "May";
monthnames[6] = "Jun";
monthnames[7] = "Jul";
monthnames[8] = "Aug";
monthnames[9] = "Sep";
monthnames[10] = "Oct";
monthnames[11] = "Nov";
monthnames[12] = "Dec";
if ("content" in entry) {
var comment = entry.content.$t;}
else
if ("summary" in entry) {
var comment = entry.summary.$t;}
else var comment = "";
var re = /<\S[^>]*>/g;
comment = comment.replace(re, "");
document.write('<br/>');
if (showcommentdate == true) document.write('On ' + monthnames[parseInt(cdmonth,10)] + ' ' + cdday + ' ');
document.write('<a href="' + alturl + '">' + entry.author[0].name.$t + '</a> commented');
if (showposttitle == true) document.write(' on ' + posttitle);
document.write('<br/>');
if (comment.length < numchars) {
document.write('<i>');
document.write(comment);
document.write('</i>');}
else
{
document.write('<i>');
comment = comment.substring(0, numchars);
var quoteEnd = comment.lastIndexOf(" ");
comment = comment.substring(0, quoteEnd);
document.write(comment + '...<a href="' + alturl + '">(more)</a>');
document.write('</i>');}
document.write('<br/>');
}
document.write('<br/>');
}
</script>
<script src="http://yourblogname.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments"><!—Recent Comment Box generated by http://businessvartha.blogspot.com --></script><a href="http://businessvartha.blogspot.com/2009/05/add-recent-comments-widgets-in-blog.html">Get This Recent Comment Widget!</a>
Very important :
- Replace http://yourblogname.blogspot.com ( given in RED bold letters) with your blogspot URL or your website URL. Do not try to change anything from the code
- Copy all the script given in purple colors till </a> without any change
Step D:
Now Save and if you need to rearrange the position of that widget, then Click,hold the mouse button and move to your desired place in “Layout”. Now again “ Save Template”
Step E:
Reload or refresh your blog and see the new widget. Now the most important step, after installation, comment on this post and drop your blog address. We will check how the new widget help the spider crawl by search engines.
Hope you may love to read:
1. REPAIR OR RESTRUCTURE YOUR BLOG
2. INDEX YOUR BLOG IN YAHOO IN FIVE MINUTES




















Very Good Tips. Unfortunately , I could not copy the codes.
well, its easy to copy, still if u feel trouble, just let me know..i will send the code in email to you
Very nice post!
You are updated$ today,as promised.
Hope to see you!
THANKYOU DAVID
Hi! So i found time to visit ur blog:)
And immedately grab ur comment gadget.
As we are friends from the awards*, how about exchanging links? As u anyway have now 1 from me...
take care
Remo
http://cin-ceo.blogspot.com/
Thank you Mr Remo, for your kind words. You are invited to GUEST WRITE in my blog. Hope you will email me the article with three links of all your blogs to krishsecond@yahoo.com
Thanks for the nice comment on my blog. I'm loving yours too - very informative!! I'll be voting for you...
www.crazypeopleiveworkedwith.com
As we are friends from the awards*, how about exchanging links? As u anyway have now 1 from me...
take care
http://www.moremony.com
hi friend ,Very Good Tips. Unfortunately , I could not copy the codes.
Dear Mr Babu, Please try in a diffrerent bowser. This usually happens when some plugin are not fully functional in your browser. Either u can refresh the page or try in a different browser
Thankyou Crazy, Moremoney and Babu for you Visit
ya..i have added the widget..nice one..
hi
awesome blog....i added the widget but its not working dunnu why/sad...plz check it & tell me if i've done anything wrong...my blog's url is
http://styleuplife.blogspot.com/
thanx in advance
Dear Shabnam, We have inspected your widget and found that there is a small error in your blogname you have given at the end portion of your blog. you put like this http://styleuplife.blogspot.com//feeds HOPES THAT YOU NOTICED THE TWO SLASHES AFTER YOUR BLOG NAME. NOW REMOVE ONE FROM THAT AND SAVE. THIS WILL DEFENITELY HELP YOU. Still have problem? let us know. Happy Blogging
thanx a million Kris for u visit & ur guidance....God bless u
Thanks for letting me know about the Recent Comment Box. I have added it to http://wild-facts.blogspot.com/ and it looks great.
With any luck this will help generate more comments on my blog. I have really found your website useful as I set up my own personal blog so thank you for everything.
Nathan at Wild Facts.
please leave your comments
hi
i installed ur recent comment widget at my blog but its not working properly..its showing only 2 comments not all comments ....plz visit & help me...thanx in advance
http://bookshive.blogspot.com/
Dear Shabnam, Thanks for using this Widget. We have inspected your widget. Please find, the script in that Widget Code var numcomments = 5; AFTER finding that , just change 5 to 12. SAVE and Then please place the widget below Blog archives. The above said script is in third line from the top of the script. Please be careful not to change anything else. Hopes that this will help you to solve your problem. If you still feel trouble, please feel free to ask us.
Thank you
my blog url is
http://bookshive.blogspot.com/
hi kris
thanx a million for ur reply & help...i did the same as u suggested but the problem is still there plzzzzzzzzz help..
Dear Shabnam Ahsan, We inspected the widget again.We found that the comment form in your blog is Powered by "Disqus".This widget will not pick comments powered by Disqus, because Disqus is tracking comments in a different way. Any comments that is posted in the comment form of Google Blogger as done in the showing two comments, will be picked up by this widegt and will show in blog. Any way we are developing special for "disqus" but till that, you may try by removing disqus and use the original blogger template comment form.
If you have any doubt, please feel free to comment.
Thank you
Hi if your looking for a new Gadget come to www.gadgetsark.com, very good gadgets review.
hi
i've changed my template than i installed ur recent comment widget but its not showing comments plz visit & inspect if i've done any mistake in instalation....thanxxxxxx in advance...my blogs url is
http://bookshive.blogspot.com/
Dear Shabnam, Thanks for installing the widget. You have selected an excellent template. congrats for selecting that. Well, we have inspected your widget. You may please read the article full before installing. We have found that you didnot change the http://yourblogname.blogspot.com with the name of your blog. Please see that it is given in red letters in the entire code. Please dont change anything else in this code.Also remeber to copy the whole code till the last letter a. We recommend that you may please delete the existing widget, copy the code again and past in the HTML box of blogger and then edit it there. and save. If you still feel trouble, then please feel free to ask us. We are at your service
hi kris
thanxxxxxxxx a bunch for visiting my blog,liking my template & helping me to installl the recent comment widget correctly....may God help you alway & in every difficult situation ameen