Difference between revisions of "MediaWiki/archive/customizing/searchbox"
< MediaWiki | archive | customizing
Jump to navigation
Jump to search
m (post-move tweaks) |
m (Woozle moved page modifying the MediaWiki searchbox to MediaWiki/archive/customizing/searchbox without leaving a redirect: obsolete) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
=={{hide|navbar}}== | =={{hide|navbar}}== | ||
{{web software|MediaWiki}}: [[MediaWiki customization|customization]]: [[modifying the MediaWiki searchbox]] | {{web software|MediaWiki}}: [[MediaWiki customization|customization]]: [[modifying the MediaWiki searchbox]] | ||
| + | |||
==Notes== | ==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): | 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): | ||
Latest revision as of 22:55, 14 December 2017
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.