diff --git a/include/text.php b/include/text.php index f3e44b3ebc..9a65224af9 100644 --- a/include/text.php +++ b/include/text.php @@ -986,21 +986,26 @@ if(! function_exists('search')) { * @param string $url search url * @param boolean $savedsearch show save search button */ -function search($s,$id='search-box',$url='/search',$save = false) { +function search($s,$id='search-box',$url='/search',$save = false, $aside = true) { $a = get_app(); - return replace_macros(get_markup_template('searchbox.tpl'), array( - '$s' => $s, - '$id' => $id, - '$action_url' => $a->get_baseurl((stristr($url,'network')) ? true : false) . $url, - '$search_label' => t('Search'), - '$save_label' => t('Save'), - '$savedsearch' => feature_enabled(local_user(),'savedsearch'), - '$searchoption' => array( + + $values = array( + '$s' => $s, + '$id' => $id, + '$action_url' => $a->get_baseurl((stristr($url,'network')) ? true : false) . $url, + '$search_label' => t('Search'), + '$save_label' => t('Save'), + '$savedsearch' => feature_enabled(local_user(),'savedsearch'), + ); + + if (!$aside) + $values['$searchoption'] = array( t("Full Text"), t("Tags"), t("Contacts"), - t("Forums")) - )); + t("Forums")); + + return replace_macros(get_markup_template('searchbox.tpl'), $values); }} if(! function_exists('valid_email')) { diff --git a/mod/search.php b/mod/search.php index d5e0dfb208..d9a2852dd4 100644 --- a/mod/search.php +++ b/mod/search.php @@ -111,7 +111,7 @@ function search_content(&$a) { } - $o .= search($search,'search-box','/search',((local_user()) ? true : false)); + $o .= search($search,'search-box','/search',((local_user()) ? true : false), false); if(strpos($search,'#') === 0) { $tag = true; diff --git a/view/templates/searchbox.tpl b/view/templates/searchbox.tpl index b9a01752c0..9c1be50cf6 100644 --- a/view/templates/searchbox.tpl +++ b/view/templates/searchbox.tpl @@ -2,12 +2,14 @@