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)

fta2k 01-08-2010 06:05 PM

Havin a problem implementing this on both skins for some reason it works on one skin and then a blank page shows for the other . Any suggestions ?

SemperFideles 01-08-2010 06:40 PM

Did you install the template for both skins?

fta2k 01-08-2010 06:43 PM

yes template is installed on both skins

brandon515 01-08-2010 11:02 PM

Does anyone know if this will work on private forums where only registered members can view posts?

Also, can google custom search, search the content of attachments (like pdf or word docs)?

Thanks,
Brandon

SemperFideles 01-09-2010 12:21 AM

Quote:

Originally Posted by brandon515 (Post 1950749)
Does anyone know if this will work on private forums where only registered members can view posts?

Also, can google custom search, search the content of attachments (like pdf or word docs)?

Thanks,
Brandon

It most certainly will NOT work on private forums. Google Search results are based upon the Google spiders crawling your forum. Because Google cannot "see" your private forums, Google search results will not display results of any hidden forums.

fta2k 01-09-2010 06:17 PM

Have installed and running greeat on all skins now .. But what i did notice now is my advanced search does not work here are the errors im receiving ..

Fatal error: Call to undefined method vB_Search_Criteria::get_naturalmode() in /home/*****/www/www/packages/vbdbsearch/coresearchcontroller.php on line 382

Fatal error: Call to undefined method vB_Search_Criteria::get_naturalmode() in /home/*****/www/www/packages/vbdbsearch/coresearchcontroller.php on line 121

any help would be appreciated thanks.

brandon515 01-09-2010 09:07 PM

Thanks for the reply.

Can google custom search, search the content of attachments (like pdf or word docs)?

Brandon

SemperFideles 01-09-2010 09:23 PM

Quote:

Originally Posted by brandon515 (Post 1951473)
Thanks for the reply.

Can google custom search, search the content of attachments (like pdf or word docs)?

Brandon

Brandon,

I you want to see what Google is/isn't indexing on your site you can go to Google.com and type this:

PHP Code:

searchterm site:forumdomain.com 

Where searchterm is the term you want to search for and forumdomain.com is your forum domain. Google site search is nothing more than limiting a Google search to your domain.

Google does index inside of .doc and .pdf attachments but I've never tried searching my own domain for content inside pdf and doc files. I do know, however, that I've searched for certain things on Google before and .doc files were in the search results.

Chainspell 01-13-2010 10:43 AM

thanks for that thats wat i was looking for

Verionia 01-13-2010 07:11 PM

How can I remove advanced search?

Verionia 01-14-2010 03:01 AM

nvm - I got it!!

barbaras 01-18-2010 02:46 PM

Nevermind.. Helps if ya read.

M4r5h4ll 01-20-2010 10:11 AM

i keep on getting this error "Your client has issued a malformed or illegal request. "

& also the google.php logs me out from my forum donno why :x

Spika 02-22-2010 01:40 PM

Quote:

Originally Posted by SemperFideles (Post 1944185)
Here is the process I used to create a custom search results page. You can see the search in operation at http://www.puritanboard.com

Thank you very much! your custom search works fine!

goddess_dix 02-22-2010 03:27 PM

Quote:

Originally Posted by SemperFideles (Post 1944185)
Here is the process I used to create a custom search results page. You can see the search in operation at http://www.puritanboard.com

Thanks for laying out your process so clearly (and to the original author of the thread for the edit list). This helped me a great deal in getting mine to work.
:)

Jabong82 02-23-2010 09:18 PM

Does this work for 4.0.2? I don't have those exact fields to be edited in the original posters template edits.

I can get the google watermark to show up in the search box, but when I do a search it just leads to a blank screen.

Any help would be appreciated.

nitra1000 02-24-2010 06:29 PM

Yes it does... it's working on my forum. Have you made the google.php?

@op, I've noticed the stylevars need adjusting for it to display properly on blogs, and also the search button is missing in IE7.

I'm having a play at the moment, but if you've fixed it could you update us :)

Jabong82 02-26-2010 06:52 AM

How do you create the PHP page? I am able to embed the google logo in the search bar, but every time I pull up the google.php page I made I get a blank screen.

When I set the Navbar template edit from mydomain.com/google.php to mydomain.com/search.php it to the normal search.php its fine, but when I try to link it to the google.php page I created I just get a blank screen. How do you create the google.php? Like I said I can get the google logo in the search box fine, I just can't get the search to work.

I copied and pasted Semper's example google.php and that didn't work for me. I also tried to create a google.php with just the code google gave me. They both don't work. How do you create the google.php file?

Any help would be appreciated.


Edit: Nevermind Got it. Nice mod :)

Scan Cape Cod 03-13-2010 03:49 PM

Installed with many props to SemperFideles for his step by step guide. Works superbly. Nice hack, and greatly appreciated. Thanks! Installed, nominated, etc.

messi93 03-27-2010 06:16 PM

Hi , I install the mod and its Ok , but when i going to use it. it say " Bad Request
Your client has issued a malformed or illegal request.

Can you help me please?

hydn 04-06-2010 02:31 PM

Quote:

Originally Posted by messi93 (Post 2011191)
Hi , I install the mod and its Ok , but when i going to use it. it say " Bad Request
Your client has issued a malformed or illegal request.

Can you help me please?

Same here. Bump

