Apr 01 2008

IE8 Activity: "Define with Wikipedia"

Published by at 5:08 pm under Uncategorized

image While at Cuesta College in San Luis Obispo I was doing a demonstration of Internet Explorer 8 Beta and showing off a new add-on type called Activities. During the demo I had a weak moment and said that it looked so easy to implement that while the bus was driving on the way to Mountain View, CA after the meeting I would implement an Activity for Wikipedia. I thought I understood what I needed to do from just looking at the Windows Live Maps sample but I wanted to make sure. So I found the current documentation Internet Explorer 8 Readiness Toolkit and the Activities white paper and gleaned the rest from the available samples. Here’s what I came up with:


<?xml version="1.0" encoding="UTF-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
  <homepageUrl>http://en.wikipedia.org/</homepageUrl>
  <display>
    <name>Define with Wikipedia</name>
    <icon>http://en.wikipedia.org/favicon.ico</icon>
  </display>
  <activity category="Define">
    <activityAction context="selection" >
      <execute action="http://en.wikipedia.org/wiki/Special:Search?search={selection}" />
    </activityAction>
  </activity>
</openServiceDescription>

I did learn that you need to use the proper capitalization for the category so that the new Activity will be grouped with the other Activities of that category in the “Manage Add-ons” dialog.

Once you have the XML file you need to install it, it turns out quite easy to do:

<button onclick="window.external.addService('http://thecodetrip.com/common/wikipedia_activity.xml')">Add Define Activity</button>

Now a button like this one (yes it’s live) will show up.

So how long did this take? Including a stop at Taco Bell on the way out of San Luis Obispo this took less than an hour to implement! Now that is an easy way to improve the user’s experience and help drive traffic to sites.

 

 

No responses yet

Comments are closed.