User:Sam Odio/Add Google & Yahoo Searches in MediaWiki Search Results
From BluWiki
< User:Sam Odio(Redirected from Sam Odio/Add Google & Yahoo Searches in MediaWiki Search Results)
I first found this here. but the instructions aren't quite right.
So here they are, re-written (for MediaWiki 1.5.2). This will add a Google AND Yahoo search button to your site. You can try out our search to see what it will look like.
- Edit the SpecialSearch.php page in the includes folder of your MediaWiki installation
- Pase the below code
$wgOut->addWikiText( wfMsg( 'Googlesearchheader' ) ); $GoogleSearchField = htmlspecialchars( $term ); $wgOut->addHTML( wfMsg( 'Googlesearch', $GoogleSearchField, "UTF-8") ); }
above the following lines (should be lines 214-215):
$wgOut->addHTML( $this->powerSearchBox( $term ) ); wfProfileOut( $fname );
- Save SpecialSearch.php
- Then grab the text in BluWiki's MediaWiki:Googlesearch & MediaWiki:Googlesearchheader wikitext and paste it into same pages (with the exact same page names) in your wiki.
- Remember to change "bluwiki.org" to your domain name in the Googlesearch file
- You can play around with your MediaWiki:Googlesearch to customize that part search page. Don't worry about the fact that Googlesearch doesn't look right when saved, this is because it is in HTML and not Wiki markup. It will look different on the search results page.






