Skip to Content

Since  Microsoft Internet Explorer 7 and Firefox 2 are both now officially available  and the S(D)N is Upgrade Time Tomorrow Friday Thankfully not the 13th,  I thought that this was the perfect time to modify the search plugin. In  contrary to what is SAP Firefox 2 Plugins, the old search plugin still works in FF2. I  don’t know what the basis is for this statement since it refers to a Yet another Firefox Search Plugin that differs from the one  available via Chicken Run, so I can’t make any judgements on that.

            You can include the image data within the plugin too, which is cool. The old  firefox plugin required that the code and image be separate files. This single  file method is, in my opinion, far better. The only drawback is encoding the  image, but that becomes really easy with this URI kitchen tool .

            Another  difference is the parameter element. Whereas Mozilla puts it in their  specifications, the OpenSearch doesn’t mention it as such, and MIE 7 seems to  have trouble with it. The only method that works for both browsers is to include  all the parameters in the URL. As with normal URLs you will get in to a lot if trouble  when you’ve got a large number or lengthy parameters. But with the new search  engine within the Upgrade Time Tomorrow Friday Thankfully not the 13th, we don’t need to worry about this anymore.

            The most  important dynamic parameter is which holds the user entry.<br>
  <pre><Url  type=”text/html” method=”GET”  template=”
https://www.sdn.sap.com/irj/sdn/advancedsearch?query=
&amp;cat=sdn_all”/>

The only thing left is closing stuff.


There are  of course plenty of other things you can include in a plugin. You can find  further information at the opensearch.org site or the Mozilla Development Center .

Now that we’ve created a plugin, we need to find a way to publish it. There are a couple of things you can do. First of all you can include a tag at your web site in order to trigger the auto discovery feature within eg Firefox. All you need to do is to include something like this


Since I’m not the owner of the S(D)N site, I needed to find another way to let people install the search plugin.

            If you look  at the Firefox add-ons page you will notice that it’s just a matter of using the addEngine Javascript  keyword. This is an old proprietary method though. A keyword which will work  for both browsers is window.external.AddSearchProvider.

The only thing you need to do is to put this code in the page

[Add | #]

S(D)N search plug in to Firefox 2 and Internet Explorer 7

You can  find the result at http://sdn.idizaai.be/sn_search.html . When you click on the link, the search engine  is automatically added (when you confirm). No problems with downloading and  putting files in directories anymore.

Conclusion

            As you can see,  things aren’t rocket science at all. As long as you keep in mind that you need  to support both browsers. Hopefully there will be more in the future, but for the  time being Opera isn’t supported doesn’t support yet. Another thing on my From the Grumpy Old Man: Searching for the needle in the SDN haystack is OpenSearch for S(D)N. Check out Ran’s answer for the roadmap.

            On top of  that, wouldn’t it be nice if we had this interface?  The nec plus ultra would be if this interface was also dependant on the  gender/preference of the user ;-)</p>

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Rashid Javed
    Great stuff as usual from Eddy :-). I am a great fan of Firefox and was ‘thinking’ about writing one for SDN search. But now i see you had already done it. Anyways since I usually search forums and weblogs separately to avoid clutter, i have copied you plug in into two, replacing sdn_all with sdn_forums and sdn_weblog. Seems to be working fine.
    Thanks a lot for sharing the knowledge about opensearch format and providing a starting point for further development.
    Cheers!
    (0) 

Leave a Reply