Click for Apple's Sherlock page!

Building a Sherlock™ Plug-in!

Click for Apple's Sherlock page!
[ About issp_builder | Download isspbuilder | What is Sherlock? | Contact Me! ]
(This site designed for 640x480 resolution and checked in Netscape 4.0 )


.

Part 4: Modify the plug-in so that it has the proper format.

[ About issp_builder | Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 ]


Step 4a:

Let's take a look at a typical Sherlock plug-in!

.

  • Remember the copy of the Sherlock plug-in you saved in Step 1?
    Open this file using your free copy of BBEdit Lite.

Here's an example of a Sherlock Plug-in

# The Header Portion:
# Sherlock Plug-in: website.com -- search the web
# written on 02-29-00 by the PowerSearcher!
# pwrsearchr@aol.com
 
# The Search Portion:
<search
name = "You can enter a name for your plug-in"
action="http://www.website.com/search"
method="get"
description = "Here's where you describe your plug-in"
bannerImage = '<IMG SRC="http://www.adgraphic.com/ad.gif">'
bannerLink = "http://www.website.com/"
>
 
# The Input Portion:
<INPUT TYPE="hidden" NAME="lang" VALUE="1">
<INPUT TYPE="hidden" NAME="timeout" VALUE="4">
<INPUT NAME="qtype" VALUE="0" onchange="chngpage(page)">
<INPUT TYPE="text" NAME="query" SIZE=22 user>
<INPUT TYPE="submit" NAME="Submit" VALUE="Search!">
 
# The Interpret Portion:
<interpret
>
</search>

Notice the four basic parts to a Sherlock plug-in:

1. The Header:

...some comments that describe the plug-in

2. The <search> portion:

...specifies how to run the search request

3. The <input> portion:

...defines your search criteria, with one <input> for each search criteria to be used.

4. The <interpret> portion:

...tells Sherlock how to display the results on your computer.

Note! Any lines starting with a # are ignored by Sherlock: They are comments.



Step 4b:

Now let's look at a file actually created by "issp_builder":

