";
if ($handle = opendir(BASEDIR."includes/search")) {
while (FALSE !== ($file = readdir($handle))) {
if (preg_match("/_include.php/i", $file)) {
$name = '';
$search_name = explode("_", $file);
$locale += fusion_get_locale('', LOCALE.LOCALESET."search/".$search_name[1].".php");
foreach ($locale as $key => $value) {
if (preg_match("/400/i", $key)) {
$name = $key;
}
}
if (isset($locale[$name])) {
$generated .= "";
}
}
}
closedir($handle);
}
$infusions = makefilelist(INFUSIONS, ".|..|index.php", TRUE, "folders");
if (!empty($infusions)) {
foreach ($infusions as $infusions_to_check) {
if (is_dir(INFUSIONS.$infusions_to_check.'/search/')) {
$inf_files = makefilelist(INFUSIONS.$infusions_to_check.'/search/', ".|..|index.php", TRUE, "files");
if (!empty($inf_files)) {
foreach ($inf_files as $file) {
if (preg_match("/_include.php/i", $file)) {
$name = '';
$search_name = explode("_", $file);
if (file_exists(INFUSIONS.$infusions_to_check.'/locale/'.LOCALESET."search/".$search_name[1].".php")) {
$locale_file = INFUSIONS.$infusions_to_check.'/locale/'.LOCALESET."search/".$search_name[1].".php";
} else {
$locale_file = INFUSIONS.$infusions_to_check."/locale/English/search/".$search_name[1].".php";
}
$locale += fusion_get_locale('', $locale_file);
foreach ($locale as $key => $value) {
if (preg_match("/400/i", $key)) {
$name = $key;
}
}
if (isset($locale[$name])) {
$generated .= "";
}
}
}
}
}
}
}
return $generated;
}
}
$__BBCODE__[] = [
'description' => $locale['bb_search_description'],
'value' => "search", 'bbcode_start' => "[search=".$locale['bb_search_where']."]", 'bbcode_end' => "[/search]",
'usage' => "[search=".$locale['bb_search_where']."]".$locale['bb_search_usage']."[/search]",
'onclick' => "return false;",
'id' => 'bbcode_search_'.$textarea_name,
'phpfunction' => "echo generate_search_opts('".$textarea_name."', '".$inputform_name."');",
'dropdown' => TRUE,
'dropdown_style' => 'min-width: 150px;'
];