PDA

View Full Version : Add-On Releases - vB Google Adsense for Search plus Integration


davidw
08-13-2007, 10:00 PM
Since the hooks came out in the navigation bar, I had been working on a new release as seen in my previous modification. I have recently pushed myself to finish this hack but I have plans for addons to it :).

This is under the assumption you have your key information:
1) Your pub
(your pub ID/property information - usually starts with pub- and then some numbers)
2) Your cof usually found in your adsense code here:
<input name="cof" type="hidden" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:250;L:http://www.christianboards.org/images/logo.gif;S:http://;FORID:1">
This example is what I am using and what a lot of others are using:
GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;FORID:11

Step 1:
Upload searchresults.php to your site's root.
Example: http://www.yoursite.com/searchresults.php

Step 2:
Install the product
Go to Admincp => Plugins & Products => Manage Products => [Add/Import Product] => Browse for product-davidw_vb_google_search.xml => Import

Step 3:
Configure your Admincp options
Go to Admincp => vBullitin Options => vBulletin Options => Find vB Google Search (Adsense) then click [Edit Settings]
Edit your Pub ID, Cof, and your desired width of the iframe for your results. I use 800 in the screenshot, but you can change this based on your needs.

Step 4:
If you are using Version 1.2 1.3, or higher you must edit (or at least check) the searchresults.php to ensure it is correct for your site.

vBAdvanced Optional
Step 5:
Go to Admincp => vBA CMPS => Default Settings => Under Options Portal Output Global Variables
Add (or make sure they are present) these varaiables:
template_hook
google_navadsearch
google_label_site
google_label_web
homeurl

Step 6:
Click on Edit Modules. Click on Search Forums (module).
Under Module Tools, find Select Action (very top) and choose Copy.

In your new (copy) of the Search Forums Module, change the name of your module to whatever you want (I chose "Search").
Under the Template Module Options heading, edit the adv_portal_ area.
Change it from search to search_google

Next,
Under Module Shell Template Options, in the Form Code box,
Change
<form action="{$vbulletin->options}/search.php" method="post" name="search"> <input name="s" type="hidden" value="" /> <input name="do" type="hidden"

value="process" /> <input name="sortby" type="hidden" value="lastpost" /> <input name="forumchoice" type="hidden" value="0" />
To
<form method="get" action="http://www.yoursite.com/searchresults.php" type="hidden" name="search" target="_blank">
Make sure this URL is the correct full path to your searchresults.php file.


LEGACY VERSION - Applies to vb_google_legacy_1_2.zip vb_google_legacy_1_3.zip(or higher) only
- Very similar to Version 1.2 1.3 and higher except instead of using a hook this will work for previous 3.6 versions (should work with any 3.6 version).
-- -- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Navigation / Breadcrumb Templates => navbar => find
$vbphrase[advanced_search]</a></td>
</tr>Add, under $google_navadsearch
-- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch

Also, you must ensure that $google_navadsearch does not go in between <form> tags. If your navbar is a modified old-style template, you will have an extended <form> section. Make changes similar to this...
change this:
<form action="search.php?do=process" method="post">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
to
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<form action="search.php?do=process" method="post">
<td class="thead">$vbphrase[search_forums]</td>
</tr>
and change
</tr>
$google_navadsearch
$template_hook[navbar_search_menu]
</table>
</form>
</div>
<!-- / header quick search form -->
to
</form>
</tr>
$google_navadsearch
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->


[B]Changelog
Version 1.4
- Added support for vBAdvanced module (rather than going to my hack on vBAdvanced.com)

Version 1.3
- Added missing template cache plugins from XML file (had the template cache in the file, just lost it along the way in the XML).

Version 1.2
- Allows you to put your searchresults.php file in any directory, but you must edit the path in the searchresults.php file to the location of searchresults.php.
- Removed unnecessary xml information.
- Fixed a small bug in the product
- Added search.php functionality :)
-- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch
- Set default values so that it is easier to configure. You must still edit these values.

Version 1.1
- Change default "site" to your site's name or put a link to a small logo there.
- Change default "web" to "Google" or put their logo in there.
<img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle">This is their logo if you don't have it.
- Only added the ability to allow you to easily add your own logos or change the text from the admincp.

Version 1.0
- Original

davidw
08-14-2007, 11:05 AM
I have a manual limited version of this here: https://vborg.vbsupport.ru/showthread.php?t=128274

projectego
08-14-2007, 11:19 AM
* projectego clicks install :D

alqloob alsahya
08-14-2007, 01:14 PM
god jop nice :)

davidw
08-14-2007, 01:52 PM
Edit: Updated the product - one of the templates had a typo.

Zaiaku
08-14-2007, 06:56 PM
Excellent mod!

Chester87
08-14-2007, 06:59 PM
Verry nice mod.

iogames
08-14-2007, 07:44 PM
If it's a 'DAVIDW' I'll install it!
Can you add the Google Logo or the option for Own logo?

United32
08-14-2007, 07:47 PM
Thank you very much! And for integration, wow.... :up:

MOTM, definately! :)

davidw
08-14-2007, 10:13 PM
If it's a 'DAVIDW' I'll install it!
Can you add the Google Logo or the option for Own logo?Where did you have in mind?

Thank you very much! And for integration, wow.... :up:

MOTM, definately! :)Actually, I'm not even done yet. I'm going to be adding more :)

davidw
08-15-2007, 10:39 AM
I have added an optional new 1.1 version that allows anyone to change the choices by the radio buttons to logos (images) if they so desire :) - and I have supplied the link to the default logo above.

Zaiaku
08-17-2007, 09:50 PM
Is there a templete edit that needs to be done? I installed it and its not appearing in the dropdown search menu.

JMH11788
08-18-2007, 05:31 PM
Is there a templete edit that needs to be done? I installed it and its not appearing in the dropdown search menu.

well the navbar hook is gone now so that is why you dont see it.

davidw
08-20-2007, 01:31 AM
You should have $template_hook[navbar_search_menu] in your navbar, if you don't - this will not work.

Search for <!-- / header quick search form --> and look a couple rows above:

$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->
Your navbar may differ a little - this is where the hook resides:
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
$template_hook[navbar_search_menu]

If you do not have that hook in there, you must edit your navbar and place that hook in there to use this modification. If you still can't get this version to work, here is a manual but limited version - https://vborg.vbsupport.ru/showthread.php?t=128274

AquilaEagle
08-20-2007, 05:59 PM
I've installed and it is appearing in my Nav Bar, but when i actually do a search I just get a blank screen?? it's not going to google, it's going to some page on my site??

Help please?

AquilaEagle
08-20-2007, 08:31 PM
Double checked everything, and re-installed it. Still not working. It seems to go to searchresults.php but with a load of code on the end of the url, just showing a blank page. I've followed the instructions word for word. No worky. :(

davidw
08-20-2007, 10:26 PM
Ok, here's a possible manual fix for boards like this. I will work on an update later with a final working result.

Upload searchresults.php to your forum directory (since that is where it is appearing - It looks like a redirect somehow).

Then reimport this attached product (based on version 1.1)

davidw
08-21-2007, 02:40 AM
Also, try this special searchresults.php file I created. You will need to edit line 8
chdir('/your/path/to/forums/'); and put your forum's path in there for this to work. I have it working on my site (tested it). I created a dummy directory called forums that only has the one file in it. Let me know how it works for you.

AquilaEagle
08-21-2007, 05:41 PM
Ok, here's a possible manual fix for boards like this. I will work on an update later with a final working result.

Upload searchresults.php to your forum directory (since that is where it is appearing - It looks like a redirect somehow).

Then reimport this attached product (based on version 1.1)Thanks david. I have done this and it seems to half work, I did a search but I get a blank result. I get the Google search results page, but it is empty of any results.

AquilaEagle
08-21-2007, 06:58 PM
Also. the dropdown only appears for members, not for guests - any way I can change that?

Irfan Faruki
08-23-2007, 06:16 PM
Thanks david. I have done this and it seems to half work, I did a search but I get a blank result. I get the Google search results page, but it is empty of any results.

I am having the same problem.. Any ideas ?

davidw
08-23-2007, 10:59 PM
How is your forum set up? Is it behind /forums/? Can you PM me the info? Btw, don't forget to click install.

Riccardo83
08-27-2007, 03:57 AM
I dont get it working either on alizee-forum.com

It shows the searchresult.php correctly with theme. It also says

Your Google Search Results

