Saturday, August 19, 2006

Technorati Tags Bookmarklet adapted for blogspot and blogger

Inspired by Rakesh's Bookmarklet (originally Lorelle's), I came up with a technorati bookmarklet for blogspot and blogger.com users.
Technorati tags bookmarklet is a Firefox bookmarklet to tag ur blog posts. First created by Lorelle and later modified by freehogg and then again modified by Rakesh. Veterans can see the modified code below and newbies first read "How to create bookmarklet" and "How to use it" further down.
-----
javascript: ( function() { /* Technorati Tag Book Marklet 0.3 Created First By: Lorrell <http://lorelle.wordpress.com > for wordpress. Last Modified By: Rakesh <http://rakeshkumar.wordpress.com > for wordpress. Adapted for Blogspot By : Turbo <http://sandy007smarty.blogspot.com > */ var a=''; var t=prompt('Enter Tags separated by commas',''); if(!t) return; var tr=t.split(','); a+='<p><img id="technorati_img" src="http://photos1.blogger.com/blogger2/6946/1885/1600/technorati.gif" alt="Technorati" /><strong>Technorati: </strong>'; for(var i=0;i<tr.length;i++) { tr[i]=tr[i].replace(/^\s+/,""); tr[i]=tr[i].replace(/\s+$/,""); var tag_text=tr[i]; tr[i]=tr[i].replace(/\s+/g,"+"); if(i > 0){ a+=', '; } a+='<a href='+unescape('%22')+'http://www.technorati.com/tag/'+tr[i]+unescape('%22')+' rel='+unescape('%22')+'tag'+unescape('%22')+'>'+tag_text+'</a>'; } a+='</p>'; prompt('Copy this html code, Press OK, Then Paste into your blog entry:',a); } )()
-----
Its character by character same as Rakesh's version, except for the image url. I changed the url to a blogspot url to make it a blogspot bookmarklet in true sense. That is, blogspot won't have to go to wordPress for that image. Although I have not tried, Rakesh's original version should also work without any problems, unless blogspot specifically blocks wordpress urls (which it does not do now atleast).
Following FAQs have been shamelessly copied from Rakesh's post :-
FAQs
Q1. How to create bookmarklet?
Ans: Copy the above script and paste it to Firefox’s address bar. Drag and drop it to bookmarks toolbar. Right click on it, go to properties and verify the location.
The location should contain the above script. Change the name to something related like “Technorati Bookmarklet”.

Q2. How to use it?
Ans: Just click on the bookmark. A dialogue box will open. Enter your tags in it, seperated by commas. (spaces are allowed within tags). It generates
the html code for tags. Copy and paste it in your blog post.

Q3. Why Technorati Tags?
Ans: A simpler explantion is that it adds meaning to the information that you are providing (i.e. your post). Tags work both ways, it helps sites like Technorati
to organize the contents properly and on the other hands it increases your reach to a broader audience.

Q4. But blogspot already has labels?
Ans: Yes, a recent feature. Those who still use old templates don't have the labels feature. Also its simply good to have technorati tags. Isn't it?


TechnoratiTechnorati: , , , , , , ,

2 comments:

Anonymous said...

good job , keep it up

Anonymous said...

Thanx dude...