hydn 04-06-2010 02:55 PM

Quote:

Originally Posted by messi93 (Post 2011191)
Hi , I install the mod and its Ok , but when i going to use it. it say " Bad Request
Your client has issued a malformed or illegal request.

Can you help me please?


I figured it out. You need to add the extra code after your pub#.

This:
Code:

partner-pub-###############
should be this:
Code:

partner-pub-###############:######-####
Marked as installed. Thanks

guvner 04-10-2010 01:12 AM

I've been registered for adsense for search for years, but when I try and create a new custom search form over at https://www.google.com/adsense I keep getting javascript errors on the final page where you save your form and get the code.

I've tried IE, FF & Chrome and they all stall at the last hurdle so I don't know what's going on there.

I almost have this working but cannot find anything to do with the extra code mentioned above - my partner-pub number is a plain 16 digit string with no colon and no extension after it.

Maybe they've changed something so I'll have to try again in a couple of days - hopefully I can finish the process then. :rolleyes:

Winter Sonata 04-10-2010 12:20 PM

Thank you


where shoud I put my adsense code in this code
Code:

<form action="http://www.ahfb2000.com/google.php" id="cse-search-box">
please replace the right place with '' your adsense code''

Winter Sonata 04-15-2010 01:00 AM

please anyone could explain this to me ?

Jabong82 04-16-2010 06:32 AM

Quote:

Originally Posted by Winter Sonata (Post 2018896)
Thank you


where shoud I put my adsense code in this code
Code:

<form action="http://www.ahfb2000.com/google.php" id="cse-search-box">
please replace the right place with '' your adsense code''

You don't place your adsense code anywhere in this snippet. This piece of code that you quoted is basically just the URL to where the "google.php" file is.

So for example, if your website URL is http://www.vbulletin.com

The code would be:

<form action="http://www.vbulletin.com/google.php" id="cse-search-box">

You don't place your "adsense code" in that code you quoted.

baghdad4ever 04-17-2010 04:45 PM

thanks

Winter Sonata 04-18-2010 01:47 PM

I got this error when trying to install as SemperFideles suggest

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

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

kmohamed 04-20-2010 12:14 AM

great job guys

jacobskinner811 04-22-2010 03:15 AM

I cant get this to work with 4.0.3 any help?

J6488EEA8E90 04-24-2010 01:33 AM

looks promising, will check it out

guvner 04-25-2010 08:57 PM

Well I finally got around the JS errors over at Google - no idea why I appeared to be the only one affected. :confused:

Anhow I now have it set up and I'd like to thank Dave-ahfb for the mod and also SemperFideles for making it a little easier to understand. :up:

For my set up I wanted my registered users to be able to use the VB search plus the advanced search but I wanted to restrict guests to the Google site search only - I figure every little bit helps when it comes to reducing server load. :cool:

For anyone who would like the same configuration, once you have your Google site search working properly, here's the template conditional I used in my navbar:

find:
Code:

                <form action="search.php?do=process" method="post" id="navbar_search" class="navbar_search">
                        <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
                        <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.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
                </form>
                <ul class="navbar_advanced_search">
                        <li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>


replace it with:

Code:

<!-- Start Conditional Google Search Box -->
       
<vb:if condition="is_member_of($bbuserinfo, 1,3,4,22,49)">

<form action="http://www.YOUR/URL/TO/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="partner-pub-XXXXXXXXXXXXXXXX:XXXXXXXXXXX" />
    <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>
                <ul class="navbar_advanced_search">
                        <li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>

<vb:else />

<form action="search.php?do=process" method="post" id="navbar_search" class="navbar_search">
                        <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
                        <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.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
</form>
                <ul class="navbar_advanced_search">
                        <li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>


</vb:if>
                       
<!-- End Conditional Google Search Box -->


making sure you change the red text above to suit your system.

Finally go to your usergroup manager and disable search for the usergroups you have listed in the conditional above and you're done.

Mike :)

wampforum 05-01-2010 09:04 AM

this just wont work for me - I have tried this 6 times checking and re-checking everything but still get a blank page on results.
On the adsense page it gives me a search results code and informs me to paste onto google.php but you say not to do this and to copy google.php exactly as you have it - Im confused

baghdad4ever 05-01-2010 10:57 AM

it is work on 4.0.3

cloferba 05-05-2010 01:12 AM

first step of navbar editing is wrong

the first line it says user must find it is very different from the line on this post

=(

Winter Sonata 05-05-2010 09:45 AM

wampforum,

make sure to capitlaize the name of the temple like that ' GOOGLE'

Taurus MFF 05-10-2010 03:04 PM

works great, thanks Dave, installed on our test site for future deployment

and special thanks to SemperFi for the extended explanations! :up:

wampforum 05-12-2010 09:18 AM

ah done it - not sure what I did worng but its working now.
Does anyone happen to know if theres a way to move the text of the serach results into the centre more? I have a dark style that uses a whote box which results are displayed within but the text starts touching the border and I would like a little gap between the border and the text

cloferba 05-27-2010 12:43 AM

guys...you have tried this on 4.0.3?

Veer 05-29-2010 05:41 PM

Please update for vb 4.0.3


All times are GMT. The time now is 06:35 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.01758 seconds
  • Memory Usage 1,843KB
  • 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
  • (1)bbcode_php_printable
  • (7)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