.

  • Open the plug-in file you created in Step 3a using "issp_builder"

    Typical output produced by "issp_builder"
    (I've added the red lines for effect!)

# Sherlock Plug-in for website: -- <website name here> --
# Built: Monday, November 20, 2000 3:26:00 PM using isspBuilder by The PowerSearcher!
#
 
<search
name = "Define a name for input example"
ACTION="http://partners.mamma.com/Beaucoup"
METHOD="get"
NAME="">
description = "Write a description for input example"
# bannerImage='<IMG SRC="http://www.example_website.com/image.jpg">'
# bannerLink = "http://www.example_website.com/search_help"
>
 
<input TYPE="hidden" VALUE="1" NAME="lang">
<input TYPE="hidden" VALUE="4" NAME="timeout">
<INPUT type="hidden" name="rpp" value="10">
<INPUT TYPE="hidden" VALUE="Beaucoup" NAME="cb">
<input type=text size=15 name=query>
 
# --- Choose ONE of the following input strings below & remove the rest ---
# --- NOTE: You may still need to edit the string you've chosen ---
<INPUT name=qtype value=0>
<INPUT name=qtype VALUE=49>
<INPUT name=qtype VALUE=51>
<INPUT name=qtype value=4>
<INPUT name=qtype value=48>
<INPUT name=qtype value=50>
# --- end of the current select block ---
 
<INPUT CLASS="submit" TYPE="submit" VALUE="Search">
 
# -- Format the search output here --
<interpret
# bannerStart=""
# bannerEnd=""
# resultListStart=""
# resultItemStart=""
# relevanceStart=""
# relevanceEnd=""
# resultItemEnd=""
# resultListEnd=""
>
</search>
 
# --- end of plug-in ---



Step 4c:

Compare the two files in Steps 4a & 4b and make any changes to your plug-in.

.


Just What Should I Change?

Line to look for:
-

Why it's important:

.

In our Example above:

name =

This is the name of your Sherlock plug-in that everyone will see.
If you see two of these lines, delete one, and enter the name of your Sherlock plug-in into the other one.

.

Our Example has two "name=" lines. we remove the line:
NAME="">
...and use the other line to enter a name for our plug-in.

Note! If you came here from Part 5, click here to return.





action =

This line must have a complete web site address (URL) within the quotes. (What webmasters refer to as an "absolute" link.)

.

In our Example, a complete URL has already been given.

How do I determine the URL?

Here's a couple of ways:

Use the web site address your wrote down in Step 2a:

  • Try inserting the web site's address into the "ACTION=" line.
    Example:
    "ACTION=/search.cgi" would become:
    "ACTION="http://www.website.com/search.cgi"
    where:
    "http://www.website.com" is the address you wrote down.

Finish modifying your Sherlock plug-in, and then run it: If it doesn't work, try this:

  • Run a search at the web site (Step 2c), but this time watch the area of your browser where you type in the web site address (URL): As you submit the search, the address will change.
    Part of this address contains the information we need for our plug-in.
    Example:
    Let's say the web site's address is: "http://www.website.com/"

    But: Just as you hit the "Search" button on the web page, you notice that the web site's address suddenly became much longer:
    "http://www.website.com/search/text_search.cgi?
    &q=&p=20&back=none&strng=imac&search=go"

    The address (URL) we need to put into our plug-in's "ACTION=" line is:
    "http://www.website.com/search/text_search.cgi"

    ...and finished line in our plug-in would be:
    ACTION="http://www.website.com/search/text_search.cgi"





">" character

"issp_builder" sometimes adds an extra one of these:
Remove it, or the plug-in won't work.

.

In our Example, it was removed when we removed the line: NAME="">





INPUT =

One of the "INPUT" lines corresponds to the little box at the web site where you type in your search request.

For your plug-in to work, you must determine which "INPUT" line it is and add the word "user" to that line.

.

After looking at the "INPUT" lines in our Example, the line to modify is:
<input type=text size=15 name=query>

We change it to:
<input type=text size=15 name=query user>

How do I determine which INPUT line to modify?

Here's one way:

  1. Review all the "<INPUT" lines in your plug-in.
  2. Look for something that might obviously indicate it's where the search strategy is entered.

    Some examples:

    name=query

    (or some other name that looks obvious)


    size=22

    (or some other size)


    value="imac"

    (or the search strategy you ran in Step 6)


    Haven't found it? Don't worry, it's not as easy as you think.

Here's another way:

  1. Launch a Web Page Creation program (like Filemaker/Claris Home Page or Adobe's PageMill)
  2. Open the HTML "Input Page" you saved in Step 2c, and use the program to view the page in "Edit Page" mode.
  3. Find the "search box" and select the little white box where you type in your search request.
  4. Now use the program to view the page in "Source", "HTML Source" or "Page Source" mode.
  5. An "<INPUT" line should be highlighted: Find this line in the plug-in & change it.

When you've found the line you need to change, here's how to change it:

If the line:

Then:

...has "value=..."

Replace "value=..." with "user"

...does not have "value=..."

Add the word "user" to the end of the line.





"# --- Choose ONE..."

It's a list of search options: You must select only one.

To do this, look at the Source (or HTML) of the web page.

Tip!

You can write a Sherlock plug-in for each option! Just be sure to give each plug-in a unique NAME. This lets you use Sherlock to search multiple options simultaneously.

.

In our Example, there are seven "INPUT" lines to choose from.
From looking at the HTML of the web site, we discover that:
<INPUT name=qtype value=0>
corresponds to searching the "web". We decide to choose this option for our plug-in.

How do I select which "option" to use?

Remember the "Input File" you saved back in Step 2a? Here's where you'll need it!

  1. Open the file in a Web Browser.
  2. View the page's Source, or HTML.
    (In Netscape, it's
    View-->Page Source)
  3. Scroll down the file (or use "Find") to locate the first "INPUT" line of the group you need to select from.
  4. Read them over & select one of them.
  5. Return to your Sherlock plug-in, look for that same group of lines, and remove all of the "INPUT" lines except the one you selected.



(click here for Part 5)



[ About issp_builder | Download isspbuilder | What is Sherlock? | Contact Me! ]

AOL's Home Page!
It's Made on a Mac!
Find out about Filemaker's HomePage 3.0
Check out MicroFrontier's ColorIt!


Disclaimer: These plug-ins and any associated programs at this website have been provided to make your searching with Sherlock more convenient & productive. While they have been thoroughly tested & work just fine on my Macintosh, they are provided "as is" without warranty or remedy of any kind: You assume any risks in using this software, and are solely responsible for any outcome resulting from such use. Unless explicitly stated, these plug-ins were created solely by the Author through direct examination & use of the websites mentioned, and are neither endorsed nor supported by Apple Computer or the specific websites they are designed to work with.

Copyright: While this information is available free of charge, it is not in the public domain. Plug-ins may be distributed provided the entire folder of information is distributed without alteration. If you would like to distribute them in a collection, CD-ROM or by other mass duplication means, contact me for permission. Thanks.

Questions? Comments? Plug-ins? Contact me! I welcome any questions, comments, suggestions, plug-ins or links you may have.

Trademarks:

  • Mac and the Mac logo are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. The Made on a Mac Badge is a trademark of Apple Computer, Inc., used with permission.

Any other trademarks, service marks, or icons mentioned/shown in this document are the property of their respective owners, and it is not the intention of this site to dilute or compromise such marks: Contact me if you wish your mark to be acknowledged or removed from this site.

 

StatTrack.com - Free Stats for your WebSite!
keeping my stats since 06-23-00 (thanks!)