The Advanced-All-In-One Theme


The Advanced-All-In-One theme is composed of the following:
File
Description
a1search.hts
All-In-One search form. Displays multi-line query text box and check boxes that allow you to specify the collections included in the searched.
allinone.hts
All-in-one advanced results list. This template provides the framework within which the Compact, Normal, and Advanced templates work. Initially, normal.hts is used. From here, you can choose one of the other levels, or you can select a document.
compact.hts
Compact results list. Displays a document's rank, score, title, and URL on a single line.
normal.hts
Normal results list. Displays a document's rank, score, and title on one line, the size and URL on another, and then a brief summary.
advanced.hts
Advanced results list. Displays results in clusters, with summary keywords on one line, score and title on another, then a brief summary followed by the size and URL and finally a query by example link to find more documents like the selected.
allviep.hts
All-in-one document view form. When "Use view template for navigating results" is selected in a1search.hts, this template is used to display a document. Allows navigation to previous and next documents, and back to results list.

All-In-One Search Form

The All-In-One search form template, a1search.hts, provides a multiline query text box and checkboxes for the collections available to the search.

Following is some the HTML form and SEARCHScript source for a1search.hts. It is only a portion of a1search.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="Primary">
<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>
<INPUT TYPE="HIDDEN" NAME="ResultTemplate" VALUE="allinone.hts">
<INPUT TYPE="HIDDEN" NAME="ResultStyle" VALUE="normal">
<INPUT TYPE="HIDDEN" NAME="ClusterPageSize" VALUE="5">
<INPUT TYPE="HIDDEN" NAME="ClusterCount" VALUE="5">
<CENTER><TABLE BORDER=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>
<TR><TD ALIGN=CENTER>
<INPUT TYPE="CHECKBOX" NAME="ViewTemplate" VALUE="allviep.hts">Use view template for navigating results
</TD></TR></FORM>

All-In-One Results Templates

When you click Search on the All-In-One search form, Information Server displays an initial results template. From that template, you can choose among three levels of display for the results. The initial template is required to provide the framework within which the other templates work. The templates which comprise the All-In-One theme are:

All-in-one Results

When you click Search on the All-In-One search form, Information Server displays the following page.

Following is some the HTML form and SEARCHScript source for allinone.hts. It is only a portion of allinone.hts, and is out of context from the whole file which is required for processing. Note that although allinone.hts displays normal.hts, it also includes parameters for setting up all three subsequent levels of results.


<TABLE BORDER=1 WIDTH=600><TR><TD>
<CENTER><IMG SRC="/search97img/qbanner.gif"></CENTER>
</TD></TR>
<TR><TD>
<CENTER>
<% if exists( request.resultStyle ) %>
<% if 0 = StrComp( request.ResultStyle, "compact" ) %>
[COMPACT]
<% else %>
<A HREF="<% result.pageURLs[ result.pagenumber ] %>&ResultStyle=compact">[COMPACT]</A>
<% endif %>
<% if 0 = StrComp( request.ResultStyle, "normal" ) %>
[NORMAL]
<% else %>
<A HREF="<% result.pageURLs[ result.pagenumber ] %>&ResultStyle=normal">[NORMAL]</A>
<% endif %>
<% if 0 = StrComp( request.ResultStyle, "advanced" ) %>
[ADVANCED]
<% else %>
<A HREF="<% result.pageURLs[ result.pagenumber ] %>&ResultStyle=advanced">[ADVANCED]</A>
<% endif %>
<% else %>
<A HREF="<% result.pageURLs[ 1 ] %>&ResultStyle=compact">[COMPACT]</A>
[NORMAL]
<A HREF="<% result.pageURLs[ 1 ] %>&ResultStyle=advanced">[ADVANCED]</A>
<% endif %>
</CENTER>
</TD></TR>
<TR><TD>
<TABLE><TR><TD>
<% if exists( request.ResultStyle ) %>
<% if 0 = StrComp( request.ResultStyle, "compact" ) %>
<%--#include file="compact.hts" --%>
<% endif %>
<% if 0 = StrComp( request.ResultStyle, "normal" ) %>
<%--#include file="normal.hts" --%>
<% endif %>
<% if 0 = StrComp( request.ResultStyle, "advanced" ) %>
<%--#include file="advanced.hts" --%>
<% endif %>
<% else %>
<%--#include file="normal.hts" --%>
<% endif %>
</TD></TR></TABLE>
</TD></TR></TABLE>

