Wordpress + AdSense Search...

Stang Man

2[H]4U
Joined
Jan 19, 2002
Messages
2,532
I'm trying to setup AdSense search on my website and I have it integrated with my wordpress theme just fine. However, when I use Google's search of my own site, it, well... Googles it. This is a problem, as Google is not finding things on my site. I would like to make AdSense search through Google if "web" radio button is selected, and use wordpress search if "my site" is selected... anyone understand what I'm trying to do?

here's the Wordpress searchform.php:

Code:
<h2>Site search</h2>
<form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<div>
<label for="s">Search for:</label>
<input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="14" />
<input type="hidden" id="searchsubmit" value="Search" />
</div>
</form>

And here's the Google AdSense Search script:

Code:
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="google_window">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="right" height="32">

</td>
<td nowrap="nowrap">
<div>
<input type="hidden" name="domains" value="my.site.com"></input>
<input type="text" name="q" size="17" maxlength="255" value=""></input>
<input type="hidden" id="searchsubmit" value="Search" />
</div></td></tr>
<tr>
<td>&nbsp;</td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked="checked"></input>
<font size="-2" color="#b20000">Web</font>
</td>
<td>
<input type="radio" name="sitesearch" value="my.site.com"></input>
<font size="-2" color="#b20000">This Site</font>
</td>
</tr>
</table>
<input type="hidden" name="client" value="pub-NUMBERSHERE"></input>
<input type="hidden" name="forid" value="1"></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:#B20000;GL:1;DIV:#B20000;VLC:72179D;AH:center;BGC:FFFFFF;LBGC:336699;ALC:B20000;LC:B20000;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->

Like, if it was to be some kind of (in very general terms)

IF "Web" = true, then <form method="get" action="http://www.google.com/custom" target="google_window">
ELSEIF "This Site" = true, then <form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">


Hope this is clear enough... thanks for the help :)
 
Back
Top