How to add search functionality to your dotnet.org.za blog
Go to the admin section of your
blog and paste the following code into the Static News/Announcments
section...
<h3>Search</h3>
<input class="BlogSearch" type="text"
name="searchBox" id="blogSearchText" value="" onkeypress="return
blogSearch(event, this);">
<input type="button" value="Search"
onclick="return blogSearch2('blogSearchText');" class="BlogSearchButton">
<script type="text/javascript">
function
blogSearch(event, oInput) {
var keyCode = (event) ? event.keyCode :
keyStroke.which;
if (keyCode == 13) {
top.location =
'http://www.google.co.za/search?q=' + escape(oInput.value) +
'+inurl%3Akevint+site%3Adotnet.org.za';
return false;
} return true;
}
function blogSearch2(oInputId) {
var oInput = document.getElementById(oInputId);
top.location =
'http://www.google.co.za/search?q=' + escape(oInput.value) +
'+inurl%3Akevint+site%3Adotnet.org.za';
return false;
}
</script><br>
<a href="http://www.google.com">
<IMG SRC="http://www.google.com/logos/Logo_25wht.gif"
border="0" ALT="Powered by Google">
</a>
Just replace kevint with your
own blog name...
[Tips hat to David Cumps]
[UPDATE: Apparently using this functionality got some bloggers removed from the google index, so use with caution. Personally I don't blog so that google can index me, so i don't mind being the guinea pig - will comment again on this post if i see any issues]
[UPDATE 2: From what i can make out, putting in a google logo as i have done above should placate Google and stop them from messing with you.]