How to create a Keyword Search Page
You must register to use our Keyword Search Engine. Contact our sales department for more information.
The
use of extended services from the Do-It-Yourself Web! server is a premium
service that can be arranged in advance.
The Keyword Search tool uses SWISH as it's engine. There are a variety of
Perl scripts that serve as the interface to
this powerful and fast index system. This page explains how to set up an
HTML form
that will enable you or your readers to search your site by keyword. You can
use boolean
expressions to narrow your search (ie. and/or). Before you can search your
site
by keyword, you must configure
your index. If you have already configured your index, but you have since
added extra
pages and you wish to add the new pages to your index with the same
configuration
you can re-index it at
any time.
An example of a form and it's source are here to aid you.
Instructions
Required
Statements
Your form must include the following statement:
<FORM METHOD="POST" ACTION="http://web.idirect.com/cgi-bin/search.pl">
The two absolutely required fields are the user field and the
keywords field. They MUST come
after the FORM statement above and should look like this (replace the user
name with your login name). The keywords tag should appear exactly as it is
displayed
although you are free to change the value of SIZE="60" to any size you
prefer.
<INPUT TYPE="hidden" NAME="user" VALUE="yourloginname">
<INPUT TYPE="text" NAME="keywords" VALUE="" SIZE="60">
Remember that UNIX is case sensitive...both the above statements contain
strings that MUST be in the case displayed above. Be sure to close off your
form with the tag when you have finished listing all your fields
Optional Fields
- title
- This form field allows you to specify the title and header
that will appear on the resulting page.
- Method
- If you wanted a title of 'Our Search Form Results':
<INPUT TYPE="hidden" NAME="title" VALUE="Our Search Form Results">
- return_link_url
- This field allows you to specify a URL that will appear, as
return_link_title, on the following report page. It is useful if you want
to allow
the user to receive the report on the following page, but want to offer
them a way to get back to your main page.
- Method
- <INPUT TYPE="hidden" NAME="return_link_url"
VALUE="http://web.idirect.com/~yourname/">
- return_link_title
- This is the title that will be used to link the user back to
the page you specify with return_link_url. The two fields will be shown
on the resulting form page as:
<ul>
<li><a href="return_link_url">return_link_title</a>
</ul>
- Method
- <INPUT TYPE="hidden" NAME="return_link_title" VALUE="Back to Main
Page">
(Replace the VALUE tag content with whatever you like)
Changing the appearance of the default
confirmation page
The following fields can be used to change the <BODY> tag of the
default
confirmation screen
- background
bgcolor
text_color
link_color
vlink_color
alink_color
- These fields will change the default values of the <BODY> tag from
the default of <body bgcolor="#0b014b"
background="http://www.idirect.com/graphics/bgcolor.jpg"
text="#eeeeee" link="#00ff00" vlink="#ffff00" alink="#ff0000"> to
whatever you specify.
- Method
- To use a file called image.gif in your root directory as the
background:
<INPUT TYPE="hidden" NAME="background"
VALUE="http://web.idirect.com/~yourname/image.gif">
For a background colour of white:
<INPUT TYPE="hidden" NAME="bgcolor" VALUE="#FFFFFF">
For a text colour of black:
<INPUT TYPE="hidden" NAME="text_color" VALUE="#000000">
For a link colour of red:
<INPUT TYPE="hidden" NAME="link_color" VALUE="#FF0000">
For a visited link colour of blue:
<INPUT TYPE="hidden" NAME="vlink_color" VALUE="#0000FF>
For a active visited link colour of yellow:
<INPUT TYPE="hidden" NAME="alink_color" VALUE="#FFFF00>