[Mediawiki-l] Google search on nav bar

Ben Arnold (DSLWN) BenA at datacom.co.nz
Thu Dec 1 21:59:32 UTC 2005


Thanks Alistair.

In the end I implemented it as a separate search box and it works well.
I inserted this HTML in our /skins/MonoBook.php after the existing
search box.

	<div id="p-search" class="portlet">
	  <h5><label for="searchInput">Google search</label></h5>
	  <div class="pBody">
	    <form name="searchform"
action="http://www.google.com/search">
            <input name="ie" value="UTF-8" type="hidden"/>
            <input name="oe" value="UTF-8" type="hidden"/>
	      <input id="searchInput" name="q" type="text"/>
	      <input type="submit" name="go" class="searchButton"
id="searchGoButton"
	        value="Google"/>
	    </form>
	  </div>
	</div>

Technically I think I shouldn't be re-using the "p-search" and
"searchInput" IDs, because IDs are supposed to be unique. It seems to
work though (at least in IE and Firefox).

Thanks again,


Ben

-----Original Message-----
From: mediawiki-l-bounces at Wikimedia.org
[mailto:mediawiki-l-bounces at Wikimedia.org] On Behalf Of Alistair Johnson
Sent: Friday, 11 November 2005 4:03 p.m.
To: MediaWiki announcements and site admin list
Subject: RE: [Mediawiki-l] Google search on nav bar

Hi Ben,

We hacked up a custom skin for our Intranet mediawiki installation which
includes code to easily search MediaWiki or Google.

There are probably prettier ways, but this worked for us.  Hope it
helps.

Cheers,

Al.



More information about the MediaWiki-l mailing list