The XSearch script is a powerfull javascript search engine. This version5 is an improved version of the older v4.x versions. One of the main changes is that it's not compatible with 3.0 browsers. There are some other minor changes and some things have been left out because not many people used it. If you still want the functionality of the previous versions please download version4.3 from the dynamic-core.net website http://www.dynamic-core.net. Note that XSearch5 is much faster, and more customizeable then the older versions.
The following files are supplied with XSearch5:
WARNING: Updated for version5.2, the db.js file is now created in another
way, please read!
This chapter will explain how you can fill the XSearch database with your own
url's and keywords.
The db.js file contains the definition of the database needed by XSearch. XSearch is build using Javascript, this has the advantage that everybody can use it without the need for a cgi-bin or other server side options. The disadvantage of using Javascript is that it's impossible to search through directory structures and files on the server. So you'll have to create the database manually for every page in your website.
Every XSearch database entry (record) is created using three text array's. The first of these arrays will contain a working link to the target html file, the second array contains a set of keywords, and finally the third array contains a description of the current database entry. Xsearch adds a new function called add() you can use this to add the record information to the database:
As you can see in the above example, it's very simple to create a new record.
The xsearch.css file, contains the styles used by the XSearch5 engine to display the different text lines. By modifying this file, you can change the look of every text line used in the XSearch engine. This is a big improvement over the old XSearch engines that could only change the color of the fonts.
The db.js file contains a few variables that need to be set to make the search work correctly.
templateBody() , templateEnd() and bannerCode() for more information on these functions, read the article: Setting up your own search engine. That article was written for the older versions of XSearch, but the templateBody(), templateEnd() and bannerCode() workings haven't changed.
Finally you'll have to create a HTML file that links the XSearch5 engine and the database like this:
Warning: The order of linking the two files is very important, make sure the xsearch-5.js file is linked first, and the db.js file second.. otherwise you'll get some error messages.
If you have any questions after this manual, please browse through the old XSearch FAQ and knowledge base articles (http://www.dynamic-core.net) before mailing me. Most problems have already been explained in one of those files. If you still can't get it to work you can mail me: <pascal@dynamic-core.net>
Last modified 2000-07-20