Author: Richard Wall
Email: [EMAIL PROTECTED]
Message:
I've created a version of the template file (search.htm) without any html formatting,
so I thought I'd share it with the list.
All the tags have either a class or an ID which can be referred to in a style sheet.
A problem I've been having is that our designers have wanted to edit the template file
in Frontpage / Dreamweaver etc. When they do, they *always* seem to screw it up. The
solution I've found is to only put the bare minimum of HTML in the template file
itself, and create a second file called eg. index.asp based on the site design.
(menu's graphics etc)
(note the 'asp' extension for Frontpage compatibility, only works if your server is
configured to parse .asp files as PHP, and PHP is configured to recognise ASP style
tags)
In this file put a php include statement pointing to the actual php frontend script
(search.php) Now the designers can open the search page without having to touch the
template, and frontpage includes will work in the search page too.
If you're using TopStyle 2.5, you can point it at the file below, and it will extract
all the id and class tags for you.
Hope this makes sense.
---- Template
<!--top-->
<div id="search_input_block">
<form method="GET" action="$A" id="search_form">
<input type="hidden" name="t" value="CAF"/>
<input type="hidden" name="ps" value="10"/>
<p class="search_standard_paragraph">Search for: <input
type="text"
name="q" size=50 value="$Q"
id="search_input_box"/><input
type="submit" value="Search!"
id="search_submit_button"/></p>
<p class="search_standard_paragraph">
Results per page:
<select name="ps" id="search_results_pagination_select">
<option value="10" SELECTED="$ps">10</option>
<option value="20" SELECTED="$ps">20</option>
<option value="50" SELECTED="$ps">50</option>
</select>
Default query type:
<select name="m" id="search_query_type_select">
<option value="and" SELECTED="$m">All</option>
<option value="or" SELECTED="$m">Any</option>
<option value="phraser" SELECTED="$m">Phrase</option>
</select>
</p>
<!-- end of stl options -->
</form>
</div>
<!--/top-->
<!--restop-->
<div id="search_stats_block">
<p class="search_standard_paragraph"
id="search_stats_time">Search
Time: <span
id="search_stats_time_value">$SearchTime</span></p>
<p class="search_standard_paragraph"
id="search_stats_range">Displaying
documents $f-$l of total <span
id="search_stats_total">$t</span>
found.</p>
</div>
<!--/restop-->
<!--res-->
<div id="search_results_block">
<p class="search_results_title_line"><span
class="search_results_number">$DN.</span>
<a href="$DU" TARGET="_blank"
title="$DU"><span
class="search_results_title">$DT</span></a></p>
<p class="search_results_abstract_line">$DE...</p>
<p class="search_results_stats_line">($DC) $DM, $DS bytes</p>
</div>
<!--/res-->
<!--resbot-->
<p>$V</p>
<!--/resbot-->
<!--clone-->
<p class="search_results_clone_list"><a href="$DU"
target="_blank">$DU</a> ($DC) $DM</p>
<!--/clone-->
<!--navigator-->
<div class="search_navigation_block">$NL $NB $NR</div>
<!--/navigator-->
<!--navleft-->
<a href="$NH" class="search_nav_prev_active">Prev</a>
<!--/navleft-->
<!--navleft_nop-->
<span class="search_nav_prev_inactive">Prev</span>
<!--/navleft_nop-->
<!--navbar1-->
<a href="$NH" class="search_nav_page_number">$NP</a>
<!--/navbar1-->
<!--navbar0-->
<span class="search_nav_page_number_current">$NP</span>
<!--/navbar0-->
<!--navright-->
<a href="$NH" class="search_nav_next_active">Next</a>
<!--/navright-->
<!--navright_nop-->
<span class="search_nav_next_inactive">Next</span>
<!--/navright_nop-->
<!--notfound-->
<div id="search_stats_block">
<p class="search_standard_paragraph"
id="search_stats_time">Search
Time: <span
id="search_stats_time_value">$SearchTime</span></p>
<p class="search_standard_paragraph"
id="search_stats_words">Search
results: <span
id="search_stats_words_value">$W</span></p>
</div>
<div class="search_error_block">
<p class="search_standard_paragraph">Sorry, but search returned
no results. Try to produce less restrictive search query.</p>
</div>
<!--/notfound-->
<!--error-->
<div class="search_error_block">
<p class="search_standard_paragraph">An error occured!</p>
<p class="search_standard_paragraph">$E</p>
</div>
<!--/error-->
<!--noquery-->
<div class="search_error_block">
<p class="search_standard_paragraph">You should give at least
one word to search for.</p>
</div>
<!--/noquery-->
<!--bottom-->
<div id="search_footer_block">
<p class="search_standard_paragraph"
id="search_powered_by"><a
href="http://search.mnogo.ru/"><img
src="http://search.mnogo.ru/img/udm.gif"
border="0"/></a><p>
</div>
<!--/bottom-->
----
---- Stylesheet
/**
* search section
*/
/* classes */
.search_error_block{
border : 1px dotted Red;
font : normal normal bold 14px/normal Verdana, Geneva, Arial, Helvetica,
sans-serif;
text-align : center;
margin : 10px 0px 0px 0px;
padding : 10px 10px 10px 10px;
}
.search_standard_paragraph{
margin : 2px 0px 1px 0px;
}
.search_nav_next_active { }
.search_nav_page_number { }
.search_nav_page_number_current { }
.search_nav_prev_active { }
.search_navigation_block {
text-align : center;
border-bottom : 1px solid Black;
border-top : 1px solid Black;
}
.search_results_abstract_line {
margin : 5px 0px 0px 20px;
}
.search_results_number {
font-weight : bold;
}
.search_results_title {
}
.search_results_title_line {
margin : 10px 0px 0px 0px;
}
.search_results_url {
font-size : 9px;
}
.search_results_stats_line {
margin : 2px 0px 0px 20px;
font : normal normal normal 10px;
}
/* unique IDs */
#search_footer_block { }
#search_form { }
#search_input_block {
border : thin solid Black;
background : #FFCC00;
padding : 10px 10px 10px 10px;
}
#search_input_box { }
#search_powered_by {
text-align : center;
}
#search_query_type_select { }
#search_results_block { }
#search_results_pagination_select { }
#search_stats_block {
border : 1px solid Black;
background : #FFF098;
margin : 10px 0px 0px 0px;
padding : 10px 10px 10px 10px;
}
#search_stats_range { }
#search_stats_time {
}
#search_stats_time_value {
font : bold;
}
#search_stats_total {
font : bold;
}
#search_stats_words { }
#search_stats_words_value {
font : bold;
}
#search_submit_button { }
----
Reply: <http://www.mnogosearch.org/board/message.php?id=3109>
___________________________________________
If you want to unsubscribe send "unsubscribe general"
to [EMAIL PROTECTED]