Search box (by Google ?)
Few times I was told I’m very picky. Actually too picky ;). I guess it concerns also ‘stuff’ I use on my site. Especially when I know it CAN be better then original product.
It’s known that search option built-in WP installation works pretty well but with posts only; pages are ignored. It doesn’t really matter on this site since the only one page I have is ‘About me’ ;). But on my main site I have pages with content I wanted to include to search results.
I decided that Google search box would be good but…
UPDATE - Aug 03 2007
NEVER again put post online in the middle of the night! It seems to me like I’m not able to copy text from Word and paste it to WP :) . And probably I wouldn’t even have noticed it if there had been no comment on that post (thanks wallace ;) ).
First I wanted to use code I found on Ask Dave Taylor site. Here is code I used for my site:
<li class="sidebox">
<h2>Wyszukaj:</h2>
<form method="get" action="http://www.google.com/search">
<ul>
<li><input type="text" name="q" size="25" maxlength="180" value="" /></li>
<li><input type="radio" name="sitesearch" value="" /> www</li>
<li><input type="radio" name="sitesearch" value="nietoperzka.com" checked="checked" /> Poznawanie Nietoperzki</li>
</ul>
<p align="center"><input type="submit" value="START" /></p>
</form>
</li>
and result:

Then I was pointed out that using Google search box WITHOUT their logo/trademark might be against their TOS. I searched on that and haven’t found any clear info. There is bunch of stuff on license when using CSE but nothing special when you use code taken from some other place. I wrote e-mail to them with question. Hopefully they will answer.
But in the meantime I decide to use code provided on Google site. I had to adjust it to my site look and feel and here is how it looks now (‘sitting’ in sidebar.php):
<!-- SiteSearch Google -->
<li class="sidebox">
<h2>Wyszukaj z Google:</h2>
<form method="get" action="http://www.google.com/custom" target="google_window">
<ul>
<li><input type="hidden" name="domains" value="www.nietoperzka.com"></input>
<input type="text" name="q" size="25" maxlength="180" value=""></input></li>
<li><input type="radio" name="sitesearch" value=""></input> www</li>
<li><input type="radio" name="sitesearch" value="www.nietoperzka.com" checked="checked"></input> Poznawanie Nietoperzki
<input type="hidden" name="client" value="pub-1185634157404086"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="8239981232"></input>
<input type="hidden" name="ie" value="ISO-8859-1"></input>
<input type="hidden" name="oe" value="ISO-8859-1"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:32;LW:75;L:http://www.google.com/logos/Logo_25wht.gif;S:http://www.google.com/;FORID:1;"></input>
<input type="hidden" name="hl" value="en"></input></li>
</ul>
<p align="center"><input type="submit" name="sa" value="START"></input></p>
</form>
</li>
<!– SiteSearch Google –>
I didn’t want to use Google logo image because it doesn’t really suits my sidebar look ;). So I’ve changed header of search box and now it is “Wyszukaj z Google:” (“Google search” – more or less ;) ).
Cool :D!
1st August 2007 2 comments





Nie jestem pewien, ale wydaje mi się, że usunięcie logo Google z ich wyszukiwarki na swojej stronie łamie licencję na jej wykorzystanie. To trzeba by było sprawdzić
ps. do WP jest plugin Advanced Search.
Dzięki za zwrócenie mi na to uwagi, bo… szczerze mówiąc to nie pomyślałam o tym.
Spędziłam dobrą godzinę próbując coś wyciągnąć z ich TOS, ale… to jest obłąkane. Wygląda jakby nie uwzględnili faktu, że ktoś może używać Google search box stworzonego w inny sposób niż za pomocą Custome Search Engine >> :). Tak więc napisałam do nich maila z pytaniem, a potem przerobiłam kod używając info z tej >> strony i nagłówek na stronie zmieniłam na “Wyszukaj z Google” :D.
Jak dowiem sie coś więcej, to dam znać.
ps. ten plugin to jak kombajn!
na pierwszy rzut oka wygląda na ZBYT potężny w stosunku to potrzeb mojej stronki. Ale zbadam to dokładniej.