JsDictionary Plugin

This is a very simple plugin that, with a little bit of Javascript, will allow your users to get information about any word or piece of text that appears in your site. What can that information be? Well, that depends up to the person who configures the plugin. The plugin will feed the word or selected text to a URL (that can be user-defined) which will return the information. In the simplest scenario, the plugin could be made to send the word to an online dictionary that can return the definition for it, or to a translator to find its meaning in another language.

In order to use this functionality, your users will need a browser that supports the Javascript 1.2 standard. The feature has been tested to work in IE 5.5 and 6.0 as well as in any Mozilla and Mozilla-based browser (i.e. Firebird)

To enable the plugin, you have to include the following in the header.template file of the template set you are currently using:

      {$jsdictionary->enable()}
  
The plugin will output the necessary Javascript code to enable the functionality.

The "look up" action is triggered by either double clicking any word in the page or by selecting a piece of text and pressing the "Enter" key. Automatically, a new smaller window will pop up on the screen with the information returned by the site being used at the moment to find information.

The plugin comes by default with a few buit-in sites that can be selected with a click of the mouse. Amongst those sites you will find dictionaries, translators, search engines and even movie sites (to for example allow your users to find movies that contain a given set of words in its title... why not!?) Also, it is possible to define a new URL in case none of the ones available is really useful for us.

In order to define a new URL, we first need to know what the format of the URL is. For example, if we want to use Google as the look up site, Google uses the following format for its search URL in English:

http://www.google.com/search?q=<your-search-term>&ie=UTF-8&oe=UTF-8&hl=en

Knowing this, the only thing we have to do put the string %word% instead of the search term, to let the plugin know where to include the word or selected words:

http://www.google.com/search?q=%word%&ie=UTF-8&oe=UTF-8&hl=en

This plugin has been written by the LifeType team. Please report any problems using it using the forums at www.lifetype.net/forums