but there is nothing underneath, footer and header work...

davidw
08-27-2007, 10:34 AM
The searchresults.php is in its correct location. If you used any version other than the initial 1.0 (especially the one in the thread here alone), you must go to your admincp and enter your information in there.

Step 3:
Configure your Admincp options
Go to Admincp => vBullitin Options => vBulletin Options => Find vB Google Search (Adsense) then click [Edit Settings]

If you don't, you will get exactly what you see.

Don't forget to click install.

Riccardo83
08-27-2007, 11:30 AM
i entered all information....

it still doesnt work....

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;FO RID:1

and my pub google code.. logo as well....

please help me what could it be, 700 is iframe width, could it be that my galt is wrong?

AquilaEagle
08-27-2007, 01:15 PM
I dont get it working either on alizee-forum.com

It shows the searchresult.php correctly with theme. It also says

Your Google Search Results

but there is nothing underneath, footer and header work...
This is what is happening on mine now.

All my info is in the adminCP too. I've not managed to catch you to help yet david.

Also it only appears for registered users, can I change it so everyone sees it in the menu?

Riccardo83
08-27-2007, 06:49 PM
Hope this is gonna be fixed soon.

Also a suggestion would be, to have this search available for guests, but not letting them use the forum search engine.

Brings more adsense visits and reduces serverload.

davidw
08-28-2007, 12:06 AM
I've added version 1.2 (at the top). I've fixed a few things and hopefully this will fix the problem. I noticed a couple possible issues that weren't being reported but might be related to what you two are seeing. You may want to uninstall the product and import the new 1.2 product, and overwrite the searchresults.php file after making the necessary changes to it. Let me know how this works.

Riccardo83
08-28-2007, 04:02 AM
im afraid to say i still dont see any search results... ?

maybe anytyhing wrong with my google settings?

Although the sourcecode of the page shows

<tr align="center">
<td class="alt1" align="center" valign="top">
<div style="padding:5px 5px 5px 5px">
<!-- Google Search Result Snippet Begins -->
<div id="googleSearchUnitIframe"></div>
<script type="text/javascript">
var googleSearchIframeName = 'googleSearchUnitIframe';
var googleSearchFrameWidth = '750';
var googleSearchFrameborder = 0 ;
var googleSearchDomain = 'www.google.com';
</script>
<script type="text/javascript" src="http://www.google.com/afsonline/show_afs_search.js"></script>

<!-- Google Search Result Snippet Ends -->
</div>

Riccardo83
08-28-2007, 04:07 AM
also, i like the way u have it on ur forum, but u dont use searchresults.php or so?

davidw
08-28-2007, 10:21 AM
I do use the searchresults.php (otherwise this wouldn't work). I am also using 1.2 version as well.

Riccardo83
08-28-2007, 10:26 AM
ok, i added u on msn, but ur not online. i would really love to get this working.

AquilaEagle
08-28-2007, 06:08 PM
I'm still getting a blank results page with v1.2 - completely uninstalled and re-installed. edited the searchresults.php file, and it is in /forum/

69197

Zaiaku
08-28-2007, 07:47 PM
To bad this doesn't work on all versions of 36x. I really don't want to have to upgrade my other forum to add this to it.

davidw
08-29-2007, 01:20 AM
Give me a day or two and I'll see if I can find a script to work around the hook for earlier versions.

Riccardo83
08-29-2007, 01:28 AM
But first we should get it working at all for 3.6.8 ? Any news why AquilaEagle and me dont get it working?

davidw
08-29-2007, 01:29 AM
This version (for earlier versions) should also help you and AquilaEagle out as well. It should be released tomorrow.

Riccardo83
08-29-2007, 01:59 AM
Great, thanks mate for helping me u got it working. Apparently guys double check ur Galt code as well!

WarLion
08-29-2007, 08:00 PM
i have the samee result im install this mod pretty good BTW but with no result only the searchresults.php in blank

i hope you can tell me whats is wrong thanks for this cool mod

edit

ifinally maake it work you the only thing i edit is the template "google_navadsearch"

i change a few lines not to much i just see the original code from google adsense and add a few lines

<tr>
<td class="thead">Buscar en sitio/ Google</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form method="get" action="{$vboptions['google_forum_path']}" target="_top">
<table border="0">
<tr>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="{$vboptions['homeurl']}"></input>
<label for="sbi" style="display: none">Introduzca los t?rminos de b?squeda.</label>
<input type="text" class="bginput" name="q" size="25" maxlength="255" value="" id="sbi"></input>
<label for="sbb" style="display: none">Env?e el formulario de b?squeda</label>
<input type="submit" class="button" name="sa" value="Ir" id="sbb"></input>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<table border="0">
<tr>
<td>
<input type="radio" name="sitesearch" value="" checked id="ss0"></input>
<label for="ss0" title="Search the Web">{$vboptions['google_label_web']}</label>
</td>
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
</tr>
</table>
<input type="hidden" name="client" value="{$vboptions['google_pub']}"></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="{$vboptions['google_cof']}"></input>
<input type="hidden" name="hl" value="es"></input>
</td>
</tr>
</table>
</td></form>
</tr>
this is a code for mexican or spanish webs the las red text es (espa?ol) if you are from us change to en (english)
the rest you can leavee just like that is a hidden text

also in vB Google Search (Adsense) option on Your Forum's Path i only put the name of the php n this case searchresults.php cuz you are already in your domine if you put all the adress the resul migth bee
http://yoursite.com/forum/searchresult.phphttp://wwwyoursite......,
and also in the searchresults.php on the line 8 i change the path and thats all i need now is working now thankts for you mod is soo cool

i know this is almost equal to the one from davidw i dont know what i did the only this s woring now dot ask i don?t know what i did

and also i add class to button and textfield you can change it to fit your sikin

sorry for my english mexican here

davidw
08-29-2007, 10:28 PM
To bad this doesn't work on all versions of 36x. I really don't want to have to upgrade my other forum to add this to it.Added a release to the list that should help you out. :)

davidw
08-29-2007, 10:33 PM
also in vB Google Search (Adsense) option on Your Forum's Path i only put the name of the php n this case searchresults.php cuz you are already in your domine if you put all the adress the resul migth bee
http://yoursite.com/forum/searchresult.phphttp://wwwyoursite......,
and also in the searchresults.php on the line 8 i change the path and thats all i need now is working now thankts for you mod is soo cool

i know this is almost equal to the one from davidw i dont know what i did the only this s woring now dot ask i don?t know what i did

and also i add class to button and textfield you can change it to fit your sikin

sorry for my english mexican hereGlad that it is working for you. The reason I have the forum path to show the full from http:// to ... .php is because of <form method="get" action="{$vboptions['google_forum_path']}" target="_top">However, this is mainly aimed at those who have their searchresults.php located in a different directory other than the root location. Otherwise searchresults.php or ./searchresults.php should work just fine. Don't forget to click install :)

AquilaEagle
08-30-2007, 06:14 PM
Mine is working now, thanks to david for his help -my GALT number had a character missing at the end :)

djbaxter
08-30-2007, 07:18 PM
I'm still getting a blank results page with v1.2 - completely uninstalled and re-installed. edited the searchresults.php file, and it is in /forum/


Same problem here. I've tried both versions - same issue. Double checked the GALT and pub codes. Both look OK.

davidw
08-30-2007, 10:56 PM
What do you have for your GALT and what do you have for "Your Forum's Path" in the AdminCP?

The example I use, which a lot of people have, is this:
GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;FORID:11

djbaxter
08-30-2007, 11:11 PM
GALT:

GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center ;BGC:E6E6E6;LBGC:336699;ALC:0000FF;LC:0000FF;T:000 000;GFNT:0000FF;GIMP:0000FF;LH:45;LW:100;S:http://forum.psychlinks.ca;LP:1;FORID:1

Path:

http://forum.mydomain.com/searchresults.php

davidw
08-30-2007, 11:14 PM
Change your galt to what I have (previous post) and test that.

Also try it with these forum paths
.searchresults.php
./searchresults.php
and your original.

djbaxter
08-30-2007, 11:15 PM
OK. I don't know exactly why but it is a GALT problem. I took mine from the code Google gave me. I just substituted your string instead and if I use yours, it works.

Is the GALT string unique to a specific publisher? Or can I use yours as a generic string?

