A Recent Comments widget for a private blog

A how-to workaround using IFTTT, Gmail and Twitter

Widgets for Recent Comments rely on RSS feeds which are necessarily public. For this reason blogging platforms do not provide Recent Comment widgets for private blogs which is a perennial request on internet forums.

I run a private family blog on Blogger and members are left unaware when someone posts a comment. Within the Blogger settings it is possible to send a notification email for each new comment but this is only useful if members read their emails, and for my family that would take a miracle so I need a list on the website.

5 steps to create a Recent Comments widget on a private blog:

  1. Create a feed on Twitter specifically for the blog; you can name it anything you like so that it does not refer to the blog. Twitter does not make public the information on private feeds so in order for the information to be transmitted to your blog you will have to make your feed public – however it will still not be linked to your blog. Some of the members of my family are very suspicious of the internet so I have ensured that only the title of the post appears in tweets along with the title of the blog (which is unavoidable but I do have suggestions to disguise it if necessary).
  2. An optional step – disguising the site title

    Although the title of the blog appears in tweets there is no indication that it is hosted on Blogger as opposed to any other blogging platform so if someone did happen to find the Twitter stream it would not be apparent where to trace the blog, however they could try searching: as a minimum measure you need to disable search engine visibility in the Blogger settings if you have not already done so.

    A more determined person could attempt to trace your site from the title by adding random extensions from each blogging platform, such as ‘.blogspot.com’. For this reason I would suggest making the title different from the web address; in other words if my blog had the title ‘A Family Album’ I could choose the web address ‘asecretfamilyalbum123.blogspot.com’. In this way even if a determined hacker added every known blogging extension to the title he would not reach the login page – and as I said it is only the title that will be revealed by Twitter. If you are as paranoid as some of the people in my family you can change the web address in the Blogger Settings to make it different from the title (but obviously notify your blog members or they will not be able to find it either).

    If you do not want to change the web address an alternative would be to disguise the title of the blog by listing it as ‘xyz’ in the Blogger settings (this is the title that will be used in Tweets). You could then upload an image to the header of your blog showing the real title on your webpages regardless of what you’ve listed in the settings.

  3. Within Blogger settings under ‘Mobile and email’ I added my own Gmail address to the box for a Comment Notification Email.
  4. I used the website IFTTT to create a rule whereby if I my Gmail account receives an email from ‘noreply-comment @ blogger.com’ then the subject line is automatically tweeted by my Twitter account. For people unfamilliar with IFTTT it’s a website that enables you to create rules that allow one web service (in this case Gmail) to trigger another (in this case Twitter). The trigger is not instantaneous – it can take up to 15 minutes for the recent comment notification to appear on your blog. If you join IFTTT you can copy this ‘recipe‘ (which is the IFTTT term for ‘rule’). I have used the email subject as my ‘ingredient’ but if you change it to body your tweet will show the content of the email which will include the screen name of the commenter and the comment itself up to 140 characters.
  1. Within Twitter I went to the Twitter Widget creation page in Settings to create a widget that listed my Tweets then copied the code that it generates (the instructions are simple and can be found on Twitter).
  2. In my blog settings I went to the Layout page where I added the Blogger gadget titled ‘HTML/JavaScript’ and pasted the code from Twitter. I gave it the title ‘Recent comments’.
    At the top of the code there is a link element – if you paste the following snippet between the ‘a’ tags it will minimise the ‘Twitter look’ and make the widget transparent:

    data-chrome=”nofooter noborders noheader noscrollbar transparent”

The result is a widget that announces recent comments on a private blog. You can set the height and the number of comments to be shown. The styling of the resulting image can be transformed to match the styling of your website using CSS.

Recent comments on a private blog

The wording of the tweet follows exactly the wording of the Blogger notification subject line; unfortunately the square brackets around the blog title are part of the formatting by Blogger and cannot be removed. To make the avatar more relevant you could upload a theme-inspired image to the Twitter account.

I consider this to be a very involved workaround which will not be suitable for all users, and I would suggest that most people who choose Blogger do so because they do not want to become involved with how the web works under the hood. But I hope it does provide developers with an idea to make a simple Recent Comments widget that works properly – if the information exists in XML then there must be a way to transform it into something that users are asking for, ideally without sending that information outside of a private blog to the other side of the web only to send it back in again.

If you can think of a way to improve this method please let me know in the comments.

IFTTT could so easily be on this list of my essential tools for blogging: 9 blogging tools that I use (and one that I can’t).

  • new blogger

    hi, i also have set up a private family blog on blogger. is there any work-around so that family members can get updates by email of new posts?

    thanks in advance!

  • or notice, i should say. they’d like to get an email when i post something new, so they know when to check the blog. thanks!

    • Hi, no problem, if you go to Settings and then the section ‘Mobile and Email’ there is a box titled ‘Comment Notification Email’ where you can enter the address of anyone you want to receive an email whenever you post an article.

  • Caroline

    Hi,
    I have only one thing to tell you : THANK YOU :-)
    I’ve been looking for this kind of wigdets for weeks. I’m french and I fist tried to find a solution on the french web… Your solution was quite difficult for me because I’m not a developer but thanks to your exlanations : I managed !!!
    Encore une fois, merci pour tout.

    • I am so pleased you like it! Thank you for this lovely comment, je suis ravi!