HyperFlexSeachForm
From MODx Wiki
HyperFlexSearchForm
Available to download from http://www.modxcms.com/HyperFlexSeachForm-768.html
Parameters
&FSF_showForm=`1|0` 1 = Show search form in results 0 = Don't show search form in results
&FSF_landing=`int` Search result landing page. Within the actual snippet, the config must be $resultsPage = '1';
&FSF_showResults=`1|0` You can define whether this snippet will show the results of the search with it. Do this by assigning the snippet variable FSF_showResults as:
This is useful in situations where you want to show the search results in a different place than the search form. In that type of situation, you would include two of these snippets on the same page, one showing results, and one showing the form.
Default is true.
&hyperSeparator=`` Seperator for character separated lists -- default is , (comma)
&hyperChunk=`` Name of the chunk containing the stop word list. Default is StopWordList
&templateSearch=`` A comma (or other specified delimiter) separated list of templates to include or exclude from the search
&templateSearchMode=`0|1` Indicates whether we exclude or include the templates list
&parentSearch=`` A comma (or other specified delimiter) separated list of parent categories to include or exclude from the search
&parentSearchMode=`0|1` Indicates whether we exclude or include the parent categories list
&documentgroupSearch=`` A comma (or other specified delimiter) separated list of document groups to include or exclude from the search
&documentgroupSearchMode=`0|1` Indicates whether we exclude or include the document groups list
&webgroupSearch=`` A comma (or other specified delimiter) separated list of web groups to include or exclude from the search
&webgroupSearchMode=`0|1` Indicates whether we exclude or include the web groups list
&showExtractCharCount=`0|1` Do we show the total extracts characters count or not? Default is 1.
Config options
The following options can be changed within the snippet. The following text is based on comments found within the snippet
$searchStyle [ 'relevance' | 'partial' ] This option allows you to decide to use a faster, relevance sorted search ('relevance') which WILL NOT include partial matches. Or use a slower, but more inclusive search ('partial') that will include partial matches. Results will NOT be sorted based on relevance.
$useAllWords [ true | false ] If you want only documents which contain ALL words in the search string, set to true. Otherwise, the search will return all pages with ONE or more of the search words (which can be a LOT more pages).
$showSearchWithResults [1 | 0] If you would like to turn off the search form when showing results you can set this to false. Can also be set in template by using the snippet variable.
$resultsPage [int] The default behavior is to show the results on the current page, but you may define the results page any way you like. The priority is:
1- snippet variable - set in page template 2- querystring variable FSF_form 3- variable set here 4- use current page
This is VERY handy when you want to put the search form in a discrete and/or small place on your page- like a side column, but don't want all your results to show up there! Set to results page or leave 0 as default
$grabMax [ int ] Set to the max number of records you would like on each page. Set to 0 if unlimited. Default is 10.
$pageLinkSeparator [ string ] What you want, if anything, between your page link numbers. Default is |
$stripHTML [ true | false ] Allow HTML characters in the search? Probably not. Default is true.
$stripSnip [ true | false ] Strip out snippet calls etc from the search string? Default is true.
$stripSnippets [ true | false ] Strip out snippet names so users will not be able to "search" to see what snippets are used in your content. This is a security benefit, as users will not be able to search for what pages use specific snippets. Default is true
$xhtmlStrict [ true | false ] If you want this form to validate as XHTML Strict compliance, then this needs to be true, but IE has a fieldset bug that I don't know a workaround for. So you can set this to false to avoid it. Default is true.
$minChars [ int ] Minimum number of characters to require for a word to be valid for searching. MySQL will typically NOT search for words with less than 4 characters (relevance mode). If you have $useAllWords = true and a three or fewer word appears in the search string, the results will always be 0. Setting this drops those words from the search in THAT CIRCUMSTANCE ONLY (relevance mode, useAllWords=true). Default value is 4.
To Do -- language and labels