davidw
08-30-2007, 11:20 PM
Mine is generic. You can play with the hex codes and see the different outcomes, but the one I supply is generic for multiple use. The one that google supplies a lot of times is specifically for one specific purpose (notice it has your domain in the GALT) and not meant to be altered cosmetically (breaks it).

djbaxter
08-31-2007, 12:12 AM
Thanks, David. Working fine now. :)

forte
08-31-2007, 11:13 PM
Is it possible to have a different cof code for each skin? Since it doesnt blend well with my other skin.

WarLion
08-31-2007, 11:28 PM
is any posible way to integrate to vbadvance workk like a charm in the forum but in my index is not show any idea?

davidw
08-31-2007, 11:50 PM
is any posible way to integrate to vbadvance workk like a charm in the forum but in my index is not show any idea?
I'm looking into a navigation bar solution for that myself, however, in the meantime, I have this (at vbadvanced) that works nicely for users (it's also what I've used since I wrote it)... http://www.vbadvanced.com/forum/showthread.php?p=82852

davidw
09-01-2007, 12:00 AM
Is it possible to have a different cof code for each skin? Since it doesnt blend well with my other skin.

Yes, it is entirely possible. I'm not sure if it is probable though.

What you'd have to do is go into each template (for each child style or alternate style)

Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => google Templates => google_navadsearch =>
Find:
{$vboptions['google_cof']}
Replace with:
Your new code

You'll also want to do this for google_siteadsearch as well.

This should work. I am not 100% because I've not tested it, but in theory it makes sense.

toucan42
09-01-2007, 01:19 AM
I am confused by your instructions as to template edits. I have uploaded the xml and I am looking at the navbar template - what exactly do I need to add/change in my templates?

Changelog
LEGACY VERSION - Applies to vb_google_legacy_1_2.zip only
- Very similar to Version 1.2 except instead of using a hook this will work for previous 3.6 versions (should work with any 3.6 version).
-- -- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Navigation / Breadcrumb Templates => navbar => find
Code:

$vbphrase[advanced_search]</a></td>
</tr>

Add, under $google_navadsearch
-- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch


This is just confusing to me. Sorry =/

toucan42
09-01-2007, 01:30 AM
OK I added $google_siteadsearch under $navbar in the search_forums template and now I get the integration into the advanced search page.

The results page, however, throws the following error:
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/talkwhat/public_html/searchresults.php on line 8

Also it is not showing in the dropdown on the navbar though I added "$google_navadsearch"

toucan42
09-01-2007, 01:56 AM
OOPS - I fixed the line 8 issue - still can't figure out how to get this integrated into the dropdown, though. Anyone?

davidw
09-01-2007, 03:45 AM
By default you shouldn't have to change anything in the templates. The only thing you should have to edit is in the admincp options. What version of vb do you have? If you are using the legacy version and you have follow the instructions and you are showing the searchresults.php page correctly (without results) when you go to http://www.. ..com/searchresults.php but it is not showing up at all in the drop-down then there is a very good chance that another hack is interfering with this one. This is possible.

I will be back on Monday.

WarLion
09-01-2007, 04:16 AM
I'm looking into a navigation bar solution for that myself, however, in the meantime, I have this (at vbadvanced) that works nicely for users (it's also what I've used since I wrote it)... http://www.vbadvanced.com/forum/showthread.php?p=82852
thanks dvidw i will try

forte
09-01-2007, 04:19 AM
Yes, it is entirely possible. I'm not sure if it is probable though.

What you'd have to do is go into each template (for each child style or alternate style)

Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => google Templates => google_navadsearch =>
Find:
{$vboptions['google_cof']}
Replace with:
Your new code

You'll also want to do this for google_siteadsearch as well.

This should work. I am not 100% because I've not tested it, but in theory it makes sense.

It works. Thanks a lot!:D

iogames
09-07-2007, 01:23 AM
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/iogamesc/public_html/searchresults.php on line 8

Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/iogamesc/public_html/searchresults.php on line 19

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iogamesc/public_html/searchresults.php on line 19