Compact Results

When you click Compact on the All-In-One results template, Information Server displays the following page.

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


<TABLE><TR><TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
<P>Your query <B><% PrintHTMLEsc(QueryText) %></B> matched <B>$$(DocsFound)</B>
out of <B>$$(DocsSearched)</B> documents, shown below.
</TD></TR>
<TR><TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
<!--- Page selection ([Prev]1|2|3|4[Next]) --->
<% if Count(result.pageurls) > 1 %>
<% if prevpageurl then %>
<A HREF="$$(prevpageurl)&ResultStyle=$$(request.resultStyle)">
[Prev]</A>
<% endif %>
<% if nextpageurl then %>
<A HREF="$$(nextpageurl)&ResultStyle=$$(request.resultStyle)">
[Next]</A>
<% endif %>
<% endif %>
</TD></TR>
<TR><TD COLSPAN=4>
<% if DocsFound > 0 then %>
<TABLE><TR><TD><B>Rank</B></TD>
<TD><B>Score</B></TD>
<TD><B>Title</B></TD>
<TD><B>URL</B></TD></TR>
<% foreach doc in result.documents %>
<TR><TD VALIGN=TOP>$$doc.rank</TD>
<TD VALIGN=TOP>$$doc.score</TD>
<TD VALIGN=TOP>
<A HREF="$$doc.URL_HTML">
<% if exist( doc.title ) %>
$$doc.title
<% else %>
no title
<% endif %>
</A>
</TD>
<TD VALIGN=TOP>
<A HREF="$$doc.URL">$$doc.vdkVgwKey</A>
</TD></TR>
<% endfor %>
</TABLE>
<% else %>
<H4>No documents found</H4>
<% endif %>
</TD></TR>
<TR><TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
<!--- Page selection ([Prev]1|2|3|4[Next]) --->
<% if Count(result.pageurls) > 1 %>
<% for i = 1 to Count(result.pageurls) %>
<% if i != pagenumber %>
<A HREF="<% result.pageurls[i] %>
&ResultStyle=$$(request.resultStyle)">$$i</A>
<% else %>
$$i
<% endif %>
<% endfor %>
<% endif %>
</TD></TR></TABLE>

Normal Results

When you click Normal on the All-In-One results template, or are viewing Information Server displays the following page.

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


<TABLE><TR><TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
<P>Your query <B><% PrintHTMLEsc(QueryText) %></B> matched <B>$$(DocsFound)</B>
out of <B>$$(DocsSearched)</B> documents, shown below.
</TD></TR>
<TR><TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
<!--- Page selection ([Prev]1|2|3|4[Next]) --->
<% if Count(result.pageurls) > 1 %>
<% if prevpageurl then %>
<A HREF="$$(prevpageurl)&ResultStyle=$$(request.resultStyle)">[Prev]
</A>
<% endif %>
<% if nextpageurl then %>
<A HREF="$$(nextpageurl)&ResultStyle=$$(request.resultStyle)">[Next]</A>
<% endif %>
<% endif %></TD></TR>
<TR><TD COLSPAN=4><% if DocsFound > 0 then %>
<TABLE><TR><TD><B>Rank</B></TD>
<TD><B>Score</B></TD>
<TD><B>Document Information</B></TD></TR>
<% foreach doc in result.documents %>
<TR><TD VALIGN=TOP>$$doc.rank</TD>
<TD VALIGN=TOP>$$doc.score</TD>
<TD VALIGN=TOP>
<A HREF="$$doc.URL_HTML">
<% if exist( doc.title ) %>
$$doc.title
<% else %>
$$doc.vdkVgwKey
<% endif %></A></TD></TR>
<TR><TD></TD><TD></TD>
<TD><FONT SIZE=-1>Size: <I>
<% if Val( doc.size ) > 1024 %>
<% Val( doc.size ) / 1024 %>KB
<% else %>
$$doc.Size bytes
<% endif %>
</I>, URL: <I>$$doc.vdkVgwKey</I></FONT>
</TD></TR>
<TR><TD></TD><TD></TD>
<TD><FONT SIZE=-1>Summary: <I>$$doc.storedSummary</I></FONT></TD></TR>
<% endfor %>
</TABLE>
<% else %>
<H4>No documents found</H4>
<% endif %>
</TD></TR>
<TR><TD COLSPAN=4 VALIGN=TOP ALIGN=CENTER>
<!--- Page selection ([Prev]1|2|3|4[Next]) --->
<% if Count(result.pageurls) > 1 %>
<% for i = 1 to Count(result.pageurls) %>
<% if i != pagenumber %>
<A HREF="<% result.pageurls[i] %>&ResultStyle=$$(request.resultStyle)">$$i</A>
<% else %>
$$i
<% endif %>
<% endfor %>
<% endif %>
</TD></TR></TABLE>

