Browse Source

Only offer forum search in local mode.

pull/1853/head
Michael Vogel 6 years ago
parent
commit
b1dddd2936
  1. 6
      include/nav.php
  2. 9
      include/text.php
  3. 2
      view/templates/searchbox.tpl
  4. 2
      view/theme/vier/templates/nav.tpl

6
include/nav.php

@ -121,8 +121,10 @@ function nav_info(&$a) {
$nav['searchoption'] = array(
t("Full Text"),
t("Tags"),
t("Contacts"),
t("Forums"));
t("Contacts"));
if (get_config('system','poco_local_search'))
$nav['searchoption'][] = t("Forums");
$gdirpath = 'directory';

9
include/text.php

@ -998,12 +998,15 @@ function search($s,$id='search-box',$url='/search',$save = false, $aside = true)
'$savedsearch' => feature_enabled(local_user(),'savedsearch'),
);
if (!$aside)
if (!$aside) {
$values['$searchoption'] = array(
t("Full Text"),
t("Tags"),
t("Contacts"),
t("Forums"));
t("Contacts"));
if (get_config('system','poco_local_search'))
$values['$searchoption'][] = t("Forums");
}
return replace_macros(get_markup_template('searchbox.tpl'), $values);
}}

2
view/templates/searchbox.tpl

@ -7,7 +7,7 @@
<option value="fulltext">{{$searchoption.0}}</option>
<option value="tags">{{$searchoption.1}}</option>
<option value="contacts">{{$searchoption.2}}</option>
<option value="forums">{{$searchoption.3}}</option>
{{if $searchoption.3}}<option value="forums">{{$searchoption.3}}</option>{{/if}}
</select>
{{/if}}

2
view/theme/vier/templates/nav.tpl

@ -76,7 +76,7 @@
<option value="fulltext">{{$nav.searchoption.0}}</option>
<option value="tags">{{$nav.searchoption.1}}</option>
<option value="contacts">{{$nav.searchoption.2}}</option>
<option value="forums">{{$nav.searchoption.3}}</option>
{{if $nav.searchoption.3}}<option value="forums">{{$nav.searchoption.3}}</option>{{/if}}
</select>
</form>
</li>

Loading…
Cancel
Save