Kenneth R. Irwin wrote:
> Unfortunately, I have not the first clue about how to go about doing that.
> I would have thought that it would be easy to find a "make your own search
> tool" link on the Mozilla website, but I can't find one.
Here's an example of the search plugin that I adapted from one by James Day.
The file has a ".src" extension and goes in the "searchplugins" folder
withiin your Firefox install.
The label that appears in Firefox is the name attribute of search.
The icon is the updateIcon attribute of the Browser. I got lazy with
this one. For something else I used the favicon.ico of the site (it's
well sized for this)
The key is that the form value supplied by the user is identified
something like:
<input name="term" user="">
In this case the external form you are supplanting is expecting the
*user* to fill in the input field with the name "term". The rest of the
<input> values are simply things we need to supply to the form handling
script so it won't break.
I filled in the browser update* values with a URL to mozdev but frankly
have only required that the referenced files be in the searchplugins
folder. At that point it just seems to work.
Walter
====
# 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
# Modified by Walter Lewis for HHPL: 15 Oct 2004
#
# Note: Does a General Keyword search only.
<search
version="7.1"
name="HHPL Catalogue (Keyword)"
description="Halton Hills Public Library Catalogue Search"
action="http://cat.hhpl.on.ca/ipac20/ipac.jsp"
searchForm="http://cat.hhpl.on.ca/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="hhpl">
<input type="hidden" name="index" value="GW">
<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/HHPLkeywords.src"
updateIcon="http://mycroft.mozdev.org/plugins/yahoo.gif"
updateCheckDays="30"
>
|