View Full Version : A nice idea for Google Module!!!
romanticyao
07-13-2004, 08:57 PM
If you look at CNN's main page ( http://www.cnn.com ) how they let their user to choose search the web or cnn.com, i think if you guys could do the same to Google Module would be great! (shouldn't be too hard i guess?)
So we have => Search - the web - yoursite.com - input textbox - submit - powered by Google! :)
apokalupsis
07-14-2004, 03:29 AM
Like this: http://www.google.com/services/custom.html ?
or this: http://www.google.com/searchcode.html ?
mholtum
07-14-2004, 12:12 PM
If you look at CNN's main page ( http://www.cnn.com ) how they let their user to choose search the web or cnn.com, i think if you guys could do the same to Google Module would be great! (shouldn't be too hard i guess?)
So we have => Search - the web - yoursite.com - input textbox - submit - powered by Google! :)Just combine the two modules on your site. You have a Site Search module by default. Just combine it with your google seach module.
Logop
07-15-2004, 08:31 AM
I realized it here in my footer www.consultdomain.de
romanticyao
07-15-2004, 12:57 PM
I realized it here in my footer www.consultdomain.de
Hey could you share the html code? :)
Semere
07-15-2004, 09:31 PM
Hi all,
I am kinda new to this community and I am a deserter of vbindex. (Of course I am now that I see how powerfull CMPS is) At any rate here is what I came up with. It works great for me. Demo Here (http://www.artheon.com) Of course you just name the template adv_portal_google.
Here comes the code for it.
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Google Search</b></span></td>
</tr>
<tr>
<td class="alt1" align="center">
<!-- SiteSearch Google -->
<FORM method=GET action="http://www.google.com/search">
<TABLE bgcolor="#FFFFFF"><tr><td>
<A HREF="http://www.google.com/">
<IMG SRC="http://www.google.com/logos/Logo_40wht.gif"
border="0" ALT="Google"></A>
</td>
<tr>
<td>
<INPUT TYPE=text name=q size=15 maxlength=255 value="">
<INPUT type=submit name=btnG VALUE="Search">
<font size=-1>
<input type=hidden name=domains value="YOUR DOMAIN HERE"><br>
<input type=radio name=sitesearch value="" checked> Web Search <br>
<input type=radio name=sitesearch value="artheon.com"> YOUR DOMAIN HERE <br>
</font>
</td></tr></tr></TABLE>
</FORM>
<!-- SiteSearch Google -->
</td>
</tr>
</table>
<br/>
Let me know what you guys think of it.
Semere
apokalupsis
07-16-2004, 01:47 AM
I was thinking about installing the google.search to include my own site...but after testing it...it really sux. It doesn't find much at all. Are the search requirements set very high?
For example...on your page Semere...I just copied some of the text from the front page, into the search area, and set it for Artheon.com (to search the site). It found "0 hits"....despite it being right THERE on the front page.
Does it search only certain parts of the site? How much control do you have over it?
Semere
07-16-2004, 09:32 AM
See that is the thing. I recently changed webhosts and forgot to reset my meta tag information and what not. Google doesn't neccessarily use meta tag information either I think we have all debated this quite a bit. However at any rate the search function would not be that great untill google crawls your site. You can make google crawl it faster simply by adding the adwords software. Then every time a page is served google will crawl it automatically due to revenue issues and that type of thing. So it is all a matter of preference. I am trying to come up with a good spot to stick the ads where they dont annoy me but have yet to figure out where that is. I will let ya know when I get something else together.
58sniper
07-17-2004, 02:59 PM
Okay - not sure if this is what you were getting at, but...
This module let's you choose which search to use. If you choose your forum, it uses the built in vB search. If you choose Google, it sends the search to Google. Demo (http://www.efhs84.com/) on bottom left. NOTE: The code posted here is for a NON-COLLAPSING module. My demo is a collapsing module.
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat smallfont"><b>$vboptions[blockbullet] Super Search</b></span></td>
</tr>
<tr>
<td class="alt2">
<script type="text/javascript" language="javascript">
function sendForm() {
if (document.supersearch.who[0].checked == true) {
document.supersearch.action = '$vboptions[bburl]/search.php';
}else{
document.supersearch.action = 'http://www.google.com/search';
document.supersearch.method = 'get';
}
var gstuff = document.supersearch.q;
gstuff.value = document.supersearch.query.value;
return true;
}
</script>
<form name="supersearch" method="post" action="$vboptions[bburl]/search.php" onsubmit="return sendForm();">
<input type="hidden" name="q" value="" />
<input type="hidden" name="do" value="process" />
<input type="hidden" name="showposts" value="0" />
<input type="hidden" name="hl" value="en" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="query" size="20" /><br />
<input type="radio" name="who" value="vB" />$vboptions[bbtitle]
<input type="radio" name="who" value="Google" />Google<br />
<input type="submit" value="Go" name="btnG" />
</form>
</td>
</tr>
</table>
<br />
KW802
07-18-2004, 12:13 AM
Okay - not sure if this is what you were getting at, but...
This module let's you choose which search to use. If you choose your forum, it uses the built in vB search. If you choose Google, it sends the search to Google. Demo (http://www.efhs84.com/) on bottom left. NOTE: The code posted here is for a NON-COLLAPSING module. My demo is a collapsing module.
<snip>
58sniper -- Nice work! That's what my interpretation of what the original poster was asking for also.
apokalupsis
07-21-2004, 01:23 AM
The only problem with his code, is that it only searches the forums on the site. The actual Google free web search, actually searches the members site (all pages), or Google itself.
Perhaps the best way to do it, is install a search engine script (there are numerous ones out there, perhaps I'll mod one) and have it choose to search: site, forums, web.
KW802
07-21-2004, 09:22 AM
The only problem with his code, is that it only searches the forums on the site. The actual Google free web search, actually searches the members site (all pages), or Google itself.
Perhaps the best way to do it, is install a search engine script (there are numerous ones out there, perhaps I'll mod one) and have it choose to search: site, forums, web.
:confused: Did you try the one on his site? When I choose the Google search radio button my results were a new window with the results of my criteria for the internet, not this site. If you wanted Google to search a particular web site (eg: the local one) it'd just be a matter of tweaking the code for what your looking for (eg: a radio button to Google the local site and/or a radio button to search the internet).
58sniper
07-21-2004, 12:13 PM
Yeah - trying to get it to work that way would be a pain. I'm actually working on a super search that will allow you to submit searches to a ton of various seach engines - not just Google & vB.
romanticyao
07-21-2004, 12:57 PM
thanx man, that's what i want. by the way who knows how to search the whole site not just the forum?
Logop
07-22-2004, 07:51 AM
Take a look at www.google.com/adsense
You need to open an adsense account and use the websearch function.
Then you can search both the web and your whole site like i realized it at www.consultdomain.de .
I would share the code of course but then i would earn revenue which belongs to you instead ;)
58sniper
07-22-2004, 10:31 PM
Okay, I've released Super Search II (http://www.vbadvanced.com/forum/showthread.php?t=1971), which adds 9 search engines....
venomx
09-05-2004, 01:50 AM
Google Adsense has a great search box that I am usng on my site. I used the Google Search Mod found in the forum here.
Just use the Mod found here: http://www.vbadvanced.com/forum/showthread.php?t=1002
And use the code you get from your account at; https://www.google.com/adsense/
mholtum
09-05-2004, 01:56 AM
I use this search. Searches damn near everything.
mfarmerhi
06-06-2005, 04:51 AM
Okay... I installed the module detailed in post #9 above (Sniper's code), but notice when I search Google, the search text is automatically doubled.
That is, say I search "success". Results for Google return search results for "success success".
I've installed the code as is. Any ideas what's up?
mfarmerhi
06-06-2005, 04:56 AM
Upon further reflection, it appears Google is taking both values:<input type="radio" name="who" value="vB" />$vboptions[bbtitle]
<input type="radio" name="who" value="Google" />Google<br />and performing the search by combining them.
ali ahmed
06-30-2005, 04:01 AM
hi
Semere
thnk you
your code is working gooooood
but
it does't spurt the arabic languge
do you have any idea?
thanx all brothers
Ali
virtualburn
07-30-2005, 05:18 PM
Add this anywhere in your template for google search + site search, you will have to put your domain name where the text is red.
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif"
border="0" alt="Google"></img></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="www.yourdomain.com"></input>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Search"></input>
</td></tr>
<tr>
<td> </td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked="checked"></input>
<font size="-1" color="#000000">Web</font>
</td>
<td>
<input type="radio" name="sitesearch" value="www.yourdomain.com"></input>
<font size="-1" color="#000000">www.yourdomain.com</font>
</td>
</tr>
</table>
<input type="hidden" name="client" value="pub-4403342228823268"></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:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:00 00FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
To have this on your CMPS page create a new template with this code adv_portal_NAME and use this when creating your new module from template:<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Adsense</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">
<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="_top">
<table border="0" bgcolor="#ffffff">
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<a href="http://www.google.com/">
<img src="http://www.google.com/logos/Logo_25wht.gif"
border="0" alt="Google"></img></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="www.yourdomain.com"></input>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Search"></input>
</td></tr>
<tr>
<td> </td>
<td nowrap="nowrap">
<table>
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked="checked"></input>
<font size="-1" color="#000000">Web</font>
</td>
<td>
<input type="radio" name="sitesearch" value="www.yourdomain.com"></input>
<font size="-1" color="#000000">www.yourdomain.com</font>
</td>
</tr>
</table>
<input type="hidden" name="client" value="pub-4403342228823268"></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:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:00 00FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:1;"></input>
<input type="hidden" name="hl" value="en"></input>
</td></tr></table>
</form>
<!-- SiteSearch Google -->
</td>
</tr>
</table>
<br /> ~template code courtesy of cLord
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.