October 30, 2006

Peekaboo Navbar

It's the season of Peekaboo everything and peekaboo everywhere. So, why not make Blogger navbar also Peekaboo style? Avatar at Bloggeratto has described how to do this in your Beta blog. With this hack, navbar remains hidden by default but one can see it when he moves his mouse to the top of the page. If you are interested in this, check this out.

October 20, 2006

Happy Diwali!


I wish all my readers from India a very happy Diwali/Deepavali! I am a native of India too. For all others, Diwali, known as the "Festival of Lights", is one of the famous festivals celebrated in India.


And if you haven't yet read the news of Hoctro (label tabs creator) becoming a father, here's his proud announcement.

October 17, 2006

Widget auto-updation and Backlinks issue

Phydeaux3 discovered that Blogger Beta auto-updates the widget templates. When you click on "Expand widget templates", the code that you see for a particular widget might vary slightly from time to time. Pete from Blogger clarified that they use this to fix the bugs. I think that's a great idea. But the downside is that this auto-update doesn't happen for the widgets that you have hacked.

Phydeaux3 found that his Backlinks stopped working after one such update because he had hacked the Blog widget. I checked my blog and it was the same case too. It's a good idea to check your blog also (specifically if you applied peekaboo posts hack). If you have the problem, here's the fix that worked for me.

Search for 'backlinks-container' in your template to find this portion of code and add the lines in red. This is the update from Blogger that didn't make it to my template.
<div id='backlinks-container'>

<div expr:id='data:widget.instanceId + "_backlinks-container"'>

<b:if cond='data:post.showBacklinks'>
<b:include data='post' name='backlinks'/>
</b:if>

</div>

</div>
In future, I will keep an eye on such updates and inform you if you need to make any change.

UPDATE: If you downloaded one of my hacked templates, this change is already incorporated in it.

October 16, 2006

Bookmarklet to find related posts

Imagine you are in a blog and you like the subject matter of the post that you are reading. If you would like to read other posts in Bloggosphere on the same topic, you could use Google blogsearch. But still, one has to use complex search operation with multiple keywords to get the most relevant results. Sometime back I wrote a script to do this intelligent search on your behalf and display the top 5 results. It uses the title of the post to form a search operation and the RSS feed of the results is processed and displayed in a nice fashion. I will describe how to create a bookmarklet in your browser to use this script (Thanks again to Greg of Freshblog for hinting me on the bookmarklet).

1. Just right-click the link below and "Add to favorites" (preferably under Links folder so that it shows up in Links bar). IE might complain about bookmarking javascript code. Ignore it and continue to add the bookmarklet. If you are using firefox, right-click, choose "Bookmark this link" and add to Bookmarks toolbar.

Find related posts

2. Whenever you are in your/another blog and you would like to read more on the topic, just click this bookmarklet and it will take you to a page that shows related posts.

To test your bookmarklet, goto this Blogger Buzz post about AJAX search API. I got mostly relevant results.

Note that you should be in a post page and not the main page for this to work. Also, since it is only a best-effort search, you might get irrelevant posts sometimes.

Fave my blog in Technorati

As many of you know, Technorati ranks blogs based on how many other blogs link to it (sorta like Google Pagerank). I have not been checking my technorati rank that often since I created the account in July. Today I was happy to find that my rank is 13,290 among the 57 million blogs that Technorati tracks. My hacks have been mentioned in several blogs and about 194 blogs link to my blog (here's the list). I am glad to see my hack instructions being translated to several languages by others.

If you have a Technorati account and you like what I have done so far, please add my blog to your favorites by clicking the green button in the "Subscription options" section of my sidebar. Also, if you have used my hack and haven't yet linked to my blog in your sidebar, please do so. Some of these things are just number games but somehow we, mere mortals, get a kick out of it :)

Peekaboo comments and Random banner hack

For KCA and all those who wanted Peekaboo comments in main page badly, Stephen has got it working! Avatar informed me about this and I thought I will inform my readers too. Instructions are in his post. There seems to be quite a few steps and so, apply the hack carefully.

Also, check out Gabriel Lau's nice hack to display a randomly chosen banner at the top in this post. This is one of the famous Wordpress plug-ins which is now doable with Blogger too!

October 11, 2006

Random thoughts

[This post is just my random thoughts on Blogger hacks and features. I have read some such posts elsewhere, so I thought I will write one too!]

One of the ideas for a nice hack could be "comment threading". Instead of the flat list of comments, what if we have a forum-like threading of comments? For example, say Tom comments in my blog and I reply to his comment. Then, my reply should appear right below Tom's comment (a little indented though). If Tom replies back, it should appear below my comment, even if he replies after several others comment. This will help in organizing comments into multiple threads and makes it easy to follow the thread that you are interested in. What do you think about this?

I think post summary feature should be built into Blogger. I mean Blogger itself should allow users to type summary and full post in different textboxes thereby recognizing them differently. If this is supported, then we don't need to use the special post template for expandable post summaries. Ofcourse, they don't need to support peekaboo posts but they could show the summary alone in main page and provide a Read more link to goto the post page (if there's no summary, then they could show the entire post). This will also come handy in deciding where to stop in summary feeds. Right now, Blogger goes by number of characters and summary feed stops abruptly in the middle of a sentence!

October 10, 2006

Author comment highlighting and notification

After a break of a week or two, I am back again. I now have some hacks for the comments section - a hack to highlight your comments as the blog author and another to notify your readers when you respond to their comment. You might have noticed that my comments are displayed in red here in my blog and that's what I mean by "highlighting". I believe it helps my readers to identify my response to their questions amidst a long list of comments. Some of my readers asked me how to do this in their blog and here I am sharing what I did.

Author comment notification is another hack that I did for the old Blogger. When somebody posts a question/comment in your blog and you respond to him, the commenter may not see the response unless he checks your blog a few times. If (s)he landed in your blog through blog search or Blogger's next blog chain, (s)he may not even remember your blog's URL. Sometimes, you type a long response and it goes into blackhole. With this notification, you can send an automated email message to the commenter with just one click. This message will contain your name, your post’s title and its permanent link so that the commenter can easily come back and see your response. This hack is actually a service hosted in my website bvibes.com. [Please note that notification can be sent only to those who have shared their email address in their Blogger profile.]

Now, for the code changes. First find this class called comment-body, copy it to define another class comment-body-author and modify it for the way your comments should look like. For example, here I have set the color to what I want and made it bold.

.comment-body {
margin:0;
padding:0 0 0 20px;
}
.comment-body p {
font-size:100%;
margin:0 0 .2em 0;
}

.comment-body-author {
margin:0;
padding:0 0 0 20px;
}
.comment-body-author p {
font-size:100%;
margin:0 0 .2em 0;
color:#CC3300;
text-decoration:bold;
}

Then, search for "id ='comments-block'" in your template to identify the portion of code in this page and add the new code shown in red and blue. The red one is for author comment highlighting and the blue one is for comment notification.

After you make those changes, goto any post page with comments and you will see the an image after every comment (NOT in the comments page where you type comments). As you can see in this example, there's an image below Richard's comment.


Once I respond to Richard, if I click that image, an email similar to the following one will be sent to the email address in his profile. [If the person has not shared an email address, no email will be sent.]



Subject: Response to your comment has been posted
"Ramani has responded to your comment on Peekaboo posts improved again. Please click this link to see the response."

As a security feature, this image will be shown ONLY when the blog author is logged into Blogger. Visitors to your blog won't see this image and so they won't be able to use this feature. Also, be judicious in using this service (if you send emails for trivial responses, your readers may not like it).