Archive for April, 2006

Camping @ Pune

| April 28th, 2006

It is here. It has arrived. BarCamp is finally headed to Pune in the last week of May, something I had speculated earlier. I got a taste of what the BarCamps are all about at the BarCamp Delhi, held earlier this year. Although I was a mere spectator back there, giving my insights during the discussions, I intend to present something this time.

Well, I can showcase something I have been working on…or…maybe talk about some topic I have an insight on. Till I decide on that, why don’t you sign up for attending the BarCamp Pune, if you havn’t done so already?

Search has become an integral part of our lives and after the advent of Firefox (now IE7 too) the nifty search bar on the top-right seems to be a must have. With the plethora of engines that can be added to the existing list I have never come across the need to define one myself. But sometimes I think, “What if I could add this site to my search bar?”, incase an engine for such site does not exist. Well, here is my three part series on writing your own search engine plugin.

The Unavoidable Basics

The plugin source file is a normal text file with the extension .src. Every plugin starts with the tag,

< search

which has the following attributes,


the version indicates the latest version of Netscape against which the plugin was tested successfully. This means that the plugin won’t work for lower versions of Netscape. In Firefox specifying a version=”0.0″ indicates compatibility with all versions.

name=”plugin name”

this signifies the name of your plugin. This is the name visible in the search bar list.

description=”plugin description”

here goes the plugin description.

action=”url prefix”

Now pay attention! We need to examine the search url of the site we are building the plugin of. For example, Google has the search url which looks like “….” . The action represents the part of the url before ‘?’. So in our case it would be “”.

searchForm=”form url”

An optional element referring to the form in the search page which submits the search.


This specifies the charset to which the query belongs. If not specified the default charset of the browser is taken.


Currently only the GET method is supported. Finally complete the search start tag.


Now we must define the search parameters to be passed to the search url.

< input name="query" user>

This represents the term that will be typed in by the end-user. Other parameters can also be passed by specifying another input tag, but they should have fixed values.

< input name="category" value="blog">

Then follows the input tag which is used to let the webmasters know where the search originated from.

< input name="sourceid" value="Mozilla-search">

Having configured the plugin we can now close the search tag.

< / search>

We are all done with creating a search plugin. The plugin source should look somewhat like the following:

< search version='7.1' name="plugin name" description="plugin description" action="url prefix" searchForm="form url" method="GET" >

< input name="query" user>
< input name="sourceid" value="Mozilla-search">

< /search>

You can use the plugin generator I created where you need to just fill in a few values and it spurts out the above code for you.

Incase you are hosting your plugin source somewhere and want the browser to automatically check for updates, you can do this using the browser tag. The browser tag follows after the search tag.

< browser updateIcon="url of plugin icon" updateCheckDays="10" >

The update attribute specifies the url of the plugin source file. The updateIcon specifies the url of the plugin icon if any. The updateCheckDays specifies the interval in days after which the browser should check for the update.

For manually installing the plugin you need to copy the src file into the searchplugins folder in the Firefox directory. The next part will introduce you the gory details.

After two years of loyalty to Blogger I seem to have broken free from its shackles. Although I have moved away from it, I will always remember the fabulous web service which introduced me to the magical blogosphere. As a wonderful blogging platform, it has all one needs for beginners but lacks certain features for advanced bloggers.

Over the past two years I have grown as a blogger and so have my needs from a blogging platform. Therefore I decided to switch to a privately hosted WordPress platform (Privately? Well thats another discussion altogether). And to tell you the truth, I haven’t looked back ever since, infact I’m loving it (-:.

What does the Blogger lack?

Blogger has always been the first choice due to its affiliation with Google, but although Google may be the God in search…not quite though here.

  • To speak of the UI, WordPress is fairly much cleaner and organized. Blogger is cluttered and less user friendly. With all the AJAX, movable divs, and coloured highlights thrown in WordPress definitely rocks.
  • One vital feature lacking in Blogger is the ability to create categories. I just so couldn’t do without this feature that I decided to write a hack for it.
  • WordPress always dynamically generates its pages, so you never have to regenerate pages unlike in Blogger.
  • Blogger is not open source, WordPress is. Open source means that everyone and anyone contributes. Just to illustrate, Blogger has become stale. It has not released any new features lately, the last I remember was the blog search. With Google around this was something expected. But yet nothing worthwhile to facilitate blogging. WordPress on the other hand has countless plugins with many more under development.
  • Blogger has no password protection for posts. A well thought feature of WordPress, which lets me password protect individual posts. Quite useful when you have a personal daily blog where certain posts are too personal for strangers to read.
  • Switching to WordPress from another platform is easy as hell. The import blog feature is definitely cool. I don’t remember Blogger having something like this.

Every blogger has his own reasons for sticking to a platform, but for all those still stuck onto Blogger try a switch. Trust me on this.