:(

djbaxter
09-07-2007, 05:09 AM
Warning: chdir() [function.chdir]: No such file or directory (errno 2) in /home/iogamesc/public_html/searchresults.php on line 8

Warning: main(./global.php) [function.main]: failed to open stream: No such file or directory in /home/iogamesc/public_html/searchresults.php on line 19

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/iogamesc/public_html/searchresults.php on line 19

iogames, I suspect you need to correct the file path in file searchresults.php

From your errors above, it seems that line 8 reads

chdir('/home/iogamesc/public_html/');

However, your forum is at a subdomain:

http://chat.iogames.com/

My guess is you need to edit line 8 in searchresults.php to read as follows:

chdir('/home/iogamesc/public_html/chat/');

Try that. If it doesn't work, email me.

davidw
09-09-2007, 11:19 AM
iogames, any news?

djbaxter
09-09-2007, 01:05 PM
iogames, any news?

Yes. We continued the discussion via PM and email. The fix I suggested worked, although he also seems to have a conflict with another plugin he's using - vBMailer, I believe. He was going to get on to vBMAiler support to try to fix that.

davidw
09-09-2007, 06:48 PM
I am going to be working on a newer version that, if successful, lets you have full and complete control on the CSS of the outcome.

If anyone has any requests or ideas of what they'd like to see in future releases, let me know - this mod has much potential :)

JayT123
09-11-2007, 11:03 AM
Anyway to change the frame height? I have tons of white space after the results. I tried adding an FrameHeight var but that doesn't work.

davidw
09-11-2007, 10:14 PM
Unfortunately, no - I have tried this myself and have found that adding a height value will not work. There are other scripts out there that do not work like this that do have an adjustable height, but I do not know why Google has disallowed it here. However, keep in mind, as soon as I find a way to allow different heights or if there is a change from Google, I will let everyone know.

JayT123
09-11-2007, 10:25 PM
What about adding a css for the iframe? Won't that override it?

davidw
09-11-2007, 10:48 PM
That's something I've played with, but haven't had any luck.

Theoretically, and its only a theory, an iframe within an iframe would work, but wouldn't necessarily be visually pleasing (its possible), but its a stab.

mdcdeve
09-29-2007, 04:31 AM
Hiya, i'm having some problems with 1.2. It works fine from the search.php page but when i use it from the drop down box in the navbar it always says "Please specify some words or valid user names to search on. There were no matches for those that you specified."

davidw
09-29-2007, 04:02 PM
That's really weird considering google has nothing to do with the site's search system. Do you have a demo link I can view this on? Also, please don't forget to click install.

mdcdeve
09-29-2007, 09:38 PM
That's really weird considering google has nothing to do with the site's search system. Do you have a demo link I can view this on? Also, please don't forget to click install.
Heya, thanks for replying. Heres a link you can check it out at.

user:mod
pass:mod

http://www.mdcdeve.com/forums/
http://www.mdcdeve.com/forums/search.php

davidw
09-30-2007, 12:24 AM
Ok, that's really weird - which version of 1.2 are you using? search or legacy? if legacy, can you post a snippet where you've added the code?

dfe
09-30-2007, 03:28 PM
I am running 3.6.8., also having a prob with the searchresults file, when trying to search I get the error below.

The file searchresults.php and global.php is in the same directory, both in /forum on the domain.

Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/domain.co.za/httpdocs/searchresults.php on line 16

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:') in /var/www/vhosts/domain.co.za/httpdocs/searchresults.php on line 16

davidw
09-30-2007, 06:26 PM
Did you edit the searchresults.php file and mark the location in your admincp options?

mdcdeve
09-30-2007, 10:01 PM
Ok, that's really weird - which version of 1.2 are you using? search or legacy? if legacy, can you post a snippet where you've added the code?


Hiya, i'm using the legacy version. Here's where i placed the code.

Navbar
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
<!-- Post Thanks Hack -->
$template_hook[navbar_search_menu]
<!-- / Post Thanks Hack -->
$google_navadsearch
</table>
</form>
</div>
<!-- / header quick search form -->
</if>

<if condition="$show['member']">
<!-- user cp tools menu -->
<div class="vbmenu_popup" id="usercptools_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">

search_forums
<title>$vboptions - <if condition="$show['searchthread']">$vbphrase[search_thread]<else />$vbphrase[search_forums]</if></title>
</head>
<body>
$header
$navbar
[B]$google_siteadsearch
<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>

dfe
10-01-2007, 03:45 AM
Did you edit the searchresults.php file and mark the location in your admincp options?


Hi I think I am missing you somewhere.

I have entered the 3 values in AdminCP for PUB, COF and Frame width.
I placed a copy of the searchresults.php in the same directory as the forum (/forum on my domain), but I noticed now that it was looking for it in root.

I now edited the search results page to change the path for the global.php file to ./forum/global.php but still getting the same error.

You mention "mark the location in AdminCP", how do you mean? Where must this be marked?

SemperFideles
10-01-2007, 11:06 AM
I'm sorry but I am extremely confused. The installation instructions for this are very hard to follow and there are a lot of files.

Assuming I want to install version 1.2 on a 3.6.8 site:

1. Which file(s) should I download?
2. Should I generate my own cof information from Adsense?
3. After I've installed and configured the 1.2 site, are there any templates I should modify or is that for the legacy version?

davidw
10-01-2007, 11:24 AM
Hi I think I am missing you somewhere.

I have entered the 3 values in AdminCP for PUB, COF and Frame width.
I placed a copy of the searchresults.php in the same directory as the forum (/forum on my domain), but I noticed now that it was looking for it in root.

I now edited the search results page to change the path for the global.php file to ./forum/global.php but still getting the same error.

You mention "mark the location in AdminCP", how do you mean? Where must this be marked?
What version are you using? If you are running 1.2 then the last spot has a URL path to your searchresults.php file - this is for your template (for no template edits). If you are not running 1.2, you may want to download vb_google_search_1_2.zip (3rd option) and install that one. This will allow you to fully use it on forums that are outside of root areas (have /forum or /forums)



I'm sorry but I am extremely confused. The installation instructions for this are very hard to follow and there are a lot of files.

Assuming I want to install version 1.2 on a 3.6.8 site:

1. Which file(s) should I download?
2. Should I generate my own cof information from Adsense?
3. After I've installed and configured the 1.2 site, are there any templates I should modify or is that for the legacy version?
1. If you are running 3.6.8, then you want vb_google_search_1_2.zip (3rd option) - the other is for older versions that do not have the hook locations.
2. You can try generating your own cof information but some have success, other have not. If yours does not work, use what I have supplied, that will work - and you should still be able to play with the hex colors to change it to your desire.
3. The templates to modify are only for the legacy version.

roady89
10-16-2007, 03:29 PM
Which version should I install on 3.6.7? I tried 2 different versions. One I got a blank page and the other I got an error 406 page.

roady89
10-16-2007, 07:30 PM
I got it to work. The GALT code google is generating does not have two "1" at the end of the code like yours does. Its ony producing one "1" and not two "1"'s. I placed an addition 1 on the end and it works. You can see it here if you wanna check it out. Custom Golf Carts (http://www.buggiesgonewild.com/)

Thanks for the great MOD. Clicked installed.
3.6.7

davidw
10-16-2007, 10:26 PM
Good job - I'm usually not on until evenings most of the time so I'm glad you got it sorted out.

yoyoyoyo
11-01-2007, 12:20 PM
what do I need to change in the xml in order to remove the site search? I would rather that people use the site search engine, but want to keep the google search plugin-based

davidw
11-01-2007, 10:55 PM
If you are referring to the search.php usage, nothing will be done there (or seen) unless you put in the $google_siteadsearch - all it will be is a template. However, if you want to remove it all, just find this:
<template name="google_siteadsearch" templatetype="template" username="davidw" version="1.2"><![CDATA[<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<form method="get" action="{$vboptions['google_forum_path']}" target="_top"><td class="tcat">Search Google / Search Forums Using Google</td>
</tr>
<tr>
<td class="panelsurround" align="center" title="nohilite">
<table class="panel" border="0" width="100%" align="center">
<tr>
<td nowrap="nowrap" align="center" valign="top">
<input type="hidden" name="domains" value="{$vboptions['homeurl']}"></input>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Go"></input>
</td>
</tr>
<tr>
<td nowrap="nowrap" align="center" valign="top">
<table border="0">
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web">{$vboptions['google_label_web']}</label>
</td>
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" checked id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
</tr>
</table>
<input type="hidden" name="client" value="{$vboptions['google_pub']}"></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="{$vboptions['google_cof']}"></input>
<input type="hidden" name="hl" value="en"></input>
</td>
</tr>
</table>
</td></form>
</tr>
</table>]]></template> and this <plugin active="1" executionorder="5">
<title><![CDATA[vB Google Search - Search.php]]></title>
<hookname>global_start</hookname>
<phpcode><![CDATA[global $db, $vbulletin;
eval('$google_siteadsearch .= "' . fetch_template('google_siteadsearch') . '";');]]></phpcode>
</plugin> and remove both of those.

Btw, don't forget to click install :)

yoyoyoyo
11-02-2007, 01:07 AM
what I was asking is how to make the google search just the www and not your site

davidw
11-02-2007, 01:25 AM
oh, take that option out of the templates

Find and remove:
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" checked id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
and
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" checked id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
you could also remove both instances of
<input type="hidden" name="domains" value="{$vboptions['homeurl']}"></input> but that's up to you

yoyoyoyo
11-02-2007, 04:04 AM
ok thanks much!

on another note, microstats is showing this:
Uncached templates: google_navadsearch (1)
Uncached templates: google_siteadsearch (1)

how do I fix that?

davidw
11-02-2007, 11:07 AM
That's weird - let me look into that tonight.

davidw
11-02-2007, 11:50 PM
For some reason when I started on this project, I omitted it, this is the missing plugin -

<plugin active="1" executionorder="5">
<title><![CDATA[vB Google Cache Templates]]></title>
<hookname>cache_templates</hookname>
<phpcode><![CDATA[$globaltemplates[] = 'google_navadsearch';
$globaltemplates[] = 'google_siteadsearch';
$globaltemplates[] = 'google_searchresults';]]></phpcode>
</plugin> I will upload an update later.

davidw
11-03-2007, 12:19 AM
Ok, latest and greatest has been uploaded :) (I won't send an update since the version difference is negligible.)

psychotronic
11-03-2007, 02:51 AM
dear david
the $google_navadsearch i put on the navbar template
but just show on on forum page..
i use vBadvanced CMPS but they not showing up on the navbar
do i miss something?

thanks before

davidw
11-03-2007, 03:02 AM
That is something I'm still working on as well - I'm having an issue with the navbar in vbadvanced with a few items that use hooks.

yoyoyoyo
11-03-2007, 03:53 AM
thanks for the update

psychotronic
11-03-2007, 11:30 AM
That is something I'm still working on as well - I'm having an issue with the navbar in vbadvanced with a few items that use hooks.


I found it david..

- Admin CP> vBa CMPS > Default Settings> Main Options>
- Under the 'Portal Output Global Variables' setting you will need to add "google_navadsearch"

and.. voilaaaa.. they show up!!!!

davidw
11-03-2007, 12:49 PM
That's funny - I've already put it there - I may have misspelled it on my site though. Thanks for looking into that. :)

davidw
11-03-2007, 12:50 PM
thanks for the updateNo problem - it should have been there in the first place ;) - I'm surprised it wasn't brought up sooner, tbh.

powerful_rogue
11-06-2007, 02:09 PM
Hi,

Kind of managed to get it working!

If you search via the drop down box (google or my site) it comes back with the following error:

1. Please specify some words or valid user names to search on. There were no matches for those that you specified.

However, If I search via the search.php page it works fine!

Any sugegstions at all?

powerful_rogue
11-06-2007, 07:50 PM
One more question!

Would it be possible to create a vbadvance module that shows the google search box? When people search using it they are then taken to the searchresults.php page. Ive tried to have a play around but could seem to get it to work.

davidw
11-06-2007, 10:26 PM
I actually have a vbadvanced version at vbadvanced.com (I guess I could release it here).

http://www.vbadvanced.com/forum/showthread.php?p=82852 and also post 3 - I've not updated it in a while but is still usable (just needing a couple modifications to it).

davidw
11-06-2007, 10:31 PM
Hi,

Kind of managed to get it working!

If you search via the drop down box (google or my site) it comes back with the following error:

1. Please specify some words or valid user names to search on. There were no matches for those that you specified.

However, If I search via the search.php page it works fine!

Any sugegstions at all?Can you tell me your website so I can see what is going on?

powerful_rogue
11-06-2007, 10:33 PM
Hi,

Thanks for the reply :)

My site is www.DoverLocals.co.uk

Also without wishing to be a pain, is there anyway to reduce the amount of space after the results. Ive attached an image to show you.

Thanks

