Code Repo    |     RSS
MD's Technical Sharing



Monday, September 19, 2011

Blogspot bug: Google+ Share button and Google Friend Connect widget

Recently I observed that the Google Friend Connect widget that shows my site's followers on the left panel sometimes cannot be displayed. Refreshing the page did not help; clearing cookies and browser cache could only make it appear momentarily - the widget would disappear again eventually.

Firefox's error console (accessible via Tools>Error Console or Ctrl-Shift-J) and this post provide some hint:

The error messages are:

Error: window.googleapisv0 is undefined
Source File: https://apis.google.com/js/plusone.js
Line: 12

Error: google.friendconnect.container is undefined

The .js file used for Google "+1" button displayed at the end of every post is possibly conflicting with the js file for the Followers widget. As the both script files are obfuscated, it is not worthwhile for me to spend time investigating where the problem is. I ended up disabling the Share bar after every post by opening the Design tab of my blog settings, clicking Edit button at the bottom of the Blog Posts element, and unchecking Show Share Buttons


This would disable the entire set of share buttons even though I know I only need to disable the Google+ button. As there seems to be no way to show/hide each button individually, the only way to show only specific Share buttons (for example, share via Facebook) is to modify the page template and manually add in the code for the button.

Once you have manually modified the page template, always use the Edit HTML tab, and not the Page Elements tab to change the blog layout. Otherwise your changes may be lost and there may also be other unexpected results.

This is too much trouble, so the set of Share buttons at the end of every post in my blog will be disabled until this bug is fixed...
Read More »

Monday, May 31, 2010

Full RSS feed for blogger posts/comments

The official RSS feeds given by Google (http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=97933) only retrieve the latest 50 posts and 20 comments, even if the settings under Site Feed has been set to Full. This default behaviour is useful as readers are usually only interested in latest posts, but will be a problem if you somehow want the RSS feed to show your entire blog.

The solution is simple, just add a HTTP GET parameter to the official RSS URL. For example, if your RSS feed is:

http://blogname.blogspot.com/feeds/posts/default?alt=rss

The feed that returns the full blog is:

http://blogname.blogspot.com/feeds/posts/default?alt=rss&max-results=N

Same for comments, add the max-results parameter to retrieve all comments:

http://blogname.blogspot.com/feeds/comments/default?alt=rss&max-results=N

where N is the maximum number of posts/comments you want to retrieve.
Read More »

Sunday, May 24, 2009

Create a table of contents in Blogger.com

Well, there seems to be no built-in gadget to insert a table of contents of your blog. The 'Blog Archive' gadget can be customized a bit but that does not suit my needs. Luckily there is a simple way to do it:

1. Go to http://feedburner.com/and sign up for a free account. You can use your existing Google account.
2. Use your blog address as a feed.
3. Then, click on the Publicize tab. Then click on Buzz Boost. Configure the settings so that it'll only show the post title (e.g. uncheck everything). Then click 'Activate'.
4. You'll be given an HTML code. Go to your blog settings and create a gadget containing this HTML code.
5. Done! Now you'll alwayshave an updated TOC for your blog.
Read More »

Inconveniences while posting to blogger

This post summarizes some of the inconveniences I faced as a new user of Blogger.

Source code

I almost never posted source code to blogger before, so I did not anticipate this problem in advance. After a few hours creating posts containing code snippets, I decided to have a look at my blog's home page. Unfortunately the home page was distored! I had a hard time figuring out what the culprit might be, and in the end it turns out that the 'less than sign', or '<' is causing the problem. Obviously, the Google WYSIWYG editor does not automatically convert the "less than" (and other) symbols into their html equivalent in some cases. The symbol remains as-is in the HTML of the post and conflicts with other HTML tags, thus causing the distortion.

Captcha while posting

To prevent spam, if you made more than 50 posts per day, you'll have to enter a captcha every time you post.



Email posting is also disabled. You'll receive a delivery failure notification similar to below:

From: Mail Delivery Subsystem [mailer-daemon@google.com] This is an automatically generated Delivery Status Notification Delivery to the following recipient failed permanently: mdanh20021.mail2blogger@blogger.com Technical details of permanent failure: You have exceeded the the allowable number of posts without solving a captcha.

Auto-identification of spam blogs

This surprised me. After I made a few post, some of which contains link to my favourite websites, I received the following email:



When I visit my blog home page, there is also a warning that my blog is a spam blog. I clicked the link inside the email and stopped making more posts. Luckily, the following morning, the spam warning disappeared. I am just praying hard that this won't happen again!
Read More »