[Home]WikiPatches/SearchButton

UseModWiki | WikiPatches | RecentChanges | Preferences

I have added the $SearchButton? config variable (defaulting to 0) into the 1.0 code. (I try not to change existing wikis when adding new options.) --CliffordAdams
On some browsers, having no submit button seems to break the search form at the bottom. This replacement subroutine adds it.

sub GetSearchForm {
  return T('Search:') . ' '
    . $q->textfield(-name=>'search', -size=>20) . ' '
    . $q->submit('dosearch', T('Go!'));
}


With the setting of a config-variable (see GlobalVariables), you will be able to use the search-button or not:

$SearchButton= 1;	              # 1 = with search-button , 0 = no search-button

sub GetSearchForm {
  my ($result);
  $result = T('Search:') . ' ' . $q->textfield(-name=>'search', -size=>20);
  if ($SearchButton) {
    $result = $result . $q->submit('dosearch', T('Go!'));
  } else {  
    $result = $result . &GetHiddenValue("dosearch", 1);
  }
  return $result;  
}


WikiPatches

UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited September 2, 2007 4:39 pm by MarkusLude (diff)
Search: