
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.
Live Demo 1 Live Demo 2 in Sidebar
Get the script at GitHub:
›› https://gist.github.com/vinayprajapati/4956310
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?
Simple, add a HTML/Javascript gadget, paste this script in that and Save the gadget. You're done! You can easily drag this gadget to desired position in sidebar.
›› Blogger Dashboard ›› Layout ›› Add a gadget ›› Add a HTML/Javascript gadget ›› Paste code ›› Save gadget ›› Done.
Bug fix:
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'/>›› Learn basics of Blogger template editing
Post a Comment