TinyPortal

Development => Block Codes => Topic started by: mrbean17 on March 06, 2007, 03:54:20 PM

Title: [Request] - Search box for site and google
Post by: mrbean17 on March 06, 2007, 03:54:20 PM
Looking for a snippet that will allow me to search the forums and google (radio button or something) ... but open a new page (same window) when searching google.

Thanks
Title: Re: [Request] - Search box for site and google
Post by: Zetan on March 06, 2007, 04:09:50 PM
Google Adsense has this feature. You need to open an Affiliates account with Google AdSense.

You can select to embed a search box and choose to have the results displayed within your website.

I can install one on my site later for you to tryout. I leave work soon.
Title: Re: [Request] - Search box for site and google
Post by: vanityq on October 10, 2007, 02:35:01 AM
which file should i modify to insert the google search on the portals Search Box?

or add google search on portals..

thanks..

m just a newbie on everything. thanks
Title: Re: [Request] - Search box for site and google
Post by: mrbean17 on October 23, 2007, 02:13:55 AM
I could never get Google Adsense to work out of a subdirectory ...

Is there anything else besides Adsense for this?

Thanks
Title: Re: [Request] - Search box for site and google
Post by: Hairy on October 23, 2007, 03:18:17 AM
Quote from: vanykekok on October 10, 2007, 02:35:01 AM
which file should i modify to insert the google search on the portals Search Box?

or add google search on portals..

thanks..

m just a newbie on everything. thanks

Just create a new block and embed the code Adsense gives you, then disable/remove your original search box once the Google one is setup. That's all I did when I tried it.

I got rid of it because if you have boards requiring special permissions it does not work very well, you can give adsense a special account to be able to index your private boards but I think it will then display it to anyone even if they can't normally access those boards.
Title: Re: [Request] - Search box for site and google
Post by: hsehid on October 23, 2007, 04:57:39 PM
i dont have a adsense acconunt but i add a google search box with usin codes in tis link:
http://www.askdavetaylor.com/how_can_i_add_a_google_search_box_to_my_web_site.html
i want to set searc box for displaying search result in a new window(_blank). how can i do that? please help.
Title: Re: [Request] - Search box for site and google
Post by: bbTURK on October 29, 2007, 09:32:45 PM
try this (http://www.google.com/coop/cse/)
;)

creat an ajax code and add it your page
Title: Re: [Request] - Search box for site and google
Post by: vanityq on August 07, 2008, 01:33:27 PM
Quote from: Hairy on October 23, 2007, 03:18:17 AM
Quote from: vanykekok on October 10, 2007, 02:35:01 AM
which file should i modify to insert the google search on the portals Search Box?

or add google search on portals..

thanks..

m just a newbie on everything. thanks

Just create a new block and embed the code Adsense gives you, then disable/remove your original search box once the Google one is setup. That's all I did when I tried it.

I got rid of it because if you have boards requiring special permissions it does not work very well, you can give adsense a special account to be able to index your private boards but I think it will then display it to anyone even if they can't normally access those boards.

i already created one, but doesnt looks good, i tried editing the code but keeps on showing a big box.
www.perphs.com
Title: Re: [Request] - Search box for site and google
Post by: Crip on August 07, 2008, 01:37:25 PM
Nice Searchbox ;)
Title: Re: [Request] - Search box for site and google
Post by: Bluto on August 07, 2008, 01:41:19 PM
The code does seem to take a bit of space. I put it in a lower block using TP 1.0.5, not the best spot, but less intrusive that way.
Title: Re: [Request] - Search box for site and google
Post by: vanityq on August 07, 2008, 01:44:48 PM
it doesnt look good, i cant fit the box with portal..

somebody please help heres the code

<table width="160" height="80" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><form id="cse-search-box" action="http://www.google.com/cse" target="_blank">
      <div align="center">
        <p>
          <input size="19" name="q" type="text" />
         

          <input type="submit" name="sa" value=" Search " />
          </p>
        <p>
          <input type="hidden" name="cx" value="xxx/>
          <input type="hidden" name="ie" value="ISO-8859-1" />
          </p>
      </div>
    </form>
      <div align="center">
        <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
      </div></td>
  </tr>
</table>
Title: Re: [Request] - Search box for site and google
Post by: Crip on August 07, 2008, 02:07:01 PM
<p > is whats throwing it offset </p >

try adding only < br / >
Title: Re: [Request] - Search box for site and google
Post by: vanityq on August 07, 2008, 02:09:23 PM
sorry i got the wrong code to post heres the new one

<form id="cse-search-box" action="http://www.google.com/cse" target="_blank">
    <input type="text" size="18" name="q" />

    <input type="submit" name="sa" value="  Search  " />  <input type="hidden" name="cx" value="partner-pub-7934935500534920:socnmt6styw" />  <input type="hidden" name="ie" value="ISO-8859-1" />
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>

still cant manage to fit it like the portal search
Title: Re: [Request] - Search box for site and google
Post by: Crip on August 07, 2008, 02:10:19 PM
<br style="clear: left;"/>
Title: Re: [Request] - Search box for site and google
Post by: vanityq on August 07, 2008, 02:14:36 PM
nothing happened, where should i insert it..
hmmm btw, im somehow contented with the look..


<form target="_blank" action="http://www.google.com/cse" id="cse-search-box">
<input type="text" name="q" size="18"/><br style="clear: left;"/>
<input type="submit" value="  Search  " name="sa"/>
<input type="hidden" value="partner-pub-7934935500534920:socnmt6styw" name="cx"/>
<input type="hidden" value="ISO-8859-1" name="ie"/>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>

thanks crip for the replies >:D<
Title: Re: [Request] - Search box for site and google
Post by: G6Cad on August 07, 2008, 03:48:48 PM
Add it in a scriptblock and it should work, make sure you also activate the block after you have saved the code in it.
Title: Re: [Request] - Search box for site and google
Post by: vanityq on September 03, 2008, 01:47:07 PM
thanks G6
much much better :)
ive been using the HTML + BBC before