CNSearch 1.5.1
Templates Settings
The template part contains HTML code generating HTML-document with the search results. You should use special symbols within this code, which will be replaced by the corresponding text after the HTML document will be generated:
- %Q - Query text;
- %G - Query text (urlencoded);
- %O - Quantity of found pages;
- %N - Number of a found page;
- %U - URL of a found page;
- %T - Name of a found page;
- %S - Match (displayed only in case of the absolute match; otherwise nothing is displayed);
- %R - Relevance of a found page;
- %E - Description of a found page;
- %D - Date of the last update of a found page;
- %C - Character coding of a found page;
- %F - Name of a search script;
- %I - Number of the site in the search index;
- %P - Stop words found in the query;
- %W - Search phrase description;
- %L - Enable sorting by relevance;
- %A - Enable sorting by date of the document update;
- %B - Navigation links (< << 1 2 3 4 5 6 >> >)
For example:
-- cnsearch.conf ----------------------------------------
# This is a cnsearch configuration file
::CONFIG regcode = Enter Oner registration code here
::CONFIG stats = password
::CONFIG content-type = text/html
::CONFIG NonStrictMatch = [non strict match]
::CONFIG StopWords =, Ignored Words :
::CONFIG SearchType = Combined
::HTMLTOP
<HTML>
<HEAD>
<TITLE>Search results - %Q</TITLE>
</HEAD>
<BODY>
<table width=400 height=40 align=center bgcolor=#C0C0C0>
<form action="%F" method=get><tr><td align=center>
<input type=text name=q size=40 maxlength=64 value="%Q">
<input type=submit value="Search">
</td></form></tr></table>
Documents found: %O
<B>%O</B><font color=gray>%W<B>%P</B></font><br>
<br>
<div align=right>
Sort by: <a href="%A">date</a> | <a href="%L">relevancy</a>
</div>
::HTMLRESULT
<HR>
<UL>
<LI>%N. <a href="%U" target=_new>%T</A> <small>
<font color=red>%S</font> [Relevancy: %R]</small>
<UL>
<LI>%E
<LI>%D
<LI>%C
<LI><a href="%U" target=_new>%u</A>
</UL>
</UL>
::HTMLNOTFOUND
<P><font color=red>%Q not found</font>
::HTMLBOTTOM
%B
</BODY>
</HTML>
-- end cnsearch.conf ------------------------------------