from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search


computing: software: web: MediaWiki: customization: modifying the MediaWiki searchbox


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"
	        value="<?php $this->msg('search') ?>" />

Modify the last "value=" line:

value="<?php $this->msg('searchbutton') ?>" />

Then set Mediawiki:searchbutton to the text you want on the button.