Dave

davidw
11-06-2007, 10:59 PM
As far as the "whitespace" below the results, that can't (currently) be altered at the moment due to the code Google supplied (unalterable iframe height). However, I am always on the lookout for new code so that this can be improved.

Looking at your site, you are using a version of vB that may not take full advantage of the full version of the code (as I have noticed with another member who had a similar issue as you). After looking into it, it was discovered that the legacy version worked best.

Which version are you using? Have you tried using the legacy version?

powerful_rogue
11-07-2007, 10:40 AM
Im currently using the 1.3 legacy version. I also made all the alterations in the first post.

davidw
11-07-2007, 10:59 AM
Can you PM me the section of code that pertains to this in your navbar? Also a temp login account to see what is going on as clicking on search just takes me to search.php. I will be back tonight (I work during the days).

oldengine
11-07-2007, 08:27 PM
I notice in your screen shot that the Google results are crowded up against the left hand side of the white background. I think that the previous hack by someone else did this also, but is there any margin value capability? Maybe an extra white table around it?

Great hack by the way! I just installed it and after adding an extra 1 to the GALT it works. With only 1 as in my google code, it returns an empty result screen.

I am on 3.6.8 and it's also working on the current versions of PhotoPost vBGallery and vBAdvanced Links.

Does anyone know the reason for GAULT 1 or 11 ?

davidw
11-08-2007, 10:28 PM
I notice in your screen shot that the Google results are crowded up against the left hand side of the white background. I think that the previous hack by someone else did this also, but is there any margin value capability? Maybe an extra white table around it?That's something that is currently out of my control as it is set in an iFrame controlled by Google. Hopefully in a later release, that can be fixed.

Great hack by the way! I just installed it and after adding an extra 1 to the GALT it works. With only 1 as in my google code, it returns an empty result screen.

I am on 3.6.8 and it's also working on the current versions of PhotoPost vBGallery and vBAdvanced Links.

Does anyone know the reason for GAULT 1 or 11 ?I'm not sure, but I think the difference between the 1 and the 11 is how the code is processed.

I do appreciate the compliments. In the future I will add more flexibility in a phase-in/phase-out period as I did with previous versions.

powerful_rogue
11-09-2007, 05:11 PM
I actually have a vbadvanced version at vbadvanced.com (I guess I could release it here).

http://www.vbadvanced.com/forum/showthread.php?p=82852 and also post 3 - I've not updated it in a while but is still usable (just needing a couple modifications to it).

Ive installed this module and it works a treat :)

Is there anyway though for it to bring up the results in the searchresults.php page?

Raffaele
11-09-2007, 07:07 PM
Hi David,

i got the pub but where do you get the GALT at the adsence site??

Thank you for the help
RV

powerful_rogue
11-09-2007, 07:27 PM
Once google has generated the search code - you can locate the GALT in that.

davidw
11-09-2007, 09:55 PM
Ive installed this module and it works a treat :)

Is there anyway though for it to bring up the results in the searchresults.php page?
Not in the current form, but I am going to be working on a new version - that module will work on any version of vb (which is what it was intended for). I will post something when I have it created.

davidw
11-09-2007, 09:57 PM
Hi David,

i got the pub but where do you get the GALT at the adsence site??

Thank you for the help
RV

If you don't find the GALT you can use what I have at the top of the thread.

Don't forget to click Install :)

powerful_rogue
11-09-2007, 10:53 PM
Not in the current form, but I am going to be working on a new version - that module will work on any version of vb (which is what it was intended for). I will post something when I have it created.

Superb. Cant wait for it to be released. For the time being, is there anyway the page can be edited so a logo or such like shows up?

davidw
11-09-2007, 11:50 PM
Let me see what I can do
temporarily try this...
change the vba template from
<tr>
<td class="$bgclass">
<input name="q" type="text" size="21" maxlength="255" value=""><br>
<input name="sitesearch" type="radio" value="www.yourwebsite.com" checked> Yourwebsite<br>
<input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>&nbsp;&nbsp;&nbsp; $gobutton
<div class="smallfont">&raquo; <a href="$vboptions[bburl]/search.php?">$vbphrase[advanced_search]</a></div>
</td>
</tr>
to
<tr>
<td class="$bgclass">
<table border="0">
<tr>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="{$vboptions['homeurl']}"></input>
<input type="text" name="q" size="21" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Go"></input>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<table border="0">
<tr>
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" checked id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web">{$vboptions['google_label_web']}</label>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="smallfont">&raquo; <a href="$vboptions[bburl]/search.php?">$vbphrase[advanced_search]</a></div>
</td>
</tr>
and [from step 3 of the adsense.txt file] change
<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">
to
<form method="get" action="{$vboptions['google_forum_path']}" target="_top"><input type="hidden" name="client" value="{$vboptions['google_pub']}"><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 type="hidden" name="cof" value="{$vboptions['google_cof']}"><input type="hidden" name="hl" value="en">
This should technically work, but I've not tested it

Remember make a backup of what you have before changing anything. Of course, you will also need to add any variables to the admincp just like in this post. https://vborg.vbsupport.ru/showpost.php?p=1374757&postcount=93

The_Gun_Man
11-10-2007, 01:33 AM
Is there any reason why the

vbulletin3_logo_white.gif
navbits_finallink_ltr.gif
navbits_start.gif

Don't showup on the search results page? I've tried both versions and the same results. I have the default skin.

davidw
11-10-2007, 02:10 AM
No, they should show up. I am pulling $header and $navbar - do you have a link to your site I can view?

Btw, don't forget to click Install :)

powerful_rogue
11-10-2007, 08:25 AM
Let me see what I can do
temporarily try this...
change the vba template from
<tr>
<td class="$bgclass">
<input name="q" type="text" size="21" maxlength="255" value=""><br>
<input name="sitesearch" type="radio" value="www.yourwebsite.com" checked> Yourwebsite<br>
<input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>&nbsp;&nbsp;&nbsp; $gobutton
<div class="smallfont">&raquo; <a href="$vboptions[bburl]/search.php?">$vbphrase[advanced_search]</a></div>
</td>
</tr>
to
<tr>
<td class="$bgclass">
<table border="0">
<tr>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="{$vboptions['homeurl']}"></input>
<input type="text" name="q" size="21" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Go"></input>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<table border="0">
<tr>
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" checked id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
</tr>
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web">{$vboptions['google_label_web']}</label>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div class="smallfont">&raquo; <a href="$vboptions[bburl]/search.php?">$vbphrase[advanced_search]</a></div>
</td>
</tr>
and [from step 3 of the adsense.txt file] change
<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">
to
<form method="get" action="{$vboptions['google_forum_path']}" target="_top"><input type="hidden" name="client" value="{$vboptions['google_pub']}"><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 type="hidden" name="cof" value="{$vboptions['google_cof']}"><input type="hidden" name="hl" value="en">
This should technically work, but I've not tested it

Remember make a backup of what you have before changing anything. Of course, you will also need to add any variables to the admincp just like in this post. https://vborg.vbsupport.ru/showpost.php?p=1374757&postcount=93

Thanks for that, I gave it a go but it threw up loads of errors. Not sure if this was caused by me not adding:

you will also need to add any variables to the admincp as I wasnt sure what I needed to add. Also where does the pub code go?

Was a little bit confused. Thanks anyway

Dave

powerful_rogue
11-10-2007, 08:50 AM
One more question without wishing to be pain!

On the normal search where it shows the header - is is possible to have links open in a new tab or actually within the site itself?

davidw
11-10-2007, 02:44 PM
The pub is being called from the adminCP - originally the module kept it in a secondary location.
To open in a new page, you would edit this part
<form method="get" action="{$vboptions['google_forum_path']}" target="_top">
and change top to blank.
I may have time to work on this today.

davidw
11-10-2007, 03:20 PM
I found it david..

- Admin CP> vBa CMPS > Default Settings> Main Options>
- Under the 'Portal Output Global Variables' setting you will need to add "google_navadsearch"

and.. voilaaaa.. they show up!!!!
Some people may need to add the variable template_hook there as well for it to show up correctly (as that is what I had overlooked).

davidw
11-10-2007, 04:18 PM
Ok, I have a working prototype on my site now :)
Edit: I have updated the modification to add the vbadvanced (version 1.4).

powerful_rogue
11-10-2007, 07:54 PM
Thanks for the update :D

Ive got it all installed, however one problem with the vbadvance module. When I hit search, it takes me to the searchresults.php page, however this is blank.

