Archive for the ‘plugin’ tag
Hack: I am feeling lucky..
Writing a blog is more than writing. It is an art. A way of disseminating valuable information. Although blogging is a lot of fun, the little quirks involved tends to get on to my nerves sometimes. One of those overheads is finding what terms might be alien to your reader and creating link-offs, just in case the reader wants to know a bit more on what you are talking about. But, linking off is at core of the web and it must be harnessed. Web exists because of it’s hyper-links.
To create outlinks, this is what I generally do: Go search for that term in Google/Yahoo. Click on a few links and find what is appropriate. And then copy and paste the link over to the term I just blocked. In many cases, I have found the first link just works fine.
In some cases, I just create a link over to wikipedia and type out the query term hoping that the wiki entry will exist. And it does. For instance, for the above wikipedia hyperlink, I just typed “wikipedia.org/wiki/wikipedia” (Seems like this is the web2.0 version of your recursive shell command “man man”).
Now, what if I could do the same thing without having to go to either google or type the wiki url? So, the idea is, I block a text and then either click “make wiki url” or “I am feeling lucky” and get done with it. Altough you can write this up as a plugin quite easily for wordpress or typepad, The only way it seems possible for LJ or blogger is Greasemonkey.
What do you think? Do you have time to do this ? Let me know.
Creating your own firefox search plugin
Do you know that it is absolutely easy to create the firefox (and now IE7) sidebar search plugin?
First, read a bit about opensearch.
Next, head over to this page and this page at Mozilla developer center which explains the entire process beautifully. (What we discuss here is true only for FF2 and IE7. There is no search plugin concept in IE6 and for earlier versions of firefox, those two pages will tell you what to do.)
So, you essentially have to create an XML opensearch file. But, ofcourse you dont have a search engine for yourself. So, what to do ? Here is a template that you can use to create your plugin. Save it. And then, Read on.
A few things those pages wont tell you are these:
How do I get a icon like the one Yahoo or Google’s in the search bar? You probably have a favicon.ico for your site/blog. If you dont, Use an image creator. My favorite is GIMP. Create a small, 16×16 image with whatever you want inside it. For instance, mine has “S” which is the beginning alphabet in my name. Now, you probably have a jpeg or png image. Head over to the online favicon creator by html-kit. They give you a zip file. Unzip and you will have your favicon ready.
Next, You need to create a base64 version of your .ico file. Head over to this page. Replace the text on the textbox named type: with “image/x-icon”, check base64 and then upload the favicon that you just created and click generate. You get the base64 encoded string of your image file. Now, copy that string and paste it between the Image tags in the template file.
Third, make use of the fact that Google does all the hard work in indexing your pages. And that you can ask G to search just within your site by adding “site:yourdomain.com” to the search query.
There are two Url tags in that file. The first one is used for suggesting a query (auto suggestion). Did you realise that from FF2, when you start typing in the search bar, Google or Yahoo ( or most plugins) gives you an autosuggest ?
So, in these URL tags, replace yourdomain.com with your domain. And that is it. You are all set. Publish this XML and hopefully, if someone thinks your blog has a wealth of information, they may install it. For instance, here is a mine!
