Anything look familiar here?
 
 
-----Original Message-----
From: Jon's Radio
Posted At: Thursday, March 11, 2004 9:57 AM
Posted To: Jon's Radio
Conversation: More Firefox search plugins
Subject: More Firefox search plugins

I've added a few more search engines to Firefox, and I'm parking them here so I can easily transfer them to my other machines.

Here's the procedure create these plugins, by the way:

  1. Capture the image. To do this I fetch the favicon.ico file from the site's root, and use ImageMagick to convert it to a GIF.

  2. Write the control file. For example:

    <search 
       name="Feedster"
       method="GET"
       action="">
    <input name="q" user>
    </search>
    
    The action is the query URL minus the query parameter, in this case "q" -- it goes separately as part of the <input> tag. When a site uses POST instead of GET, you'll need to dig a bit deeper to come up with the query string. I used to use the LiveHTTPHeaders extension. Even better, though, is Chris Pederick's wonderful Web Developer Extension which does all kinds of handy things, including converting between GETs and POSTs.

To add a plugin, just drop a pair of these files -- the image and the control file -- into Firefox's searchplugins directory. The additional step I'm illustrating here -- one-click installation of the plugin, depends on a snippet of _javascript_:

function errorMsg()
{
  alert("Netscape 6 or Mozilla is needed to install a sherlock plugin");
}
function addEngine(name,ext,cat)
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    window.sidebar.addSearchEngine(
      "http://weblog.infoworld.com/udell/gems/"+name+".src",
      "http://weblog.infoworld.com/udell/gems/"+name+"."+ext,
      name,
      cat );
  }
  else
  {
    errorMsg();
  }
}
Note that there's a registry of these plugins. And I should probably register the Safari plugin there. But I'm sure this blog isn't searched often enough to warrant registering a "Jon's Radio" Firefox plugin. For such cases, it's nice to know that a more decentralized, ad-hoc solution is available.

Reply via email to