MediaWiki/archive/customizing/searchbox
< MediaWiki | archive | customizing
Jump to navigation
Jump to search
Revision as of 22:55, 14 December 2017 by Woozle (talk | contribs) (Woozle moved page modifying the MediaWiki searchbox to MediaWiki/archive/customizing/searchbox without leaving a redirect: obsolete)
computing: software: web: MediaWiki: customization: modifying the MediaWiki searchbox
Notes
The key which modifies both the title of the search form and the text on the button is "search" (MediaWiki:search). In order to change one without changing the other, find the following code in MonoBook.php (and any other skins you want to work the same way):
<div id="p-search" class="portlet"> <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5> <div class="pBody"> <form name="searchform" action="<?php $this->text('searchaction') ?>" id="searchform"> <input id="searchInput" name="search" type="text" <?php if($this->haveMsg('accesskey-search')) { ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php } if( isset( $this->data['search'] ) ) { ?> value="<?php $this->text('search') ?>"<?php } ?> /> <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('go') ?>" /> <input type='submit' name="fulltext" class="searchButton" value="<?php $this->msg('search') ?>" /> </form> </div> </div>
Modify the last "value=" line:
value="<?php $this->msg('searchbutton') ?>" />
Then set Mediawiki:searchbutton to the text you want on the button.