Feminist SF Wiki:Sidebar search

From Feminist SF Wiki
Jump to navigation Jump to search

Copied from http://meta.wikimedia.org/wiki/Layout_customization#Customizing_the_page_layout on 2007/1/4

How do I move the location of the search box?

This is for the Monobook theme and involves modifying the Monobook.php file - you can see the effect here.

  • In the shell account with the install files, find and select the following code in skins/MonoBook.php:
<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>
 
  • Move it either up or down in the page code, depending on where you want it positioned.
  • A good place to put the search box is just below the logo. To do this, move or copy the above code directly below where you find the following:
 	<div class="portlet" id="p-logo">
	  <a style="background-image: url(<?php $this->text('logopath') ?>);"
	    href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"
	    title="<?php $this->msg('mainpage') ?>"></a>
	</div>