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-24-2010 07:34 PM

Quote:

Originally Posted by Inferno Dragon (Post 2138686)
I have added this modification on my members request and it's working fine however it's not displaying any search result..I always gets:



I tried many keywords but it's not working :S

my search site URL in google adsense is: www.pakgamers.com/forums
and search results page URL is: http://www.pakgamers.com/forums/google.php

Have you followed these steps: https://vborg.vbsupport.ru/showpost....5&postcount=36

Ensure you replace with your own URL and Google code....

steveneff 12-25-2010 05:48 AM

Quote:

Originally Posted by SemperFideles (Post 2103283)
For future reference, what is replaced in the navbar template is everything between the form tags. For vb 4.0.7, look 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.puritanboard.com/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="partner-pub-XXXXX:XXXX" />
    <input type="hidden" name="cof" value="FORID:9" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
            <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.png" name="sa" onclick="document.getElementById('navbar_search').submit;" />  </span></span>
        </form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>

Replace the partner-pub code with the code you get from setting up your custom search.

Top mod. Installed on 4.07 using this simple single edit.

I guess using this mod will cut down on database use from some of those unwanted spiders but will it have an effect on SEO with the main search engines?

BaanFarsang 12-25-2010 11:11 AM

Not compatible with vBulletin ™ Patch Level 2 Version 4.1.0, you write the method with this version?
I have just 16 digits's pub from google.

Inferno Dragon 12-25-2010 03:50 PM

Quote:

Originally Posted by SemperFideles (Post 2138732)
Have you followed these steps: https://vborg.vbsupport.ru/showpost....5&postcount=36

Ensure you replace with your own URL and Google code....

Hi,

Yes I did, that's why I said it's working fine but for some weird reasons it's not displaying the search results i-e for any keyword it just display "no results found etc)

EDIT: OK, it's working fine now, I changed the domain settings in the adsense and removed the "www." part.

greenchicken 12-28-2010 01:44 PM

Quote:

Originally Posted by SemperFideles (Post 2103283)
For future reference, what is replaced in the navbar template is everything between the form tags. For vb 4.0.7, look 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.puritanboard.com/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="partner-pub-XXXXX:XXXX" />
    <input type="hidden" name="cof" value="FORID:9" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
            <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.png" name="sa" onclick="document.getElementById('navbar_search').submit;" />  </span></span>
        </form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>

Replace the partner-pub code with the code you get from setting up your custom search.

This worked for me , thank you and thank you for your service.

SemperFideles 12-28-2010 01:57 PM

Quote:

Originally Posted by BaanFarsang (Post 2138878)
Not compatible with vBulletin ? Patch Level 2 Version 4.1.0, you write the method with this version?
I have just 16 digits's pub from google.

It's compatible with all versions of vBulletin 4.x. I have 4.1.0 PL2 installed and it is working fine. Fundamentally, there's really a form that's being changed inside the navbar template and, no matter how much the navbar changes with each release, the form code that controls the functioning of Google search really remains the same.

SemperFideles 12-28-2010 02:03 PM

Quote:

Originally Posted by steveneff (Post 2138823)
I guess using this mod will cut down on database use from some of those unwanted spiders but will it have an effect on SEO with the main search engines?

I don't see how it could affect SEO. It certainly does cut down on database use not only from spiders but from users. It also produces much more relevant search results.

mikeinjersey 12-28-2010 06:23 PM

can we make money with this....if so how ? Only if people click on the sponsored links ?

SemperFideles 12-28-2010 06:45 PM

Quote:

Originally Posted by mikeinjersey (Post 2140268)
can we make money with this....if so how ? Only if people click on the sponsored links ?

Yes, if people click on the sponsored links. It's really not a whole lot of money unless your site specializes in areas that have valuable keywords. Mine does not and I make a small amount of money from sponsored links but it's not the reason I installed the mod.

mikeinjersey 12-28-2010 07:20 PM

Quote:

Originally Posted by SemperFideles (Post 2140277)
Yes, if people click on the sponsored links. It's really not a whole lot of money unless your site specializes in areas that have valuable keywords. Mine does not and I make a small amount of money from sponsored links but it's not the reason I installed the mod.

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)


All times are GMT. The time now is 06:34 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.01505 seconds
  • Memory Usage 1,765KB
  • 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
  • (4)bbcode_code_printable
  • (8)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