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: 378
  • Total: 378

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.

Zetan

I may have it,

1) I made an frontpage article - iframe (id=search name=search) to a blank file search.htm

<CENTER><IFRAME name=search id=search src="/google/search.htm" width="98%" height=510>you don't support iframes</IFRAME></CANTER></CENTER>

2) Made a block with the adsense search script. (In the first line I put target="search" to match the top)

<form method="get" action="http://www.google.com/custom" target="search">

Now it links from the SEARCH BLOCK to the FRONTPAGE ARTICLE. My problem is that I have to have the article on the front page visable. If anybody can help me, I need the command to make visable a hidden frontpage article so I can put it into the search script block to activate (make visable) the hiddle artcle for the output of the search script.

(ALMOST there!  :-\)



martinmarinekeeper

try making it top colum ?

take it yourrunning it on smf default ?

Zetan

I am running SMF v1.1.2 and TinyPortal v0.9.8 and Helios Theme with the empty article on the frontpage with a google block that outputs to a center frontpage the problem is that I have to have the atricle visable for it to work I want to know how to enable an invisable frontpage center block article to make it visable, using code.

bloodlust

OK...I've got it!

1: Create the google search code using the "Show results on my page" option.

2: Create a new article (it doesn't have to show on the front page).

3: Paste the code from the second box on the google search code (Your search results code:) in the source of your article.  (You do not need to alter this code in any way)

4: You are going to need to edit search box code slightly.

Here is the default code you will be given from google for the search box:

<!-- SiteSearch Google -->
<form method="get" action="http://www.yoursite.com/index.php?page=23" target="_top">
<table border="0" bgcolor="#000000">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25blk.gif" border="0" alt="Google" align="middle"></img></a>
<br/>
<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="10" 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 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="#ffffff">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="#ffffff">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="cof" value="GALT:#FF8800;GL:1;DIV:#555555;VLC:FFCC00;AH:center;BGC:222222;LBGC:000000;ALC:FF8800;LC:FF8800;T:FFFFFF;GFNT:FFCC00;GIMP:FFCC00;FORID:11"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->


On about line 8 you should have this:

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


5: Replace the word "domains" with the word "page" and replace the url for "value" with the page number of the article you created in step 2.

Line 8 should now look like this:

<input type="hidden" name="page" value="23"></input>


6: Create a new script block

7: Paste your new Search box code in your new script block.

It should work now! :)



mmcbrien

My Search box code is vastly different then yours ShawnX

Heres what I have.

<!-- Google CSE Search Box Begins -->
  <form id="searchbox_007942790335138847215:ikwl2tqfuxw" action="http://www.norareef.org/index.php?page=14">
    <input type="hidden" name="cx" value="007942790335138847215:ikwl2tqfuxw" />
    <input type="hidden" name="cof" value="FORID:9" />
    <input name="q" type="text" size="40" />
    <input type="submit" name="sa" value="Search" />
  </form>
  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_007942790335138847215%3Aikwl2tqfuxw"></script>
<!-- Google CSE Search Box Ends -->

bloodlust

Quote from: mmcbrien on July 25, 2007, 09:41:10 PM
My Search box code is vastly different then yours ShawnX

It appears you're using Google's Custom Search Engine service.

My instructions are for Google's Adsense for Search service ;)

Blue Steel

Thanks ShawnX I've been trying to get that to work for almost 2 weeks now lol

mmcbrien




This website is proudly hosted on Crocweb Cloud Website Hosting.