Difference between revisions of "MediaWiki/archive/customizing/searchbox"

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
(didn't get imported to Customizations page)
 
m (Modifying the MediaWiki Searchbox moved to modifying the MediaWiki searchbox)
(No difference)

Revision as of 14:09, 23 August 2006

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"
	        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.