Is the same for searching the site and searching google, however it works fine when searching via the dropdown navbar.

davidw
11-10-2007, 07:59 PM
That's weird - as I have it working as such on my own site and it displays results.
Edit - try reverting your adv_portal_ template if you used the 1.4 version.
All the information is stored in the new template and the old template takes you to blank results.

powerful_rogue
11-10-2007, 08:03 PM
That's weird - as I have it working as such on my own site and it displays results.
Edit - try reverting your adv_portal_ template if you used the 1.4 version.

Sorry David, lost me on that one :erm:

I started from scratch on the VBA module and followed these steps:

Step 5:
Go to Admincp => vBA CMPS => Default Settings => Under Options Portal Output Global Variables
Add (or make sure they are present) these varaiables:
template_hook
google_navadsearch
google_label_site
google_label_web
homeurl

Step 6:
Click on Edit Modules. Click on Search Forums (module).
Under Module Tools, find Select Action (very top) and choose Copy.

In your new (copy) of the Search Forums Module, change the name of your module to whatever you want (I chose "Search").
Under the Template Module Options heading, edit the adv_portal_ area.
Change it from search to search_google

Next,
Under Module Shell Template Options, in the Form Code box,
Change
Code:

<form action="{$vbulletin->options[bburl]}/search.php" method="post" name="search"> <input name="s" type="hidden" value="" /> <input name="do" type="hidden"

value="process" /> <input name="sortby" type="hidden" value="lastpost" /> <input name="forumchoice" type="hidden" value="0" />

To
Code:

<form method="get" action="http://www.yoursite.com/searchresults.php" type="hidden" name="search" target="_blank">

Make sure this URL is the correct full path to your searchresults.php file.

davidw
11-10-2007, 08:27 PM
You have the old style vba module, not the new one (from the template in 1.4). The Go button should be to the right of the text box.
This is what it should look like:

powerful_rogue
11-10-2007, 08:30 PM
You have the old style vba module, not the new one (from the template in 1.4). The Go button should be to the right of the text box.

Ah right. How do I get the new template. I imported the new xml file for the mod, however at the time I still had the old vba search mod.

davidw
11-10-2007, 08:35 PM
click on the old template you created and on the right side click Revert
The new template (that is created from the XML) will show up under vBadvanced CMPS Templates

powerful_rogue
11-10-2007, 08:39 PM
click on the old template you created and on the right side click Revert
The new template (that is created from the XML) will show up under vBadvanced CMPS Templates

Superb! Thank you :D

One more question, now ive reverted the template, the VBA box is a bit wider then before - is there an easy way to edit the width?

davidw
11-10-2007, 08:50 PM
Yes, you can either edit the XML and reupload so that nothing has to be reverted later if changers are to be made, or edit the template.

Either way, in the template in your styles (or in the XML) find this:
<input type="text" name="q" size="21" maxlength="255" value=""></input> and change the size="21" to whatever shorter size fits. 21 is what I use on my site. In the future I may make that an adminCP variable.

powerful_rogue
11-10-2007, 08:56 PM
Fantastic :D

Thank you very much for all your support. This really is a fantatsic mod with excellent support. Nominated for MOTM

davidw
11-10-2007, 09:00 PM
Thank you - but to be honest, I can only support it when I'm available (usually evenings and most weekends).

oldengine
11-13-2007, 04:07 PM
Has anyone come up with a way to provide this Google site search to unregistered users, but NOT give them access to the general vBulletin search tool?

(admin - usergroup manager - Can Search Forums NO)

In other words, let Google do the work for unregistered users and save our server load.

davidw
11-13-2007, 09:00 PM
Hmm, interesting - I'll have to look into that.

oldengine
11-14-2007, 03:17 PM
After trying the above for a bit, I have turned my vBulletin search back on for unregistered users and I switched to the Fulltext search engine. I use the captcha for general searches and I link to the really popular "Todays Posts" from my front page.

Google search results are not totally impressive on my site. I think they are blocking "common words" and in my case, "famous" is not a common word - it's the brand name for a popular piece of equipment. My Google site: results return 166,000 pages and of course no one but Google will shape the order of those listings.

Keeping server load down and keeping new readers doesn't quite mix. If I put VBSEO on, the load will go up for that too. Anyway, enough of me, I still think this is a valuable hack. Combining vB search and Google search will cover all the bases.

davidw
11-15-2007, 01:13 AM
I wanted to integrate this even further but there were a few restrictions with forms that prevented me from doing so. However, I am all for more ideas on adding to this :)

tom209
11-18-2007, 11:39 AM
Hi

Thank you for the extension.

Unfortunately, I have noticed that it Firefox works with Internet Explorer

Does anybody have a solution?

THANKS

davidw
11-18-2007, 12:57 PM
Unfortunately, I have noticed that it Firefox works with Internet Explorer What do you mean?

tom209
11-18-2007, 09:10 PM
Hi

I had this problem with Internet Explorer is not Google appears when I click on the Search button, but when I use Firefox to search everything will click.

Example:

So it is with Internet Explorer appears when I click on the Search:

http://www.pcwango.de/test/ie.png

So it is with Firefox when I click on the Search:

http://www.pcwango.de/test/fi.png


Do you have a solution?

THANKS

davidw
11-18-2007, 09:38 PM
Have you tried logging out, clearing you cookies, and clearing your cache in Internet Explorer - then logging back in?

tom209
11-18-2007, 11:05 PM
Hello

Yes, I have. I have even tested three different computers. One was even a Vista with Internet Explorer 7th But unfortunately, is the same.
I even thought maybe this is only when I am connected. Unfortunately the same

I do not know why

davidw
11-18-2007, 11:56 PM
Do you have a way for me to look at this at your site? I am curious as why your site does not work, while others do.

popowich
01-14-2008, 03:16 PM
How can I remove the vBulletin search and only have the Google powered searches?

Is it possible to have this be the search tool that guests are presented with?

-Raymond

