NB! This version only searches
html documents on your own site -
You cannot provide links to
e.g. yahoo or files on other servers.
This is due to Java security
restrictions.
Content of this page:
Before you start - read this FIRST!
PersonalSearch 1.0 -> 4.0:
Upgrading
from previous versions of PersonalSearch
Major
changes since PersonalSearch 1.0
Step by step:
First
Step: Creating a search file
Second
Step: Adding Applet-code to the client-page
Third Step: Upload
Advanced features:
READ
THIS FIRST: Inserting parameters in a html document - a crash course
Changing
the Colors
Label to display
Changing the language
OPEN_IN_FRAME parameter
Other:
Limitations of the programs
Problems?
Credits
Before you start - read this FIRST!
The search applet, "Search_4.0.jar", which your visitors use, will only work in browsers supporting java 1.1 and higher (That means : Netscape Communicator 4.06 and above and Internet Explorer 4.0 and above!). The applet will not load if your visitor uses another browser (as far as I know). It might also run in the HotJava Browser - I haven't testet it.
All programming by Ulrik Magnusson, November 1998 - April 1999.
No
Rights Reserved!!
Upgrading from a previous version of PersonalSearch
If the old version is less than 3.0:
Download "Formatter.zip" from : http://www.oocities.org/SunsetStrip/Palladium/1303/java/SearchSite/Formatter.zip
(It's less than 2 kb).
Unzip it and follow the instructions in "README.txt".
Replace the old "search.jar" with the new "PSearch_4.0.jar" at
your site and upload "help.txt".
Also replace the old "search.txt" with the "search.txt" generated
by the formatter.
You will need to change the applet reference in your searchpage
to:
<applet CODE='SearchInterface.class' ARCHIVE='PSearch_4.0.jar'
WIDTH='520' HEIGHT='334' ALT="Your browser
does not support Java 1.1">
Your browser does not support Java 1.1!!
</applet>
You can uninstall the old version (if it's less than version 3.0)
- this one does not need to be set up.
Major Changes since PersonalSearch 1.0
The applet:
First Step: Creating a search file:
BE CAREFUL!!! The search file is not checked by the applet.
NB! If you don't use "Notepad" to edit, please save the file as "text
file" - this will leave out any additional formatting.
This information is also provided in the "search.txt" provided with the distribution.
Here is the syntax of a search file:
<line><newline><line><newline>.....<line><newline>
<line> = <keywords> "|" <URL> "|"
<Title>
<URL> must end with ".html","htm" or ".txt"
An example:
These are keywords|http://www.bogus.com/index.htm|Bogus site
Here the title of the page is "Bogus site",
its URL "http://www.bogus.com/index.htm" and
the keywords associated with this URL "These are
keywords"
Here is an example of a "search.txt" file (in a texteditor - word, wordpad, Notepad) with three entries:
Ulrik Magnusson Menu|http://www.oocities.org/SunsetStrip/Palladium/1303/index.htm|Main
Page
info|http://www.oocities.org/SunsetStrip/Palladium/1303/about.htm|About
this Site
|http://www.oocities.org/SunsetStrip/Palladium/1303/java/SearchSite/manual.htm|PersonalSearch
manual
Notice that the last one has no keywords - insert 2 "spaces" in stead.
Remember that "parse search" will fail if you list links to other servers
or
have files that do not end on ".htm", ".html" or ".txt".
Comments:
In this version you can add comments by starting a line with *, e.g.
:
You can add as many as you like and whereever you like - they will
be ignored.
Ulrik Magnusson Menu|http://www.oocities.org/SunsetStrip/Palladium/1303/index.htm|Main
Page
* This is a comment
* The next entry is the info page for the site
info|http://www.oocities.org/SunsetStrip/Palladium/1303/about.htm|About
this Site
* The next entry is the manual for PersonalSearch
|http://www.oocities.org/SunsetStrip/Palladium/1303/java/SearchSite/manual.htm|PersonalSearch
manual
Notice that the applet will return the results in the order they are
entered in "search.txt". If you have a main
page, it would probably to make sense to put this as the first entry
etc.
Second Step: Adding Applet-code to the client-page:
I have created a hypertext document you can use as the search-page for
your site - "searchpage.htm" - feel
to edit the page.
The essential code in the document is the applet-code:
<center><table BORDER ><tr><td WIDTH="508"><center>
<applet CODE='SearchInterface.class' ARCHIVE='PSearch_4.0.jar'
WIDTH='520' HEIGHT='334' ALT="Your browser
does not support Java 1.1"
<b><font color="#FF0000"><font size=+2>
Your browser does not support Java 1.1!!
</font></font>
</applet></center></td></tr></table></center>
You are on your own if you edit this!
Third Step : Upload
In the Directory "C:\UMsoft\PSearch\" you will find 4 files you need to upload: "PSearch_4.0.jar", "help.txt", "search.txt" and "searchpage.htm". You will need to upload all of these to your site, and they must be placed in the same directory!
You also need to upload a language file - the language files are "english.txt",
"spanish.txt", "italian.txt" - The applet
will use the language you upload. You will also need to set the LANGUAGE_FILE
parameter if you dont upload "english.txt"
NB! "help.txt" contains the text displayed when pressing "help" - you
can edit this if you like.
NB! "Search_4.0.jar" is the compressed applet.
On the 2nd time you upload, you only need to upload the "search.txt" file!.
Load "searchpage.htm" in your browser - you need to load the "searchpage.htm"
that resides
on a server - testing the local version will fail.
"fast search" only loads "search.txt" and searches through this.
"parse search" loads all files specified by their url in "search.txt".
It searches through all files.
If you have less than 100 pages:
Try setting the maximum results to 100, select "parse search"
and click "Search!"
This should produce a list of all files you specified in "search.txt".
If a file is missing, open the Java console. It should say "Error:
unable to read....". If that is the case you
have probably included a non-existing file or a file that does
not have the extension ".html",".htm",".txt".
"fast search" should not fail if "search.txt" is correctly formatted as specified above.
If you have more than 100 pages: You need to make a test plan that will
return hits on all pages.
Inserting parameters in a html document - a crash course
You can control how the applet works from the html document. If you open "searchpage.htm" in a texteditor (e.g. Notepad), you will find the following code somewhere in the file:
<center><table BORDER ><tr><td WIDTH="520"><center>
<applet CODE='SearchInterface.class' ARCHIVE='PSearch_4.0.jar'
WIDTH='520' HEIGHT='334' ALT="Your browser
does not support Java 1.1"
<b><font color="#FF0000"><font size=+2>
Your browser does not support Java 1.1!!
</font></font>
</applet></center></td></tr></table></center>
If you change this code the right way, you can communicate with the
Search applet. You need to insert parameters.
A parameter has a name and a value, and the code looks like this:
<PARAM NAME=A_NAME VALUE="A VALUE">
In order to set the A_NAME parameter to "A VALUE", you add the code just before the </applet> tag :
<center><table BORDER ><tr><td WIDTH="520"><center>
<applet CODE='SearchInterface.class' ARCHIVE='PSearch_4.0.jar'
WIDTH='520' HEIGHT='334' ALT="Your browser
does not support Java 1.1"
<b><font color="#FF0000"><font size=+2>
Your browser does not support Java 1.1!!
</font></font>
<PARAM NAME=A_NAME VALUE="A VALUE">
</applet></center></td></tr></table></center>
You can add as many parameters as you like - here I have added 2 parameters: A_NAME and ANOTHER_NAME
<center><table BORDER ><tr><td WIDTH="520"><center>
<applet CODE='SearchInterface.class' ARCHIVE='PSearch_4.0.jar'
WIDTH='520' HEIGHT='334' ALT="Your browser
does not support Java 1.1"
<b><font color="#FF0000"><font size=+2>
Your browser does not support Java 1.1!!
</font></font>
<PARAM NAME=A_NAME VALUE="A VALUE">
<PARAM NAME=ANOTHER_NAME VALUE="ANOTHER VALUE">
</applet></center></td></tr></table></center>
Label to display:
As a default the "logo" displayed says "Personal Search x.x".
You can change this with the LABEL_TEXT parameter so
that it says e.g. "Search my site":
<PARAM NAME=LABEL_TEXT VALUE="Search my site">
There are 4 different colors in PersonalSearch 4.0:
BACKGROUND - the Background
FOREGROUND - the Foreground
LIST_BACKGROUND - the background of the box where the results are displayed
LIST_FOREGROUND - the foreground of the box where the results are displayed
The value of these must be 3 numbers determining the red, green and
blue values of a color.
White is 255,255,255 and black is 0,0,0.
You can get these values from almost any image editor - e.g. MSPaint
- just open the "options menu" and
select "edit colors" and "define custom colors".
Here is an example:
<PARAM NAME="BACKGROUND" VALUE="100,200,100">
<PARAM NAME="FOREGROUND" VALUE="200,100,100">
<PARAM NAME="LIST_BACKGROUND" VALUE="255,200,100">
<PARAM NAME="LIST_FOREGROUND" VALUE="0,50,100">
This version has support for 3 languages: English (default), Spanish and Italian.
To change the language you need to set the LANGUAGE_FILE parameter:
<PARAM NAME="LANGUAGE_FILE" VALUE="spanish.txt">
or
<PARAM NAME="LANGUAGE_FILE" VALUE="italian.txt">
Also remember to upload the appropriate language file.
NB! If you change the language you might consider rewriting the "help.txt"
file - I have not
provided translations of that text (will be soon, I hope)..
The OPEN_IN_FRAME lets you decide what frame pages opens in when the
user clicks the entry. It defaults to _self.
Other hierarchical parameters are _top and _parent.
To open in the frame "frame_name":
<PARAM NAME="OPEN_IN_FRAME" VALUE="frame_name">
Limitations of the programs
Problems?
If you have problems using the product, please mail me at
ulrikm@yahoo.com,
and I will try to
help you. The newest info about the product can be found here
, where you can also find the newest
version of this manual. I hope you enjoy the product!
Also, again:
I would really appreciate it if
you send me an email saying that you use PersonalSearch.
Credits:
Thanks to everybody who has mailed suggestions and bug reports to me.