PDA


View Full Version : Site/Google Search


christianb
03-09-2006, 07:08 PM
I wanted to integrate Google into the standard search module so I created this modification (to the original). I am going to try to implement adsense into as well as soon as I get a chance to. I apologize if someone else has already done this - my searching isn't always the greatest

Put it in a text file.

Gallio
03-10-2006, 01:14 AM
Nice, I'd like to see google ad sense integrated in to this. Its always nice to get extra revenue. *Installing Now*

christianb
03-10-2006, 10:45 AM
I believe this will work on adsense integration... (please let me know if this doesn't work)

MrNasty
10-04-2006, 10:27 AM
Nice one... installed

dart vader
01-28-2007, 08:16 PM
thank a lot

shah_b1
01-29-2007, 02:15 AM
thanks a lot...lot!

bugzy
02-26-2007, 02:41 PM
sweet, nice

christianb
04-03-2007, 05:46 PM
In case anyone wonders... this does work with 3.6 as well.

squidstir
04-11-2007, 08:07 PM
Just installed this on all 6 of my sites running 3.6.5, works great! Thanks.

MUAHHH
05-01-2007, 03:36 PM
I have a problem. When i click on the box of the module to search it displays an error and page not found

http://www.yourdomain.com/%3Cform%20action=

(Obviously i changed yourdomain to the name of my domain but i preferred not to give the address of my domain)

Help anyone ?

christianb
05-01-2007, 08:32 PM
I'm not sure why it would be doing that unless something in the form was altered or is incompatible with something else on your site. The only thing I can think of is make sure that the entire mod is followed (recheck it) and if it is. Curious... did you alter this piece
<form action="http://www.google.com/custom" type="hidden" method=GET name="search"> <input type="hidden" name="client" value="pub-0123456789012345"> <input type="hidden" name="forid" value="1"> <input type="hidden" name="ie" value="ISO-8859-1"> <input type="hidden" name="oe" value="ISO-8859-1"> <input name="cof" type="hidden" value="GALT:# . . .;"> <input name="domains" type="hidden" value="www.yourdomain.com"> <input type="hidden" name="hl" value="en"> and change it to appear what shows in your link? If so, that will break it. %3Cform%20action= will not work the same as <form action=

princeedward
07-10-2007, 06:10 PM
nice...and thanks...work on my site... www.epaloids.com

;)

Ego
07-28-2007, 11:30 AM
my searching isn't always the greatest
Bad thing if you're making a Search module :P

Anyway, does this just search the threads/posts or the entire site?

christianb
07-28-2007, 11:57 AM
This searches threads/posts/archives/etc., but I've not tested to see if it searches miscellaneous files. However, This does exactly what the Google Search is intended for, which should include the entire site, regardless of what medium is used to store the script. :)

furman
09-11-2007, 04:38 AM
Hi,
How do I make the template? Sorry a little lost here :(

furman
09-11-2007, 05:32 AM
I read thread http://www.vbadvanced.com/forum/showthread.php?t=22455 and managed to understand what was going on eventually :)

lane
10-21-2007, 12:47 AM
Quick question:

When I get my code from google, it looks nothing like that which you show in your example....

For Instance:
<!-- 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" align="middle"></img></a>
</td>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="mysite.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="servercommand.org" id="ss1"></input>
<label for="ss1" title="Search mysite.com"><font size="-1" color="#000000">mysite.com</font></label></td>
</tr>
</table>
<input type="hidden" name="client" value="pub-7568627221423510"></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;XXXXXX;LBGC:336699;ALC:0000FF ;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 -->

Any ideas?

christianb
10-21-2007, 11:53 AM
My example is formatted for vBAdvanced - what you will need to do is compare between my example and your code and change the differences (such as your pub-7568627221423510 info)

christianb
11-10-2007, 06:04 PM
I have updated this hack for 3.6.8 and incorporated into another hack (to display results within your site). http://www.vbulletin.org/forum/showthread.php?t=155199

shimpaku
11-30-2007, 02:57 PM
My code from Google does not look the same either!

<script src="http://gmodules.com/ig/ifr?url=http://www.google.com/coop/api/004262828382009823096/cse/lpaoj7uq9xa/gadget&amp;synd=open&amp;w=320&amp;h=75&amp;title=mysite.net&amp;border=%23ffffff%7C3px%2C1px+solid+ %23999999&amp;output=js"></script>

When I implemented the module it looked fine except that when I clicked on search for something on my site it went to Google! What am I doing wrong here? Should I remove something out of this code?

Regards, Phil

christianb
11-30-2007, 07:47 PM
I am not familiar with this script (the one you displayed).

The module you implemented - was it the one in this thread or the one at vbulletin.org?

shimpaku
11-30-2007, 09:35 PM
I am not familiar with this script (the one you displayed).

The module you implemented - was it the one in this thread or the one at vbulletin.org?

Yes, it was the one on this thread from your first post.
To tell the truth I'm not really all that sure just what code it is I'm supposed to get from Google. I have been signed up with them for sometime because I have Gmail and also Google Talk.
If you could be so kind as to tell me exactly step by step just what it is I'm after from Google and how to obtain the code number it would be much appreciated as it seems I have not run across one code that ends with a semi colon. I would really like to implement this module on mt site which I'm still building. I'm sure I'm going in the wrong direction as to what I'm trying to get from Google?

Regards, Phil :)