davidw
01-14-2008, 11:35 PM
Are you using the regular version or the legacy version? Also, which location are you wanting to set the google for guests? If it is just the navigation bar, one thing you can try is going to your navbar template and finding this
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&nbsp;
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->
and replace with this
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<!-- <tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&nbsp;
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr> -->
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->
if you just only want to hide everything from guests, but show it to everyone else, this should work (but I've not tested it).
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<if condition="is_member_of($vbulletin->userinfo,5,6,7)"><tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>
<div style="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&nbsp;
<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr></if>
$template_hook[navbar_search_menu]
</table>
</div>
<!-- / header quick search form -->Where it says 5,6,7 add all the usergroups you want to use there.

chevy01xtreme
01-27-2008, 04:36 AM
i am lost on how to install this. i am running 3.6.8 pl2

davidw
01-27-2008, 01:16 PM
As long as you are running 3.6.8 or higher, you can use vb google search 1 4.zip rather than the legacy version.

Simplified instructions:
Step 1:
Open up searchresults.php and edit the location to where you will upload it (preferably to the site's root location)
Upload searchresults.phpt.
Example: http://www.yoursite.com/searchresults.php

Step 2:
Install the product
Go to Admincp => Plugins & Products => Manage Products => [Add/Import Product] => Browse for product-davidw_vb_google_search.xml => Import

Step 3:
Configure your Admincp options
Go to Admincp => vBullitin Options => vBulletin Options => Find vB Google Search (Adsense) then click [Edit Settings]
Edit your Pub ID, Cof, and your desired width of the iframe for your results. I use 800 in the screenshot, but you can change this based on your needs.
This information is located at the top of each of these threads.

Don't forget to click install for support. If you are still having issues, PM me and I will help you out as best as I can.

chevy01xtreme
01-27-2008, 04:55 PM
As long as you are running 3.6.8 or higher, you can use vb google search 1 4.zip rather than the legacy version.

Simplified instructions:
Step 1:
Open up searchresults.php and edit the location to where you will upload it (preferably to the site's root location)
Upload searchresults.phpt.
Example: http://www.yoursite.com/searchresults.php

Step 2:
Install the product
Go to Admincp => Plugins & Products => Manage Products => [Add/Import Product] => Browse for product-davidw_vb_google_search.xml => Import

Step 3:
Configure your Admincp options
Go to Admincp => vBullitin Options => vBulletin Options => Find vB Google Search (Adsense) then click [Edit Settings]
Edit your Pub ID, Cof, and your desired width of the iframe for your results. I use 800 in the screenshot, but you can change this based on your needs.
This information is located at the top of each of these threads.

Don't forget to click install for support. If you are still having issues, PM me and I will help you out as best as I can.
ok done this. how do i now get this to show up...i9 think i have the searchresults.php path wrong

this is teh error i get when trying to search Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/gsxrforu/public_html/searchresults.php on line 19

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gsxrforu/public_html/searchresults.php on line 19

also how do i get this box to match teh size of the rest of teh column

davidw
01-27-2008, 08:30 PM
Where is your searchresults.php file located?
Also, the line
chdir('/path/to/your/forums/');
This is for your root directory. If your root directory is public_html then that line should read
chdir('/home/gsxrforu/public_html/');
It will not find global.php within searchresults.php

davidw
01-27-2008, 08:31 PM
also how do i get this box to match teh size of the rest of teh column

https://vborg.vbsupport.ru/showpost.php?p=1379973&postcount=127

chevy01xtreme
01-27-2008, 08:59 PM
Where is your searchresults.php file located?
Also, the line
chdir('/path/to/your/forums/');
This is for your root directory. If your root directory is public_html then that line should read
chdir('/home/gsxrforu/public_html/');
It will not find global.php within searchresults.php
teh searchresults.php is in the root directory... if not there where does it go.. still dont work :(

davidw
01-27-2008, 09:03 PM
Can you PM me site details (location, location of searchresults.php, etc)?

chevy01xtreme
01-28-2008, 02:34 PM
Can you PM me site details (location, location of searchresults.php, etc)?
thank you for helping me to get it to work :)

ARB4HOSTING.COM
01-29-2008, 11:02 AM
thanks ....

MrEyes
02-27-2008, 10:19 AM
Hello,

I seem to be running into some problems getting this up and running under vb3.6.8 pl2.

Everything seems to have installed without errors, however the google search dialogs do not appear in the nav bar drop down boxes.

Now the following might be relevant, my navbar code is not in the navbar template it is in the header template. The hook for "navbar_search_menu" is present in the template so I assume this should not matter.

I might be wrong, however I was under the impression that google searching options would appear in the default vBulletin search.php page. If my "impression" is right, then the search dialogs are not displayed.

If I open the searchresults.php page, this opens correctly but obviously doesn't include any search results

I have also tried to add this to vBadvanced CMPS v3.0 RC2, the search dialog appears but when I search I get no results (or errors for that matter) displayed in searchresults.php

This is what I have done so far:

1) Downloaded vb_google_search_1_4.zip
2) Edited the searchresults.php to contain the correct forum path (line 8)
3) Uploaded searchresults.php to the root of the webserver (same directory as the VB index page)
4) Imported the product XML via AdminCP
5) Via AdminCP - vB Google Search (Adsense) set the following options

- Google Pub ID - using the value from https://www.google.com/adsense/account-settings. Interestingly this is prefixed with "partner", i.e. "partner-pub-1234567", I have added this without the "partner-" part

- Google cof code - Using the code as created in the adsense for search wizard in google adsense managment

- Google Frame Width - Set to 90%

- Image/Text for site - Set to the url of the site

- Image/Text for Google - No change made, using the default value of "web"

- Your Forum's Path - Entered the full URL to the searchresults.php

6) In AdminCP - vBa CMPS - Default Settings - Main Options - Portal Output Global Variables, added:

template_hook
google_navadsearch
google_label_site
google_label_web
homeurl

This was previously empty

7) In AdminCP - vBa CMPS - Edit Modules, selected "Search Forums" and under "Module Tools" selected "Copy"

8) Named the module copy to "Google Search"

9) In [Module] Main Options - Template Module Options - Template to Include, added "search_google"
Under the Template Module Options heading, edit the adv_portal_ area.
Change it from search to search_google

10) In [Module] Module Wrapper Template Options - Form Code, edited code to read:

<form method="get" action="http://www.mysite.com/searchresults.php" type="hidden" name="search" target="_blank">

Thats is everything in the "Form Code" box

11) In AdminCP - vBa CMPS - Edit Modules - Google Search, selected "Add/Remove" from pages and used the normal CMPS process for adding the module to the bottom of the centre column.

So anybody got any ideas?

Also one other question, has anybody got this running on 3.7?

EDIT : I have managed to get the CMPS not displaying results issue resolved (sort of), this was due to the configuration I had created in the google wizard, choosing the "Open results within my own site" options seems to have done the trick. However even though I selected a width of 800px the results are displayed in a thin column (around 300px). Additionally the bottom of the results is cut off and the search results page does not display a search dialog where users can re-search for other terms

Bloom21
02-28-2008, 04:36 PM
As long as you are running 3.6.8 or higher, you can use vb google search 1 4.zip rather than the legacy version.

Simplified instructions:
Step 1:
Open up searchresults.php and edit the location to where you will upload it (preferably to the site's root location)
Upload searchresults.phpt.
Example: http://www.yoursite.com/searchresults.php



I assume this should read to your DIR of where you forum ROOT resides... thats why the fellow above is getting those errors.

davidw
02-28-2008, 05:15 PM
Hello,

I seem to be running into some problems getting this up and running under vb3.6.8 pl2.

Everything seems to have installed without errors, however the google search dialogs do not appear in the nav bar drop down boxes.

Now the following might be relevant, my navbar code is not in the navbar template it is in the header template. The hook for "navbar_search_menu" is present in the template so I assume this should not matter. As long as your header template contains the relevant hook location navbar_search_menu then it should work ? if it is not present, it will not work. You could try editing your template and ensuring both are present just in case.
$google_navadsearch
$template_hook[navbar_search_menu]

I might be wrong, however I was under the impression that google searching options would appear in the default vBulletin search.php page. If my "impression" is right, then the search dialogs are not displayed. This will display once you add the variable $google_siteadsearch

-- Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch

If I open the searchresults.php page, this opens correctly but obviously doesn't include any search resultsJust opening the searchresults.php page will do just that. If you see the header, footer, etc., but no results, from just opening the page with no reference, its working correctly.

I have also tried to add this to vBadvanced CMPS v3.0 RC2, the search dialog appears but when I search I get no results (or errors for that matter) displayed in searchresults.php

This is what I have done so far:

1) Downloaded vb_google_search_1_4.zip
2) Edited the searchresults.php to contain the correct forum path (line 8)
3) Uploaded searchresults.php to the root of the webserver (same directory as the VB index page)
4) Imported the product XML via AdminCP
5) Via AdminCP - vB Google Search (Adsense) set the following options

- Google Pub ID - using the value from https://www.google.com/adsense/account-settings. Interestingly this is prefixed with "partner", i.e. "partner-pub-1234567", I have added this without the "partner-" part

- Google cof code - Using the code as created in the adsense for search wizard in google adsense managment

- Google Frame Width - Set to 90%

- Image/Text for site - Set to the url of the site

- Image/Text for Google - No change made, using the default value of "web"

- Your Forum's Path - Entered the full URL to the searchresults.php

6) In AdminCP - vBa CMPS - Default Settings - Main Options - Portal Output Global Variables, added:

template_hook
google_navadsearch
google_label_site
google_label_web
homeurl

This was previously empty

7) In AdminCP - vBa CMPS - Edit Modules, selected "Search Forums" and under "Module Tools" selected "Copy"

8) Named the module copy to "Google Search"

9) In [Module] Main Options - Template Module Options - Template to Include, added "search_google"
Under the Template Module Options heading, edit the adv_portal_ area.
Change it from search to search_google

10) In [Module] Module Wrapper Template Options - Form Code, edited code to read:

<form method="get" action="http://www.mysite.com/searchresults.php" type="hidden" name="search" target="_blank">

Thats is everything in the "Form Code" box

11) In AdminCP - vBa CMPS - Edit Modules - Google Search, selected "Add/Remove" from pages and used the normal CMPS process for adding the module to the bottom of the centre column.

So anybody got any ideas?

Also one other question, has anybody got this running on 3.7?

EDIT : I have managed to get the CMPS not displaying results issue resolved (sort of), this was due to the configuration I had created in the google wizard, choosing the "Open results within my own site" options seems to have done the trick. However even though I selected a width of 800px the results are displayed in a thin column (around 300px). Additionally the bottom of the results is cut off and the search results page does not display a search dialog where users can re-search for other terms I?ve not tested this with vbadvanced 3.0 or 3.7 (yet) but that is coming up shortly.

