Introduction There are many of actually cool providers out there, and I believe quite a bit of them would fit in actually well with Accelerators. But even if there’s plenty of value to get had in building Accelerators, I really don't believe that we’ve at any time had a site submit explaining a step-by-step approach for how to do it. I’m hoping this post will support with that. I’ve been working about the attribute for the while, so I’ve come up with some tips and most desirable practices which have aided me turn into extra efficient in building Accelerators. There are also some mistakes I’ve observed (and manufactured!) over and over once more, so I’ll converse about these with the hope of earning the improvement method a little a lot easier for everyone else on the market. Developing an Accelerator Accelerators streamline the prevalent copy-navigate-paste operation by enabling people to deliver picked content material from the present-day webpage to 1 of their favourite services. The good news is, while the aspect is very powerful, it is literally rather easy to publish code that makes use of it. Here’s a step-by-step guide for making a straightforward Accelerator. Earliest, I’ve place up an Accelerator template,
Windows 7 64bit, with sample advice pre-loaded. All it's good to do is swap out the sample important information for yours. Note you do not have to be the service provider to produce an accelerator that interacts using a services. If you're able to unearth the subsequent data,
Office Pro Plus 2007, you then can construct an accelerator for nearly any services you'd like. Allow me to share the procedures: To start with, determine a <homepageUrl> for your Accelerator. This is an essential field—all the other URLs inside manifest have to match its domain. Generally speaking, the top-level domain for your services is a good choice. Example: <homepageUrl> Fill in the absolute path to your favicon into the <icon> field. A person trick for executing so: right-click about the services page, view the source, and then search for an .ico file. Example: <icon> Under the <display> node,
Office Ultimate 2007, decide on a <name> that’s descriptive of your service, when under 50 characters. We recommend that the name include the Accelerator category followed by the name of the service supplier. <display> <name>Act with Example.com<name> <display> Find a “category” attribute for that <activity> field. I have another submit on categories, but listed here are the ones we recommend: Website - A weblog services that creates a new blog page publish based on a link or user-selection Bookmark - A services adds a link to the user's personal bookmarks around the web Define - A service that provides definitions based on a selection Email - A services that provides email communication that can build a new email message Find - services that finds related material in the scope of the internet site Map - A services that provides map locations based on user-selection Deliver - A service that converts world wide web data into application information Share – A service that shares a link (with optional comments) with the internet site community or network Translate - A services that translates the present webpage or user-selection from a person language to another Choosing a descriptive category is essential for how Accelerators are grouped in the accelerator menu, and enables users to understand what your Accelerator will do in advance of even experimenting with it. Pick out which contexts you would like your Accelerator operate on—“selection”, “link”, andor “document”—and then add them as attributes to a person or extra <ActivityAction> elements. For example: <activityAction context="selection"> … <activityAction> The link and document contexts could probably use slightly extra explanation. The link context is activated when a user right-clicks on a link and then executes an accelerator in the resulting context menu. Similarly, the document context is activated when the user right-clicks around the page itself and utilizes the context menu, or goes to the Page menu and executes something under the “All Accelerators” submenu. Next, fill with the “action” attribute of the <execute> factor using the URL of the services you need to use. See the section below regarding variables to come across out easy methods to pass information into your services. Example: <execute action=""> Preview windows are a wonderful way of delivering the output of a service to consumers as part of a further inline browsing experience—it’s also an ideal way of enticing them to visit a service’s home page. You possibly can add a preview window via the <preview> component. I’ve composed a section about preview under. Example: <preview action=""> The sections that follow provide some far more in-depth specifics with regards to the strategies above. Variables IE exposes plenty of variables for use with Accelerators. Here’s a list of the most commonly used variables: selection - the user selection inside the webpage. Only on hand in selection context. documentUrl - the URL of the webpage where the Accelerator is invoked. documentTitle - represents the title of the webpage where the Accelerator is invoked. link - the URL of the user picked URL. linkText - the text of the user picked URL. A full list of variables is attainable here. There's two tactics of passing these variables to a service by means of an Accelerator. The initial is through the query string: <execute action=” The second is due to an individual or even more <parameter> tags: <execute action=” <parameter name=”foo” value=”bar” > <execute> Note that by using a <parameter> factor is the only technique to insert data into the body of the HTTP request. You can actually use Submit having a parameterized query string, as properly, but any parameters you pass will show up in the URL. You’re able to specify a GET or Post request via the “method” attribute of the <activityAction> aspect. Adding Preview Preview is probably the most visible feature of Accelerators, and 1 of the most useful when implemented successfully. Accelerator previews occupy a window of size 320x240 pixels. Given this, most Accelerators that use it establish a special preview page for displaying it. The key to an highly effective preview is returning the most relevant details possible based around the important information sent by the user, then building sure it fits in the space provided by the preview window. The Bing Maps Accelerator, for example, maps the location of a chosen address employing its own UI, scaled down to 320x240: <preview method="get" action=""> <parameter name="b" value="selection" > <parameter name="clean" value="true" > <parameter name="w" value="320" > <parameter name="h" value="240" > <parameter name="client" value="ie" > <parameter name="format" value="full" > <preview> Notice that you simply can pass variables to the preview window the same way it is easy to for execution. For example, the Accelerator above employs selection. Another handy rule of thumb is load time—if it takes your preview window takes a lot more than half a second to load, you probably have too substantially in it, from a user experience perspective. 1 trick that you simply would possibly discover useful involves working with the mobile version of a service for a preview window. We deliberately sized the preview window to get compatible with mobile solutions. Testing your Accelerator When you’re done making your Accelerator, it is time to test it out. We have a Javascript API for installation. Some code like the subsequent will set up a link that brings up the Accelerator installation dialog: <a href=”javascript
:window.external.addService(‘myAcc elerator.xml’)”>Install me<a> In order for this to labor, you’ll need to have a live net server—trying to open the link from a page on your local hard drive will result in an error. Any kind of local server will labor fine, though—you can use Visual Studio’s ASP.NET server without issue, for example. If everything goes properly, you’ll see the ordinary Accelerator installation dialog. If it doesn’t, you’ll see something like this: Whenever I see this dialog, there are several faults that really frequently flip out to be the culprits. Encoded Characters The primary has to try and do with XML itself. When dealing with query strings, it is fairly commonplace to pass in multiple arguments using the ampersand character. Unfortunately, this is a reserved character in XML,
Office 2007 Standard, so applying it as a literal in a query string will raise an error. Instead, you’ll should escape it with “&”, like this: <execute action=” Matching Domain Requirement The second has to do with the <homepageUrl> tag. To the right way determine a services, we require that the URLs specified in <homepageUrl>, the action attribute of <execute>, and the action attribute of <preview> all share the same domain. If this isn’t the case,
Microsoft Office 2010, an error is raised. Test Cases Once it is possible to install your Accelerator, there is two or three scenarios make sure you surely test, since they tend to break for a whole lot of the Accelerators already available: Blank content material – what happens when blank written content is sent to your service? Do you've a graceful error message in location? Multi-line material – does your services handle line-breaks the way you believe it will? You may need to make sure you parse for your carriage return-line feed sequence (“%0d%0a” in URL encoding) and replace it with something appropriate, like a space. Script – Some user selection may have JavaScript associated with it. If you specify HTML selection, then your service really should be filtering this script on the server for security reasons. Large selections – Accelerators truncate GET requests at 2048 characters. If you’d like your accelerator to become capable of handle a great deal more info, you may look at utilizing Publish. Next Ways and Conclusion After you could have a cool Accelerator created, experience free to upload it to the IE ##############. It’s a great technique to gain even more exposure for your Accelerator and your services. I wish this post was useful in developing Accelerators. Once you have any feedback on this submit, any thoughts on Accelerators in standard, or any cool creations you’d like to share, feel free to leave a comment. Thanks! Jon Seitel Program Manager