The Power Theme


The Power theme is composed of the following:
File
Description
pwersrcp.hts
Power search form. Displays multi-line text box for the query and check boxes that allow you to specify which collections are to be searched. Also allows you to specify the minimum score to be displayed, whether the results list should be sorted by score or title in ascending or descending order, and which results list to use.
pwerrslp.hts
Power results list. Displays a single line results list showing score, title and document size. Allows navigation by page number.
pwerviep.hts
Power document view form. Allows navigation to previous and next documents, and back to results list.

Power Search Form

The Power search form template, pwersrcp.hts, provides a multiline query text box, checkboxes for the collections available to the search, and several results options.

Following is the HTML form and SEARCHScript source for pwersrcp.hts. It is only a portion of pwersrcp.hts and is out of context from the whole file which is required for processing.


<FORM METHOD="GET" ACTION="$$VTopicScriptName">
<INPUT TYPE=HIDDEN NAME="ServerKey" VALUE="$$ServerKey">
<INPUT TYPE=HIDDEN NAME="Theme" VALUE="$$Theme">
<INPUT TYPE=HIDDEN NAME="Company" VALUE="$$Company">
<DD><H4>Collections:</H4>
<% x = 0 %>
<% coll_count = Count( Collections ) %>
<% if coll_count > 0 %>
<CENTER>
<TABLE BORDER=0 WIDTH=100%>
<% foreach coll in Collections %>
<%-- trim out the collections that are not enabled or is not in the default list --%>
<% if exists( coll.state ) AND 0 = StrComp( coll.state, "Enabled" ) %>
<% if exists( coll.defaultList ) AND 0 = StrComp( coll.defaultList, "True" ) %>
<% x = x + 1 %>
<% if x % 2 %>
<TR>
<TD WIDTH=25%></TD>
<TD><INPUT TYPE="checkbox" NAME="collection" VALUE="$$coll.Alias" CHECKED>$$coll.Name</TD>
<% else %>
<TD><INPUT TYPE="checkbox" NAME="collection" VALUE="$$coll.Alias" CHECKED>$$coll.Name</TD>
</TR>
<% endif %>
<% endif %>
<% endif %>
<% endfor %>
<% if x % 2 %>
</TR>
<% endif %>
</TABLE>
</CENTER>
<% else %>
<DD>No collections.
<% endif %>
<BR>
<BR>
<TABLE>
<TR>
<TD VALIGN=center><DD><H4>Results options:</H4></TD>
</TR>
<TR>
<TD>&#160;</TD>
<TD VALIGN=CENTER ALIGN=left>
<SELECT NAME="ResultTemplate">
<OPTION SELECTED VALUE="smplrslp.hts">Default
<OPTION VALUE="smplrslp.hts">Simple Results List Display
<OPTION VALUE="stndrslp.hts">Standard Results List Display
<OPTION VALUE="pwerrslp.hts">Power Results List Display
</SELECT>
</TD>
</TR>
<TR>
<TD>&#160;</TD>
<TD VALIGN=center>
<I>Score Threshold(0 - 100): </I>
<INPUT TYPE="text" SIZE=10 NAME="ScoreThreshold" VALUE="25">
</TD>
</TR>
<TR>
<TD>&#160;</TD>
<TD VALIGN=center>
<I>Sort By:</I>
<SELECT NAME="SortField">
<OPTION SELECTED VALUE="Score">Score
<OPTION VALUE="Title">Title
<OPTION VALUE="URL">URL
</SELECT>
<SELECT NAME="SortOrder">
<OPTION SELECTED VALUE="Desc">Desc
<OPTION VALUE="Asc">Asc
</SELECT>
</TD>
</TR>
</TABLE>
<TABLE BORDER=0>
<TR>
<TD VALIGN=center><DD><H4>Query:</H4></TD>
</TR>
<!-- <TR>
<TD>
INPUT TYPE="text" NAME="QueryText" VALUE=""
<B>User Query Parser:</B>
<SELECT NAME="QueryMode">
<OPTION SELECTED VALUE="Simple">Simple
<OPTION SELECTED VALUE="FreeText">Freetext
<OPTION SELECTED VALUE="BoolPlus">Boolean Plus
</TD>
</TR>
-->
</TABLE>
<CENTER>
<TABLE BODER=0>
<TR>
<TD COLSPAN=2><b>Enter words or phrases, separated by commas:</b></TD>
</TR>
<TR>
<TD COLSPAN=2><TEXTAREA NAME="QueryText" ROWS=2 COLS=50></TEXTAREA></TD>
</TR>
<TR>
<TD><INPUT TYPE="image" SRC="/search97img/search.gif" NAME="SEARCH-97" ALT="Search" BORDER=0></TD>
<TD ALIGN=RIGHT><INPUT TYPE="reset" VALUE=" Clear "></TD>
</TR>
</TABLE>
</CENTER>
</FORM>

Power Results Template

The Power results template, pwerrslp.hts, displays the document hits in a list with rank, document score, title, and size. For more information on navigation links, including source, see "Navigation Links" above.

Following is some of the HTML and SEARCHScript source for pwerrslp.hts. It is only a portion of pwerrslp.hts and is out of context from the whole file which is required for processing.


<TABLE>
<TR><TH>Rank</TH><TH>Score</TH>
<TH ALIGN="Left">TITLE</TH><TH>Size</TH></TR>
<% Foreach Doc in Result.Documents %>
<TR><TD>$$doc.Rank</A></TD><TD>$$Doc.Score</TD>
<TD><A HREF="<%$$Doc.URL_HTML%>ViewTemplate=<% PrintUrlEsc("pwerviep.hts") %>&ServerKey=$$ServerKey&AdminImagePath=<% PrintUrlEsc(AdminImagePath) %>&Theme=$$Theme&Company=<%PrintUrlEsc(Company)%>">
<% If exists(Doc.Title) Then %>
$$Doc.Title
<% Else %>
No Title
<% EndIf %>
</A></TD>
<TD>$$doc.Size</TD></TR>
<% Endfor %>
</TABLE>

Power Viewer Template

The Power viewer template, pwerviep.hts, displays the full body of a document and provides navigation links.

The document view templates are identical in how they work, basically only differing in the text string declaring to which theme they belong. These templates, smplviep.hts, stndviep.hts, pwerviep.hts, advsviep.hts, and allviep.hts, have been separated by file name to make it easier for you to customize and maintain them by theme.

The basic building block, used in all the document view templates, for displaying the full body of a document is:


<BR>
<% HTMLBodyPrint %>
<BR>
The rest of the template is composed of HTML for formatting the look of the page, and SEARCHScript navigation links for returning to the results list and viewing the next or previous document. For more information on navigation links, including source, see "Navigation Links" above.

For more information on customizing the document view template, see the SEARCHScript Reference Guide.





Copyright © 1998, Verity, Inc. All rights reserved.