shimpaku
12-01-2007, 12:25 AM
This is where I got my supposed code(s) from. I can't seem to find anything else on Google as for codes! Just what specifically I'm I trying to get from Google? Sorry, I just don't get it! No problem at all with installing the module but no matter what I enter it only goes straight to Google when I wish to use the search function in regards to doing a search as it pertains to my site! The Google search works fine but doing a search on my site only leads to a "no match found" on a Google page!

Regards, Phil

christianb
12-01-2007, 09:33 AM
That's probably why I didn't recognize it. Where I went was http://www.google.com/adsense to get the code. What you referenced is something different. Try using the one at vbulletin.org and if you don't have an adsense account - its ok. That one integrates into the site (does not go to google).

shimpaku
12-01-2007, 01:11 PM
Yep, I was really going in the wrong direction there wasn't I!
The Google AdSense makes a lot more......well, sense! :)
Just have to wait for a few days to get approved and get my code number.
Thanks for your help on the issue.

Regards, Phil

shimpaku
12-01-2007, 11:30 PM
Sorry, being a real pain here I realize but I seem to be getting nowhere on this. Got an account with Google AdSense and I was lead to a bunch of options as to what layout option I wanted and what type of color styles I wanted. I had no idea as to what I was supposed to chooses as all I wanted was the damn code to implement with your given module code on the first post of this thread.
Here is the code I ended up with:

<!-- Search Google -->
<center>
<form method="get" action="http://www.google.com/custom" target="_top">
<table 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" align="middle"></img></a>
<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>
<input type="hidden" name="client" value="pub-1440667583316305"></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: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>
</center>
<!-- Search Google -->


Just what again exactly am I supposed to pull from this code again and where exactly where do I replace it with the one you gave? I can't seem to find anything that begins with: s:http:// and ending with an ID # ending with a semi colon as you stated. As said, I have the AdSense account and I wish to make use of it to gain at least a little bit of income so as to retrieve some of my initial investment in the site as it is a non-profit site. Just what am I doing wrong here?? Thanks again for your much anticipated help and patience with this issue.



Regards, Phil :confused:

christianb
12-02-2007, 12:33 AM
If you go with the instructions on the module, you only need your pub from here: <input type="hidden" name="client" value="pub-1440667583316305"></input> and your GALT code (aka cof) from here: <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:1"></input> just use the values in the "" and that should work - sometimes you will need to add a 1 at the end of the cof/GALT.

If you use module I have created at vbulletin.org, all you need really is the pub info (fill in the rest in the admincp - and most everything else is in the initial instructions.

shimpaku
12-02-2007, 05:23 PM
Yep, was my fault as I was using the first module coe you gave in the first post on this thread instead of the AdSense code. I installed the module and it looks fine but I still have the same problem! When I do a search on my site it stills goes to Google! Must I first remove the Search Forums module after I instll this new module? Here is the code I entered on the module form code box:

<form action="http://www.google.com/custom" type="hidden" method=GET name="search"> <input type="hidden" name="client" value="pub-1440667583316305"> <input type="hidden" name="forid" value="1"> <input type="hidden" name="ie" value="ISO-8859-1"> <input type="hidden" name="oe" value="ISO-8859-1"> <input name="cof" type="hidden" 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 name="domains" type="hidden" value="www.bonsaichat.net"> <input type="hidden" name="hl" value="en">

I have tried everything and it always looks good except for the search function on my site. Always goes to Google! Can you find any mistakes on the code I gave? Thanks for you patience. I'm about ready to give it up!

Regards, Phil :confused:

christianb
01-07-2008, 09:08 AM
Sorry, for some reason I didn't get a notification of this. The above hack will go to google, however, I've made the necessary changes and put them in the hack here: http://www.vbulletin.org/forum/showthread.php?t=155199 that allows it display on your site.

rukon_nishi
07-02-2008, 04:52 AM
I want to put google ads on my forum display bellow please help me my vbulletin version is 3.0.7

christianb
07-02-2008, 10:01 AM
This is a different type of google adsense.

e7saas
07-31-2008, 05:05 AM
thanks