Bloom21
02-28-2008, 07:45 PM
anyone get this to actually work on 3.6.8 L2?

Here is my navbar piece where I am supposed to add:

<!-- NAVBAR POPUP MENUS -->

<if condition="$show['searchbuttons']">
<!-- header quick search form -->
<div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$vbphrase[search_forums]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="search.php?do=process" method="post">
<input type="hidden" name="do" value="process" />
<input type="hidden" name="quicksearch" value="1" />
<input type="hidden" name="childforums" value="1" />
<input type="hidden" name="exactname" value="1" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<div><input type="text" class="bginput" name="query" size="25" tabindex="1001"/>
<input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div>

<div tyle="margin-top:$stylevar[cellpadding]px">
<label for="rb_nb_sp0">
<input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>&nbsp;

<label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</tr>


$google_navadsearch
$template_hook[navbar_search_menu]
</table>


</div>
<!-- / header quick search form -->

This doesn't work at all on the actual site.

davidw
02-28-2008, 09:05 PM
I have it running on 3.6.8 PL2 with no issues (but it is in the navbar, not the header). Another option is to put the template code in there manually.

Where the $google_navadsearch is in your header, take that out and put in this
<tr>
<form method="get" action="{$vboptions['google_forum_path']}" target="_top"><td class="thead">Search Site / Google</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<table border="0">
<tr>
<td nowrap="nowrap">
<input type="hidden" name="domains" value="{$vboptions['homeurl']}"></input>
<input type="text" name="q" size="31" maxlength="255" value=""></input>
<input type="submit" name="sa" value="Go"></input>
</td>
</tr>
<tr>
<td nowrap="nowrap">
<table border="0">
<tr>
<td>
<input type="radio" name="sitesearch" value="" id="ss0"></input>
<label for="ss0" title="Search the Web">{$vboptions['google_label_web']}</label>
</td>
<td>
<input type="radio" name="sitesearch" value="{$vboptions['homeurl']}" checked id="ss1"></input>
<label for="ss1" title="Search {$vboptions['homeurl']}">{$vboptions['google_label_site']}</label>
</td>
</tr>
</table>
<input type="hidden" name="client" value="{$vboptions['google_pub']}"></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="{$vboptions['google_cof']}"></input>
<input type="hidden" name="hl" value="en"></input>
</td>
</tr>
</table>
</td></form>
</tr>
and make changes where are necessary.

Bloom21
02-28-2008, 09:08 PM
um my post was about the NAV bar

MrEyes
02-29-2008, 03:55 PM
As long as your header template contains the relevant hook location navbar_search_menu then it should work – if it is not present, it will not work. You could try editing your template and ensuring both are present just in case.
$google_navadsearch
$template_hook[navbar_search_menu]

Checking the template shows this hook, the following is the relevant template snippet:

<tr>
<td class="vbmenu_option"><a href="blog_search.php?do=search">Advanced Search</a></td>
</tr>
$google_navadsearch
$template_hook[navbar_search_menu]
</table>

I have also double checked that the "Plugin/Hook System" is enabled in AdminCP.

For now I have followed your earlier advice (https://vborg.vbsupport.ru/showthread.php?p=1453188#post1453188) and manually added the google search code to the template. So it now works, ish (see * below)

This will display once you add the variable $google_siteadsearch

That works a treat, ish (see * below)

I’ve not tested this with vbadvanced 3.0 or 3.7 (yet) but that is coming up shortly.

Well so far I have managed to get the search module added and it seems to work. There is only one problem though:

* When search results are displayed they show in a thin column on searchresults.php which sometimes seems to be cut off. After running some tests this seems to be how google is displaying the result in the iframe. I have set the "Google Frame Width" in "AdminCP - Options - Help vB Google Search (Adsense)" to 700px. This is getting through to the page output as if I view source I see:

var googleSearchFrameWidth = '700px';

However I still get the thin column and sometimes cut off results. Interestingly if I edit the following line in the google_searchresults template:

<div id="googleSearchUnitIframe"></div>

to

<div id="googleSearchUnitIframe" style="border: 1px solid #FF0000"></div>

The results are rendered with a red border around the iframe div and this border uses the "full screen". So it looks like it is the output from google that is causing the problem. However I am at a loss to explain this or find a solution

davidw
03-01-2008, 01:07 AM
um my post was about the NAV bar
This works both places

MrEyes
03-03-2008, 08:54 AM
stuff about the width of search results not being right

Fixed

This was my mistake, I entered the width as "700px" this should have been "700"

So all working (apart from the hook not being picked up which was resolved by manually adding the search code)

davidw
03-03-2008, 11:19 AM
Don't forget to click install :)

Phaedrus
03-29-2008, 07:57 AM
Quick question.

Ads do not seem to appear with my results. Does it take some time before those begin to appear or have I done something odd?

davidw
03-29-2008, 12:49 PM
You should see them in your searchresults.php page, as long as you have your PUB-# in your admincp.

Phaedrus
03-29-2008, 03:37 PM
You should see them in your searchresults.php page, as long as you have your PUB-# in your admincp.
I'm getting them now. Works great!

I'd love to be able to change the background for different skins, but heck. I don't see how it would be possible other than directly changing the backgrounds....

Thumbs up to this one.

davidw
03-29-2008, 06:51 PM
You should be able to modify it, but be careful. The cof code (aka GALT) contains all the hex colors for the background/links/etc. Experiment with these hex numbers to change those settings, but make sure you retain the old settings just in case something goes awry.

Phaedrus
03-30-2008, 05:11 AM
You should be able to modify it, but be careful. The cof code (aka GALT) contains all the hex colors for the background/links/etc. Experiment with these hex numbers to change those settings, but make sure you retain the old settings just in case something goes awry.
You can use the hex colors in your skin... But yeah, keeping the old info is important.

angeldevil
04-30-2008, 09:25 AM
i got this problem any1 can help pls ?

Google
Error


Forbidden
Your client does not have permission to get URL /custom?domains=http%3A%2F%2Fwww.giaitrituoitre.net&q=hosting&sa=Go&sitesearch=http%3A%2F%2Fwww.giaitrituoitre.net&client=pub-0253864467006134&forid=1&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%23008000%3BGL%3A1%3BDIV%3A%23336699%3B VLC%3A663399%3BAH%3Acenter%3BBGC%3AFFFFFF%3BLBGC%3 A336699%3BALC%3A0000FF%3BLC%3A0000FF%3BT%3A000000% 3BGFNT%3A0000FF%3BGIMP%3A0000FF%3BFORID%3A11&hl=en&ad=w9&num=10 from this server. (Client IP address: 89.3.217.132)

We apologize for your inconvenience, but this request could not be processed.

Please click here to continue your search on Google.

angeldevil
04-30-2008, 09:48 AM
Vb google search set to http://img293.imageshack.us/my.php?image=sgooglero1.jpg
And chdir('/var/www/vhosts/giaitrituoitre.net/httpdocs/'); in searchresults.php

angeldevil
04-30-2008, 10:29 AM
Now nothing happen :

http://www.giaitrituoitre.net/searchresults.php?domains=http%3A%2F%2Fwww.giaitri tuoitre.net&q=gold&sa=Go&sitesearch=&client=pub-0253864467006134&forid=1&ie=ISO-8859-1&oe=ISO-8859-1&cof=GALT%3A%239A2C06%3BGL%3A1%3BDIV%3A%2333FFFF%3B VLC%3AD03500%3BAH%3Acenter%3BBGC%3A99CCFF%3BLBGC%3 ACCE5F9%3BALC%3A440066%3BLC%3A440066%3BT%3A336699% 3BGFNT%3A223472%3BGIMP%3A223472%3BFORID%3A1%3B&hl=en

davidw
04-30-2008, 11:00 AM
On your first error - that is something not typical of this modification. You might find that kind of error using google custom search - or - using a domain other than your own or a cof/galt code that won't work correctly (entered in the admincp options).

Try entering the generic code

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;FO RID:11

and see if this works - if it does, you can tweak these 6 digit hex values to your liking.

Also, make sure your path is correct in the admincp as well.

rix
05-08-2008, 05:05 PM
just need to inform that google adsense search has changed and there's no GALT code anymore..

davidw
05-08-2008, 06:37 PM
Ok, let me look into this - I am in the middle of rewriting this anyway for 3.7.

davidw
05-27-2008, 10:53 AM
Updated and now there is a new version for 3.7 based on this change.