OpenSearch plug-in for Enlighten

We have created an OpenSearch plug-in for Enlighten for a simple search (ordered by title). This can be added to the search box of Internet Explorer 7.x and Firefox 2.x and above using the “Add Enlighten Search” button on the home page or from the browser search box from any page in the repository.

Enlighten in the Firefox Search Bar

Enlighten in the Firefox Search Bar

Search plug-in code

The plug-in code can be easily modified for any EPrints repository:

Search Enlighten for research publications by members of the University of Glasgow
<Image height="16" width="16" type="image/x-icon"></Image&gt;
<Url type="text/html" template="{searchTerms}&order=title/creators_name/-date"/>
<Developer>William J Nixon</Developer>
<Attribution>University of Glasgow Library</Attribution>

This code was saved as glasgow-enlighten-service.xml and saved to our webservices/plugins/ directory on our Library website where we have other plug-ins for our Library catalogue and our Theses service. There’s no reason for it not to be saved into a directory in ePrints itself.


Discovery code has been added to the <HEAD> tags of the template default.xml file in the cfg.d directory:

<link href="" rel="search" type="application/opensearchdescription+xml" title="Enlighten" />

This points to the location of the XML file and provides the title description which will be used by the browser.

With this code applied, users will see a glow around the search bar which indicates a plug-in is available and provides the option to add it.

Firefox Search bar with glow indicating a search plug-in is available

Firefox Search bar with glow indicating a search plug-in is available

We have also added an “Add Enlighten Search” button to Enlighten’s home page using the default ep_form_action_button class with the code:

<input class="ep_form_action_button" value="Add Enlighten Search" type="submit" name="_add_search" onclick="window.external.AddSearchProvider('');">

Add Enlighten Search

Add Enlighten Search Button

This simple plug-in provides us with the opportunity to enable users to search for content without having to come to Enlighten first, or to re-use a search they have already done in the browser search bar for Enlighten.