TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 728
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 600
  • Total: 600

Trying to get Google Search block open in the center to display the results

Started by nokonium, January 02, 2007, 07:06:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cru

hi, i used the adsense for search set up, but i dont see the line

<input type="hidden" name="domains" value="www.yoursite.com"></input>

here's the code i got
<!-- Search Google -->
<center>
<form method="get" action="http://mysite.net/index.php?page=5" target="_top">
<table bgcolor="#cccccc">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">

<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="23" maxlength="255" value="" id="sbi"></input>
</td></tr>
<tr><td valign="top" align="left">
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-x1679330x51556xx"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="3486207923"></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="flav" value="0001"></input>
<input type="hidden" name="sig" value="TmsTOszkCQM1qZIr"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:E6E6E6;LBGC:336699;ALC:0066CC;LC:0066CC;T:000000;GFNT:0066CC;GIMP:0066CC;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->


how do i tweak it?

Zetan

You don't tweak any Google codes.

Where are you pasting the code? Block type?

Is this just a Google search engine or AdSense?


Totally ignore my reply.. I didn't realise this was a work in progress topic  :idiot2:

falguni1

whers is the second code when you want to display it in your page you get 2 codes put the 2nd code in an html box in the center panel

cru

Quotewhers is the second code when you want to display it in your page you get 2 codes put the 2nd code in an html box in the center panel

here it is, i pasted it in my article. it does not work. it just brings me back to my homepage when i try searching.

<!-- Google Search Result Snippet Begins -->
<div id="googleSearchUnitIframe"></div>

<script type="text/javascript">
   var googleSearchIframeName = 'googleSearchUnitIframe';
   var googleSearchFrameWidth = 600;
   var googleSearchFrameborder = 0 ;
   var googleSearchDomain = 'www.google.com';
</script>
<script type="text/javascript"
         src="http://www.google.com/afsonline/show_afs_search.js">
</script>
<!-- Google Search Result Snippet Ends -->

bloodlust

Quote from: cru on August 18, 2007, 10:18:38 AM
hi, i used the adsense for search set up, but i dont see the line

<input type="hidden" name="domains" value="www.yoursite.com"></input>

here's the code i got
<!-- Search Google -->
<center>
<form method="get" action="http://mysite.net/index.php?page=5" target="_top">
<table bgcolor="#cccccc">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">

<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="23" maxlength="255" value="" id="sbi"></input>
</td></tr>
<tr><td valign="top" align="left">
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Google Search" id="sbb"></input>
<input type="hidden" name="client" value="pub-x1679330x51556xx"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="3486207923"></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="flav" value="0001"></input>
<input type="hidden" name="sig" value="TmsTOszkCQM1qZIr"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:E6E6E6;LBGC:336699;ALC:0066CC;LC:0066CC;T:000000;GFNT:0066CC;GIMP:0066CC;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
</center>
<!-- Search Google -->


how do i tweak it?

You seem to be missing quite a bit of code for your search box.  You might try creating a new box and see if you get the entire code.  I just made one and here's what I get for the search box:
Quote
<!-- SiteSearch Google -->
<form method="get" action="http://www.yoursite.com/index.php?page=5" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">

<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></img>

</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="www.yoursite.com"></input>
<label for="sbi" style="display: none">Enter your search terms</label>
<input type="text" name="q" size="31" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Submit search form</label>
<input type="submit" name="sa" value="Search" id="sbb"></input>
</td></tr>
<tr>
<td>&nbsp;</td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="www.yoursite.com" id="ss1"></input>
<label for="ss1" title="Search www.yoursite.com"><font size="-1" color="#000000">www.yoursite.com</font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-8629480975977626"></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="safe" value="active"></input>
<input type="hidden" name="cof" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->

cru

 i noticed this line is there when i  enable Google WebSearch + SiteSearch.
<input type="hidden" name="domains" value="www.yoursite.com"></input>

my problem is, when users use the "Search this site" option, it only searches from articles within the site, and does not search the forums.

Now what i want to do is enable the Google web search only, without the site search.

Anybody who tried tweaking it without this code?
<input type="hidden" name="domains" value="www.yoursite.com"></input>

coz this code (above) is not there when i use the Google web search only. TIA

bloodlust

That's weird.  It searches forum posts on my site.  :-\

Yeah.. I don't see the code either when doing Web Search only option.

You could try this:

1: Follow my directions Here for getting the search results to show up in your site.  Make sure to use the Google WebSearch + Site Search option.

2: In your Search Box Code:

Find this:

<tr>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss0"></input>
<label for="ss0" title="Search the Web"><font size="-1" color="#000000">Web</font></label></td>
<td>
<input type="radio" name="sitesearch" value="www.yoursite.com" id="ss1"></input>
<label for="ss1" title="Search www.yoursite.com"><font size="-1" color="#000000">www.yoursite.com</font></label></td>
</tr>


Replace with this:

<tr>
<td>
<input type="hidden" name="sitesearch" value="" checked id="ss0"></input>
&nbsp;
<td>
<input type="hidden" name="sitesearch" value="www.yoursite.com" id="ss1"></input>
&nbsp;</td>
</tr>


This will make Web Search checked by default (which it is already unless you change it at the beginning), and hide the radio buttons and labels so your visitors can't select Site Search.

Of course make sure to replace "www.yoursite.com" with your site's URL ;)

This website is proudly hosted on Crocweb Cloud Website Hosting.