vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Add-On Releases - vB Google Adsense for Search plus Integration (https://vborg.vbsupport.ru/showthread.php?t=155199)

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

Quote:

Originally Posted by davidw (Post 1379945)
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:

Quote:

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

Quote:

Originally Posted by davidw (Post 1379961)
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

Quote:

Originally Posted by davidw (Post 1379964)
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:
Code:

<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

Quote:

Originally Posted by tom209 (Post 1384874)
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
Code:

<!-- 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
Code:

<!-- 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).
Code:

<!-- 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

Quote:

Originally Posted by davidw (Post 1430045)
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

Quote:

Originally Posted by chevy01xtreme (Post 1430190)
also how do i get this box to match teh size of the rest of teh column

https://vborg.vbsupport.ru/showpost....&postcount=127

chevy01xtreme 01-27-2008 08:59 PM

Quote:

Originally Posted by davidw (Post 1430327)
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

Quote:

Originally Posted by davidw (Post 1430354)
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

Quote:

Originally Posted by davidw (Post 1430045)
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

Quote:

Originally Posted by MrEyes (Post 1452002)
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]

Quote:

Originally Posted by MrEyes (Post 1452002)
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

Quote:

Originally Posted by MrEyes (Post 1452002)
If I open the searchresults.php page, this opens correctly but obviously doesn't include any search results

Just 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.

Quote:

Originally Posted by MrEyes (Post 1452002)
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:

Code:

<!-- 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
Code:

<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

Quote:

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:

Quote:

<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 and manually added the google search code to the template. So it now works, ish (see * below)

Quote:

This will display once you add the variable $google_siteadsearch
That works a treat, ish (see * below)

Quote:

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

Quote:

Originally Posted by Bloom21 (Post 1453191)
um my post was about the NAV bar

This works both places

MrEyes 03-03-2008 08:54 AM

Quote:

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 :)


All times are GMT. The time now is 09:35 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01575 seconds
  • Memory Usage 1,951KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete