Mozilla Search Plugin

The Mozilla Firefox browser has a built-in search box on the Navigation Toolbar which has a drop-down box showing the available searches (see image on right).  These are created using search plugins.

You can create search plugins for Horizon Information Portal.  However, each index search must be in a separate search plugin.  Search plugins are simple text files which are installed by adding them to the Mozilla Firefox searchplugins folder (default location: C:\Program Files\Mozilla Firefox\searchplugins).  The small icon must also be created (see below).

Mozilla has more detailed instructions on how to create, validate, and submit your Search Plugin(s).  When submitted, the plugins can be found and installed by your patrons from the Mozilla website by clicking on the option Add Engines... at the bottom of the search drop-down box (see image on right).

See the Mozilla Contribute webpage for detailed instructions on creating Search Plugins.

Horizon Information Portal Search Plugin

Use a plain text editor (such as Notepad) to create the Search Plugin.  Save it with a .src extension.

Here is the basic text for the Search Plugin (for a keyword search):

# Status: Working
# Horizon Information Portal plugin for Mozilla
#
# By James Day, jday at cflc dot net
#
# Created: October 13, 2004
# Last updated: October 14, 2004
#
# Note: Does a General Keyword search only.

<search
version="7.1"
name="Library Catalog (Keyword)"
description="Your Library Name Catalog Search"
action="http://
your.servername.or.IP/ipac20/ipac.jsp"
searchForm="http://
your.servername.or.IP/ipac20/ipac.jsp"
method="GET"
>

<input name="term" user="">
<input type="hidden" name="menu" value="search">
<input type="hidden" name="aspect" value="basic_search">
<input type="hidden" name="sort" value="">
<input type="hidden" name="npp" value="20">
<input type="hidden" name="ipp" value="20">
<input type="hidden" name="profile" value="yourprofile">
<input type="hidden" name="index" value="BTW">

<input name="sourceid" value="Mozilla-search">

<interpret
resultListStart="<!-- RESULT LIST START -->"
resultListEnd="<!-- RESULT LIST END -->"
resultItemStart="<!-- RESULT ITEM START -->"
resultItemEnd="<!-- RESULT ITEM END -->"
>
</search>

<browser
update="http://mycroft.mozdev.org/plugins/yourfilename.src"
updateIcon="http://mycroft.mozdev.org/plugins/yourfilename.gif"
updateCheckDays="3"
>

Note: You will need to modify the values in italics (such as yourprofile) and the text in the comment lines at the top (preceded by #).

Save the file as a plain text file with the extension .src.


Search Plugin Icon

You can create a custom icon image for your Search Plugin(s).  It must be a 16x16 image with one of the following extensions:

  • .gif
  • .jpeg
  • .jpg
  • .png

Important: the icon filename must match the Search Plugin filename: ex. hipkeyword.src and hipkeyword.gif.

If you have multiple searches which use the same icon, you still must have multiple icons with names matching the Search Plugin filenames.
 

Installing and Testing

Installing the Search Plugin (and icon) is done by simply added the files (ex. hipkeyword.src and hipkeyword.gif) to the Mozilla Firefox searchplugins folder (default location: C:\Program Files\Mozilla Firefox\searchplugins).  They will not appear in the drop-down list until you close and reopen the Firefox browser.

Test your Search Plugin and make sure it gives the same results as doing the search directly in your catalog.  If necessary, close the Firefox browser, edit your Search Plugin, and reopen the browser to test it.

You can validate the plugin and check for errors using Mozilla's Search Plugin Validator.

Finally, when the Search Plugin is working correctly, you can submit it to Mozilla for inclusion in their Search Plugin Directory (under Reference).  To submit it, zip the files and send them to with the plugin name in the subject.

 Back