vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Integration with vBulletin - Replace search with Google Custom Search (https://vborg.vbsupport.ru/showthread.php?t=229247)

SemperFideles 12-28-2010 08:31 PM

Quote:

Originally Posted by mikeinjersey (Post 2140290)
I dont have the mod installed, but I was thinking of just allowing Google results within the Search...and no results from my site. (to increase sponsored links possibilities)

Is it possible like that ? (i'm guessing the options just need to be set correctly in the Google Adsense area)

You're not going to increase sponsored links possibilities that way. You can set up custom search to search google.com but that would defeat the purpose of having a site search. You can focus sponsored links when you set up custom search by adding certain keywords in the Site Search setup at Adsense for Search.

vbcreator 01-03-2011 10:28 AM

thanks , gonna test it

ThisIrksMe 01-04-2011 09:08 PM

I got the script you posted installed in my navbar template. I still get a white screen. Thanks for your help sir. SGT Larson US Army, USMC Vet

just77me 01-04-2011 10:26 PM

added a empty google.php file to the forum when searching something getting a white page withour the google.php it works but opens without forum on a new page - any ideas pleasE?

Winter Sonata 01-17-2011 12:30 AM

What is the problem might me when I got this error

Quote:

Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/lass/public_html/langatr/google.php on line 29

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

?

BaanFarsang 01-18-2011 05:16 AM

1 Attachment(s)
I tried to solve problems in vb4.1.1 following by step:

- Find in the navbar template for this code:

Code:

<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
  <vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
  <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
  <input type="hidden" name="do" value="process" />
  <span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
  <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
  </form>

Replace with:

Code:

<form action="http://www.yoursite.com/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="xxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxx" />
    <input type="hidden" name="cof" value="FORID:9" />
    <input type="hidden" name="ie" value="utf-8" />
            <span class="textboxcontainer"><span><input type="text" value="" name="q" class="textbox" /></span></span>
            <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
                </form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=th"></script>

* http://www.yoursite.com/google.php=Replace with your site
* xxxxxxxxxxxxxxxxxxxxx:xxxxxxxxxxx=your Google AdSense Publisher ID

Demo: http://www.baanfarsang.com

Gn_Snake 02-01-2011 07:08 PM

Not Work with vb 4.1.1 ??

SemperFideles 02-01-2011 11:23 PM

Quote:

Originally Posted by Gn_Snake (Post 2157470)
Not Work with vb 4.1.1 ??

Works just fine. All this does is replace a form in the Navbar. The only thing that will change in major versions hereafter is the template for a page but that will be a while.

Gn_Snake 02-02-2011 10:59 AM

If I put a word in the search field gives me a blank page.
Why?

Thx

scottct1 02-03-2011 01:16 PM

Works great... now only if I could figure how to add some skyscraper ads on the left hand side it would be PERFECT!


All times are GMT. The time now is 01:53 PM.

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.01315 seconds
  • Memory Usage 1,745KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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