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

Recent

Welcome to TinyPortal. Please login or sign up.

May 01, 2024, 09:34:13 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,175
  • Total Topics: 21,220
  • Online today: 177
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 129
  • Total: 129

[Request] - Search box for site and google

Started by mrbean17, March 06, 2007, 03:54:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrbean17

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

Zetan

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.

vanityq

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

mrbean17

I could never get Google Adsense to work out of a subdirectory ...

Is there anything else besides Adsense for this?

Thanks

Hairy

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.

hsehid

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.

bbTURK

#6
try this
;)

creat an ajax code and add it your page

vanityq

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

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



Bluto

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.

vanityq

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>

Crip

<p > is whats throwing it offset </p >

try adding only < br / >
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



vanityq

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

Crip

I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



vanityq

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<

G6Cad

Add it in a scriptblock and it should work, make sure you also activate the block after you have saved the code in it.

vanityq

thanks G6
much much better :)
ive been using the HTML + BBC before