コンフィグレーション
Default configuration file
The default configuration file contains all the required default values.
In the new configuration file:
- For a global parameter initialisation use the following syntax: $__param = value;
This initialisation could be overwritted by the parameter snippet call.
E.g: $__hideLink = 0; - To overwrite parameter snippet call use $param = 'value';
E.g: $hideLink = 0;
StripInput function
Pur: To define a custom stripInput function
if (!function_exists(myStripInput)) {
function myStripInput($searchString){
.... // change the searchString
return $searchString;
}
}
Not: Use the functions stripslashes, stripTags and
stripHtml provided by AjaxSearch
StripOutput function
Pur: To define a custom stripInput function
if (!function_exists('myStripOutput')) {
function 'myStripOutput' ($text){
.... // change the output text
return $text;
}
}
$config['grpLabel']
Pur: Label for a group of results
Not: in the categConfig function a label could be defined to be be linked with the group of results. This isn't a snippet parameter. Only a variable of configuration file. This variable shouldn't contain a comma (",")
categConfig function
Pur : To define the display of categories
if (!function_exists('categConfig')) {
function categConfig(
$site='defsite', $category){
$config = array();
// set up config depending $site & $category
....
return $config;
}
}