Alison Russell wrote:
I have added a Google search box to my Wiki. I am
using 1.4 beta-6.
Please upgrade to 1.4rc1 as soon as possible. Earlier releases include
cross-site scripting and other bugs which could potentially be exploited
to takeover accounts, etc.
I
have added it to monobook.php which is fine, but the length of the
Google section extends right across the page. I want it to be the same
width as the navigation, search and toolbox section. I think I should be
adding it to the code that controls the left hand side panel of each
page, the quickbar I think its called?!?
Where do I find that code? And where should I add the Google link so
that the text box and Google image appear after the search section and
before the toolbox section along the left of the page?
Open up MonoBook.php and search for the first occurence of the word
"search", you'll find this bit:
<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>
You'd want to put the equivalent code for your search right after it.
The class="portlet" on the outer <div> and the class="pBody" on
the
inner <div> are important for keeping the size and style.
-- brion vibber (brion @
pobox.com)