You may make common changes to Webinator's search appearance by
Search Settings from the administrative interface main
But you are not limited to those features. You may change any and all
aspects of the search program's appearance and behavior by modifying
search script or writing an altogether new one.
For details on programming with Texis Web Script (Vortex), see the
manual at the Thunderstone web site,
The following section describes some important points about the internals of the default search script that comes with Webinator. The search script is fairly heavily commented to aid in finding your way around within it.
init function is called from every entry point. It is a
good place to put settings that should always (or often) apply. This
function understands the old (version 2) style specification of
database by the
db variable as well as the current method of
extracting the database name from the profile named by the
top function displays the common HTML for the beginning of
every page generated by the search script. This does not include the
search form. This function is where you would place styles and
bottom function is the complement to the
It displays the common HTML footer for the end of every page.
showform function displays the search form with all current
fpar functions process the user's form
submission and apply appropriate search settings.
credit function displays the Thunderstone credit on the search
results. This is required for free users but may be changed or emptied
for paid users.
result function is called for each matching record to display.
It then calls the configured
result* function to generate the
desired output style.
mlt function is called to setup the search when the end user
Find Similar" (aka More Like This).
similar function may be called directly to find pages within the
database that are similar to the content of the URL specified. It has the
same concept of "
Find Similar" but will work on any specified URL,
not just those displayed as the result of a search. It would
be invoked something like this on any HTML page.
<a href="/cgi-bin/texis/webinator/search/similar.html?pr=default&ref=http://example.com/somepage.html">Find pages similar to somepage.html</a>
<a href="/scripts/texis.exe/webinator/search/similar.html?pr=default&ref=http://example.com/somepage.html">Find pages similar to somepage.html</a>
default above to the search profile you're using.
It will lookup that URL in the database or, if it's not in the database, fetch it from the webserver. It will then search the database looking for indexed pages similar to the specified page.
main function is the standard Vortex default entry point. This is
the function that is first called when users click "Submit" on the search form.
search function does the core work of finding matching documents
within the database. It calls
qpar then starts
searching. For every match the
result function is called. The
summary function is called before the first match is displayed to
display the search results summary. It is called again at the end of the
putmsg function handles errors that may occur and displays
them in a somewhat more user friendly fashion. See the Vortex manual
for details about how
putmsg is used to capture errors.