Make your own free website on Tripod.com

XSearch 5.2

User manual

Overview

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.

Files explained

The following files are supplied with XSearch5:

Creating the Database

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.

Entries

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:

add(url,keywords,description)
example:

add("<a href='http://www.dynamic-core.net'>dynamic-core.net</a>","great dhtml xsearch javascript search engine","This is the homepage of dynamic-core.net, including the XSearch5.0 homepage")

As you can see in the above example, it's very simple to create a new record.

XSearch CSS style sheet

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.

Configuration parameters

The db.js file contains a few variables that need to be set to make the search work correctly.

ButtonCode = "<img src='searchbutton.gif' border=0>"

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.

Making it work

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.

<html>
<head>
<title>Xsearch 5</title>

<script language="Javascript" src="xsearch-5.2.js"></script>
<script language="Javascript" src="db.js"></script>

<body bgColor="#ffffff">
<script language="Javascript">
    initXsearch()
</script>
</body>
</html>

Contact information

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