Advanced Results

When you click Advanced on the All-In-One results template, Information Server displays the following page.

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


<TABLE><TR><TD>
<P>Your query <B><% PrintHTMLEsc(QueryText) %></B> matched <B>$$(DocsFound)</B>
out of <B>$$(DocsSearched)</B> documents which are are grouped into <B><% Count( result.clusters ) %></B>
clusters, shown below.
</TD></TR><TR><TD COLSPAN=4>
<% if DocsFound > 0 then %>
<TABLE>
<% foreach cluster in result.clusters %>
<TR><TD VALIGN=TOP><B><CENTER>Group $$cluster.index </CENTER></B></TD>
<TD VALIGN=TOP COLSPAN=3><B>Summary:</B> $$cluster.keywordSummary</TD></TR>
<% offset = 1 %>
<% foreach doc in cluster.documents %>
<TR><TD></TD>
<TD VALIGN=TOP><% doc.score %>%</TD>
<TD><A HREF="$$doc.URL_HTML">
<% if exist( doc.title ) %>
$$doc.title
<% else %>
$$doc.vdkVgwKey
<% endif %></A></TD></TR>
<TR><TD></TD><TD></TD>
<TD COLSPAN=2><FONT SIZE=-1>Summary:
<i><% doc.storedSummary %></i></FONT></TD></TR>
<TR><TD></TD><TD></TD>
<TD><FONT SIZE=-1>Size: <I>
<% if Val( doc.size ) > 1024 %>
<% Val( doc.size ) / 1024 %>KB
<% else %>
$$doc.Size bytes
<% endif %>
</I>, URL: <I>$$doc.vdkVgwKey</I></FONT>
</TD></TR>
<TR><TD></TD><TD></TD>
<TD COLSPAN=2>
<A HREF="$$(doc.URL_QBE)&ResultStyle=advanced">find more like this...</A></TD></TR>
<% offset = offset + 1 %>
<% endfor %>
<TR><TD></TD><TD></TD>
<TD COLSPAN=2>
<!--- Page selection ([Prev]1|2|3|4[Next]) --->
<% if Count(cluster.pageurls) > 1 %>
<!--- Generate [Prev] ? --->
<% if cluster.prevpageurl then %>
<A HREF="$$(cluster.prevpageurl)&ResultStyle=advanced">[Prev]</A>
<% endif %>
<!--- Iterate thru each page (unless it's the current page) --->
<% for i = 1 to Count(cluster.pageurls) %>
<% if i != cluster.pagenumber %>
<A HREF="<% cluster.pageurls[i] %>&ResultStyle=advanced">$$i</A>
<% else %>
$$i
<% endif %>
<% endfor %>
<!--- Generate [Next] ? --->
<% if cluster.nextpageurl then %>
<A HREF="$$(cluster.nextpageurl)&ResultStyle=advanced">[Next]</A>
<% endif %>
<% endif %>
</TD></TR><% endfor %>
<TR><TD></TD></TR>
</TABLE>
<% else %>
<H4>No documents found</H4>
<% endif %>
</TD></TR></TABLE>

All-In-One Viewer Template

The All-In-One viewer template, allviep.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.