I am presenting a most advanced recent comments widget for Blogger. I am thankful to Mr. MS-potilas who is original author of it. I am just slightly changing this widget to make it more powerful for my readers. You have to just change my name ‘Vinay Prajapati’ in line number 88 and 110 with your name if you’re keen interested to show just blog readers’ comments rather than yours. Hiding own comments is a good idea if you reply frequently on blog readers comments because if you have 5 comments to reply and you give 5 replies then all old widgets will show only your comments in the widget and this looks very bad.
The main features of this recent comments widget are as follows:
- Able to hide blog author’s own comment
- You can set number of comments to display
- You can also set maximum number of comments per post to prevent flood from a single post
- You can set the length of comment for the widget to display
- You can translate this widget for own language like Hindi, Gujarati, Tamil & others
- If you are displaying blog author comments you can highlight author
- You can simply configure commentators profile images, blog favicons and non-registered user image
- Avatar size can be easily configured.
Get the script at GitHub:
Recent comments for Blogger script possible customizations
- numRecentComments: Number of comments to display in widget
- numPerPost: Maximum number of comments per post to prevent flood from a single post
- maxCommentChars: Number of characters of reader’s comment to show in widget
- maxPostTitleChars: Set length of post title or set 0 if you wan to display full title
- txtWrote: Customize ‘wrote’ word as per your choice
- txtMore: If comment is longer then a customized ‘Continue ››’ message will appear you can change it.
- txtToolTip: A text to display when you hover at name of commentator
- txtAnonymous: If your language is English then nothing to change else write custom synonyms for Anonymous in your langauage
- getTitles: if set true, fetch titles from post feed and if set false then titles are generated from permalink
- trueAvatars: if set true, uses Blogger profile images from comment feed else Blogger default favicon
- maxResultsPosts: Let it be empty or for example “&max-results=100” where 100 is number of posts to get from posts feed to get post titles
- maxResultsComments: Let it be empty or for example “&max-results=300” where 300 is number of comments to get from comments feed
- sizeAvatar: You can define the avatar size default is 32px. It is better to choose avatar size in multiple of 8 i.e. 8, 16, 24, 32, 40, 48, 56…
More important if you want to show the blog author’s own comments and replies in this widget you can refer MS-potilas old script. ›› https://gist.github.com/vinayprajapati/4956108
For this you can also configure two more variables in this script:
- urlMyAvatar: Leave it as it is if want to display default profile avatar else define image link for custom avatar
- urlMyProfile: Leave it as it is if want to display default profile url else define custom profile url i.e. Facebook, Google+, Twitter or others
How to use any of these scripts on my blog?
If you are using older version of internet explorer 7 or 8 and have problem in this widget then you can change following meta tag given below in Blogger template. Find this line somewhere below <head>
<meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/>
and change this line with the following code:
<meta content='IE=edge' http-equiv='X-UA-Compatible'/>
Please leave comment have something to say or share with us.