📄 readme.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><html><head><title>SearchToHTML ReadMe</title></head><body bgcolor="#ffffff" text="#000000" link="#0000ff" alink="#ff0000" vlink="#ff00ff"><h1>SearchToHTML ReadMe</h1><em>August 17, 2000</em><br><a href="#parameters">[The Parameters]</a><h2>Introduction</h2><p>The SearchToHTML applet provides visitors to your homepage with a simple way of searching your site. The compact search applet sends the search results onto a JavaScript to be displayed as HTML. The August 17, 2000 release of the applet slightly improves the efficiency of searches and expands and corrects the applet's documentation. For more information on the modifications to the source code, see the individual source files. (Since the May 12, 2000 release of the applet, the following <a href="#parameters">parameters</a> have been added: leadingcontextlength, trailingcontextlength, xhtml_chkbx_checked, exact_chkbx_checked, and max_num_matches.)</p><p>The SearchToHTML applet is based on the AdvSiteSearcher applet. Using HTML to display the results (rather than a list within the applet) has made it possible to add three new features to the search results (not available before because of display space concerns): the match context (some of the words surrounding the match), the nearest anchor to the match (so that the visitor doesn't have to scroll as much), and the title of the page (if it is encountered before a match).</p><p>This applet is distributed as <a href="#linkware">linkware</a> for The Gilbert Post. Each site that uses the applet must include a link to The Gilbert Post, <a href="http://www.geocities.com/gilbertnews/">http://www.geocities.com/gilbertnews/</a>. </p><h2>Adding SearchToHTML to your site</h2><p>To add SearchToHTML to your site, follow these directions:</p><dl><dt>1. Upload the required files to the same directory as the HTML file that will display the applet. The required files are: <dd> <ul><li>SearchToHTML.class <li>HDocSearcher.class <li>SearchSieve.class <li>searchresults.html</ul> <dd>(These should have been included with this document. The spelling and case of the class file file names are significant. The applet will probably not even load if you change these file names.)<p> <dt>2. Paste the following code into the page where you want the applet to appear:<dd><form><textarea cols=50 rows=12> <!--Directions for your visitors--> Enter your queries (separated by spaces or commas) in the search box. To search for a sequence of words, place the words in between double quotes (for example, "black cat"). <applet code="SearchToHTML.class" width=350 height=60> <!--Required parameter: if it's left out, it won't work--> <param name="files" value="[replace with the files to be searched]"> <!--See ReadMe.html for optional parameters--> This feature requires a <a href="http://java.sun.com">Java</a> enabled browser. </applet> <br> <a href="http://www.geocities.com/Athens/Parthenon/1911">Visit The Gilbert Post</a>, independent student paper of Gilbert High School, Iowa, USA.</textarea></form><p> 3. Change the pasted code to fit your needs. The "file" parameter is required. Change its value to be 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 would add "cool.html" to "files.")</dl><h2>A few notes</h2> <ul> <li>Only the files specified in "files" are searched. <li>The "target" parameter specifies which frame to show found pages in. By default, it is set to "_top". <li>The "waitforall" parameter specifies whether the applet should start outputing HTML as the results are received or when all the HDocSearchers have reported. By default this is set to false unless the target parameter is set to "_self" or "_top" in which case "waitforall" is always set to true. <li>The "startwords" parameter specifies words to be in the search box when the applet first starts. See the file <a href="ex_startwords.html">ex_startwords.html</a> for an interesting use of this parameter. <li>See <a href="frames.html">frames.html</a> for a frames example. <li>You may not be able to test the applet locally with Internet Explorer. The applet transmits the matches to a script (contained in searchresults.html) using a query string ("?etc."); Internet Explorer considers this to be a different file, which it will not be able to find. <li>Be aware that your browser may cache the search results page. <li>Be aware that some browsers will cache the applet even if you reload the page containing it. <li>See the source of <a href="searchresults.html">searchresults.html</a> for notes on the format of the query string. <li>See <a href="paramex.html">paramex.html</a> for examples of nearly all the parameters.</ul><h2>Changing the style of the search results</h2>The applet encodes the search results and sends them onto a JavaScript found in <a href="searchresults.html">searchresults.html</a>. If you would like to change the display of thesearch results, you'll need to modify searchresults.html. If you're interested in changing the text of the search results, look under the heading "Text used in search results messages:" in the source of searchresults.html. If you're interested in leaving out the closest anchor, document info, or context from each search result, then look under the heading "Which elements should be displayed along with the results?"<h2>Capability, compatability, and contact info</h2><p>This version of SearchToHTML does not support Boolean expressions or wild card searches. (These features are under active investigation.) When a visitor enters a search phrase, the applet divides the phrase into tokens and searches for each token individually. If a match for a token is found in a document, that document is added to the list of matches (equivalent to a Boolean "or" search). The order of the documents in the search results is non-deterministic.</p><p>If you experience any problems with the applet or have suggestions, please e-mail <a href="mailto:gilbertnews@hotmail.com">gilbertnews@hotmail.com</a>. However, the SearchToHTML applet is distributed without warranty or guarantee. Use it at your own risk.</p><p>SearchToHTML uses only the APIs of JDK 1.02 so it should run under all "Java-enabled" browsers. (If it doesn't run because of a compatibility error, please report the problem.) SearchToHTML's source code is included with this distribution. Send your questions or comments on the source to <a href="mailto:gilbertnews@hotmail.com">gilbertnews@hotmail.com</a>.</p><p>Contact: David Faden <<a href="mailto:gilbertnews@hotmail.com">gilbertnews@hotmail.com</a>></p><a name="parameters"></a><h2>Parameters guide</h2><param name="[name]" value="[value]"> (The [name] is case insensitive.)<br><em>See the source code of <a href="paramex.html">paramex.html</a>.</em><h3>Required</h3><blockquote><b>files</b>: list of files to be searched, separated by commas or spaces.</blockquote><h3>Optional</h3><blockquote><b>target</b>: name of frame for the search results to be displayed in. Defaults to "_top".<br><b>waitforall</b>: set to true, the applet will not send HTML until all the documents (from "files") have been searched. By default, waitforall is set to false unless the target parameter is set to "_self" or "_top" in which case waitforall is always true.<br><b>startwords</b>: words to be displayed in the search box on the first appearance.<br><b>max_num_matches</b>: the maximum number of matches that will be reported. The default value is the number of documents to be searched. <br><b>leadingcontextlength</b>: how many characters previous to (and including) the match should be displayed. Defaults to 15.<br><b>trailingcontextlength</b>: how many characters following the match should be included in the context displayed in the search results. Defaults to zero.<br><b>resultspage</b>: the name of the file containing the JavaScript to decode the search results; defaults to "searchresults.html"<br><b>xhtml_chkbx_checked</b>: set this parameter to "true" to initially check the "Exclude HTML" (or equivalent) checkbox.<br><b>exact_chkbx_checked</b>: set this parameter to "true" to initially check the "Exact matches only" (or equivalent) checkbox.</blockquote><h3>Change the colors</h3><blockquote><b>bgcolor</b>: the background <a href="#colors">color</a> of the applet. <br><b>fgcolor</b>: the foreground (text of labels) <a href="#colors">color</a>.<br><b>buttonbgcolor</b>: the background <a href="#colors">color</a> of the buttons.<br><b>buttonfgcolor</b>: the foreground <a href="#colors">color</a> of the buttons.<br><b>checkboxbgcolor</b>: the background <a href="#colors">color</a> of the checkboxes. (The effect varies across platforms.)<br><b>checkboxfgcolor</b>: the foreground <a href="#colors">color</a> of the checkboxes. (The effect varies across platforms.)<br><b>searchboxbgcolor</b>: the background <a href="#colors">color</a> of the search box.<br><b>searchboxfgcolor</b>: the foreground <a href="#colors">color</a> of the search box.</blockquote><h3>Change the text</h3><blockquote><b>searchbox_label_txt</b>: the text next to the search box.<br><b>search_btn_txt</b>: the text of the button that starts a search.<br><b>stop_btn_txt</b>: the text of the button used to stop a search.<br><b>exact_chkbx_txt</b>: the text of the check box used to specify exact matches only.<br><b>xhtml_chkbx_txt</b>: the text of the check box used to specify whether HTML should be ignored.</blockquote><a name="colors"></a><p><big><tt style="color:red">C</tt><tt style="color:#ffcc00">o</tt><tt style="color:yellow">l</tt><tt style="color:green">o</tt><tt style="color:blue">r</tt><tt style="color:purple">s</tt></big><p>The following colors are available by name: black, green, blue, darkblue, lightblue, cyan, darkgray, gray, lightgray, magenta, orange, pink, red, white, and yellow.<p>If the SecurityManager allows it, you may also try to get System (property) defined colors.<p>Colors may also be defined as hexadecimal strings (beginning with "#" as in HTML).<hr><hr><a name="linkware"></a>Linkware Agreement: You will maintain a prominent link to <a href="http://www.geocities.com/Athens/Parthenon/1911">The Gilbert Post (http://www.geocities.com/Athens/Parthenon/1911/)</a> or <a href="http://www.geocities.com/gilbertnews/">http://www.geocities.com/gilbertnews/</a> if you include the SearchToHTML applet or a variant on its code on your site. (Please also leave our spiel on the search results page.) Other than this, the applet is free.<P>Have fun!<p>SearchToHTML © 1999 - 2000 David Faden for <a href="http://www.geocities.com/Athens/Parthenon/1911/">The Gilbert Post</a><p><small>The Gilbert Post is an independent student paper serving Gilbert High School of Gilbert, Iowa, and the world (hopefully). 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 SearchToHTML applet and a link to us to your page, you are helping The Gilbert Post. Thank you.</small></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -