AdvSiteSearcher ReadMe

August 18, 2000
(Required Parameters) (Optional Parameters)

Introduction

The AdvSiteSearcher applet provides your visitors with a simple way of searching your site. In addition to using a faster search method than its predecessor (SiteSearcher), the applet is also more safely threaded and caches a portion of each page to avoid the overhead of new connections (if possible).

The August 18, 2000 release fixes a bug in the documentation. In the code to paste (see below), the code attribute of the applet tag was set to "SiteSearcher.class" rather than "AdvSiteSearcher.class" (or "AdvSiteSearcher").

This applet is distributed as linkware.

Directions

To add the AdvSiteSearcher applet to your site, follow these directions:
1. Upload the required files to the same directory as the HTML file that will display the applet (above or at the level of files you wish to be searched). The required files are:
  1. SiteSearcher.class
  2. DocSearcher.class
  3. ProgressBar.class
  4. SearchSieve.class
(These should have been included with this document.)

2. Copy and paste the following code into the page where you want the applet to appear:

3. Change the pasted code to fit your needs. You must set at least one of the "files" or "dirs" parameters. (You can also use both if you wish.) Pass the "files" parameter a list of files separated by commas or spaces. (The file names should be relative to the page on which the applet is displayed. For example, if the applet were on "http://www.BBB.com/index.html" and you wanted "http://www.BBB.com/cool.html" to be searched, you'd add "cool.html" to "files.") The "dirs" parameter takes a list of "dirs" whose contents you wish to be searched. (The link parsing is not recursive - subdirectories must be added separately.) HTTP (to the best of my knowledge) doesn't include a method to get a listing of a directory. However, if the default page (usu. "index.html") is not included in the directory, when that directory is requested most servers will spit out an HTML page listing the directory contents. The AdvSiteSearcher applet parses this page for links and adds these to the search list.

Notes

Capabilities, compatability, and contact

This version of AdvSiteSearcher does not support Boolean expressions or wild card searches (though these features are still being investigated). If you experience any problems or have suggestions, please e-mail gilbertnews@hotmail.com. The AdvSiteSearcher applet is distributed without and warranty or guarranty. Use it at your own risk.

There is a bug in Netscape's Java implementation that will cause a crash if a user clicks in an empty list. AdvSiteSearcher avoids this problem by always adding an extra entry to the top of the search results.

AdvSiteSearcher uses only the methods of JDK 1.02 so it should run under all "Java-enabled" browsers. The source code has been included with this distribution of the applet. Send your questions about the source to gilbertnews@hotmail.com.

Contact: David Faden <gilbertnews@hotmail.com>

Parameters reference

Required:

One or both of,
files: list of files (separated by commas or spaces) to be searched.
dirs: list of directories (separated by commas or spaces), whose contents are to be searched.

Optional

cachesize: how much of each page searched is to be cached for the next search. Set the cachesize to zero or less for no caching...(The default size is 2000 characters.)
startwords: text to be displayed in the search box when the applet is first displayed.

Change the colors

bgcolor: the background color of the applet.
fgcolor: the foreground (text of labels) color.
bordercolor: the color of the border around the applet.
(Some platforms (like the Mac's MRJ) do not allow you to set the of some native components.)
buttonbgcolor: the background color of the buttons.
buttonfgcolor: the foreground color of the buttons.
checkboxbgcolor: the background color of the checkboxes. (This effect varies across platforms.)
checkboxfgcolor: the foreground color of the checkboxes. (This effect varies across platforms.)
searchboxbgcolor: the background color of the search box.
searchboxfgcolor: the foreground color of the search box.
pbaroncolor: the color of the part of the progressbar showing progress.
pbaroffcolor: the background/border color of the progressbar.
listbgcolor: the background color of the list.
listfgcolor: the foreground color of the list.

Change the text

searchbox_label_txt: the text next to the search box.
search_btn_txt: the text of the button that starts a search.
stop_btn_txt: the text of the button used to stop a search.
exact_chkbx_txt: the text of the check box used to specify exact matches only.
xhtml_chkbx_txt: the text of the check box used to specify whether HTML should be ignored.
pbar_msg_txt: the message displayed in the progressbar.

Colors

The following colors are available by name: black, green, blue, darkblue, lightblue, cyan, darkgray, gray, lightgray, magenta, orange, pink, red, white, and yellow.

If the SecurityManager allows it, you may also try to get System (property) defined colors.

Colors may also be defined as hexadecimal strings beginning with "#" as in HTML. (For example, red would be #ff0000.)


Linkware Agreement: You will maintain a prominent link to The Gilbert Post (http://www.geocities.com/Athens/Parthenon/1911/) if you include the AdvSiteSearcher Applet or a derivative of it on your site. (If you would like to include components of the applet in a non-applet program, please e-mail gilbertnews@hotmail.com for permission and conditions.) Other than this, the applet is free. But, as has been said, you are using and displaying this linkware at your own risk.

Have fun!

AdvSiteSearcher © 1999 - 2000 David Faden for The Gilbert Post

The Gilbert Post is an independent student (infrequently updated) paper serving Gilbert High School of Gilbert, Iowa, and the world (ha). It was founded because at the time (and at present) there was no official school paper, a chasm that needed to be filled. By adding the AdvSiteSearcher and a link to us to your page, you are giving The Gilbert Post a real boost. Thank you.