I’m Feeling Lucky

I wrote a wordpress plugin to help me link to things more effectively while writing a wordpress post in the browser. For example when I wrote the previous sentence, I selected the word wordpress and clicked the “Lucky” quicktag. The plugin automatically searches google for wordpress, (using AJAX sans XML) grabs the first link http://www.wordpress.org and replaces the word wordpress with

<a href="http://wordpress.org/">wordpress</a>

Requirements

  • WordPress 1.5 or later
  • A browser that supports Quicktags such as

Installation and Usage

You can download the code here
Unzip this into a folder called lucky in your plugins directory. Then activate it in your admin panel.
You can either select text in your post editor and then click Lucky or you can type Control-K and a popup will ask you for a search term.

Known Issues

  • The plugin doesnt work (yet) on the page for editing WordPress pages.
  • It takes the focus away from the text-area sometimes.

Credits

Owen Winkler’s quicktag button template which can be got from here.

9 Responses to “I’m Feeling Lucky”

  1. Haris Says:

    Just installed it, looks cool! I’ll need to learn about this Ajax stuff at some point, after all, he was a famous greek warrior :-)
    Btw, this is what a search for your name brings: sameer
    That’s unacceptable! We need to raise your google ranking.
    Why does the zip file have fifteen folders before you get to the lucky folder? Can’t you get rid of the extra ones?

    Good work.

  2. Sameer Says:

    I fixed the zip file. There was an oversight in the script that generated it.

    I have never had a high google ranking. Before I had a blog, searching for “Sameer D’Costa” my name on a former professor’s website used to come up first and my own website wasnt even in the top ten. Then I realised that this was because I didn’t even have my name on my website. Anyway, Hemanshu has a bigger google ranking than me, so if I try to get my ranking higher, he might beat me up.

  3. Test Blog » Blog Archive » wordpress Says:

    [...] Now I have to figure out how to get my “I’m feeling lucky plugin” working again and update it on the wordpress plugin repository. Also, the backup plugin needs some tweaking. I shall also tweak the template to give my del.icio.us bookmarks a little more space. I seem to be bookmarking more things and easing up on writing blog posts. If you notice anything funny with the website after the upgrade, please let me know. [...]

  4. hagai Says:

    great plugin, thanks !

  5. Die besten WordPress Plugins - Post » Tipps zur Suchmaschinenoptimierung Says:

    [...] I’m feeling Lucky A quicktag to put in links to Google’s top hit for text that you select. [...]

  6. Michael Says:

    it seems, my trackbacks does not work! i just would like to say thanks for this great plugin, appears on my “must-have” list ;-)

    cheers,
    michael

  7. Test Blog » Blog Archive » I’m Feeling Lucky Says:

    [...] http://dcostanet.net/wordpress/2005/06/09/im-feeling-lucky/ Tags: google, wordpress, blog, plugin(del.icio.us history) [...]

  8. Staticize Reloaded_Wordpress plugin Says:

    [...] Plugin Homepage [...]

  9. Chris Says:

    Any chance you are planning to upgrade this for WordPress 2.5? It would be great. thanks

Leave a Reply