A variety of variables need to be defined.  They are as follows.

@dirs:  This variable should be defined with a list of the full
(absolute) paths to the directories you wish the script to search.
(The absolute path of any directory can be found by issuing the UNIX
“pwd” command while “sitting” in that directory.  Paths are also shown
in most FTP programs.)  By default, only HTML files in the specific
directories you specify will be searched.  If you wish to search *all*
text files in a given directory, instead of just HTML files, append a
“/+” to the directory name.  If you want to search files in the listed
directory *and* in all of its subdirectories, append a “/*” to the
directory name.  If you want to search *all* text files in the
directory *and* in all of its subdirectories, append a “/*+” to
the directory name.

%webbbs4_dirs:  If you want to include the messages from any WebBBS
4.XX forums in your searches, you should define the relevant data
directories and corresponding URLs here.  (If you want to search
the messages from pre-4.00 versions of WebBBS, use the %otherurls
variable, described below.)  WebSearch will directly access the
database and search index files of any of your WebBBS forums, and
will include any matching messages in its search results listing.

(Note that including WebBBS 4.XX forums in your searches enforces
the same restrictions as utilizing WebSearch’s own search index, in
terms of case sensitivity and inability to actually rank relevance
of search results.  The WebBBS 4.XX search indexes, like WebSearch’s
own index, don’t record how many times any given term appears in a
message, nor do they record independently upper- and lower-case
occurrences of the terms.)

The variable should be defined as shown in the example below.

%webbbs4_dirs = (

$ListExcludedFiles:  If this variable is set to 1, then all files
within the directories defined in @dirs, but *NOT* incuded in
searches, will be listed along with other info when you run the
script without parameters.  (For example, when you’re creating or
updating your search database, as explained above.)  This can be
handy when setting things up, so you can be sure nothing is being
excluded that you don’t want excluded.  However, for normal
operation, you should define this variable to 0.  That will
prevent anyone else from running the script directly and obtaining
a complete list of the files on your server.

$DBMType:  This variable should be defined just as it is in your
WebBBS 4.XX configuration files.  In most cases, that means it
should remain set to 0.  Of course, if you’re not including any
WebBBS 4.XX forums in your searches, then it really doesn’t matter
*how* $DBMType is set.  ;)

$searchindex:  If you want to utilize a search index, define this
variable with the full path and name of the file.  You don’t need
to create it manually — and in fact doing so would be of no benefit
at all — but you *do* need to make sure that the script is able to
write to the directory in which it is to be located.

$avoid:  If there are particular files you *don’t* want included in the
search, define them here.  You need only include enough of the file
or directory names to distinguish them from other files.  For example,
if you want to exclude all “.txt” files from the search, you can
simply include “\.txt” as part of $avoid.  (The backslash is used to
tell the script to regard the period as a literal character rather
than a “wildcard.”)

$cgiurl:  Define this variable with the URL of the WebSearch script