Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Google Adsense for Search plus Integration Details »»
vB Google Adsense for Search plus Integration
Version: 1.6, by davidw davidw is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Integration with vBulletin - Version: 3.8.1 Rating:
Released: 03-01-2009 Last Update: 04-08-2009 Installs: 118
Uses Plugins Template Edits
Additional Files Translations  
No support by the author.

This is no longer supported - however I will be working on a 4.0 compatible version of this.

This is the same version as 3.7 as I've had a few reports that it works just fine in 3.8. Plus, I have it running on 3.8 with no issues.

Step 1:
You may have to resetup your adsense. If you do, you will get a new pub ID - this one includes your previous pub and tacks on your GALT (which is set up when you resetup your adsense account). I used www.christianboards.org and www.google.com (so it would search my site and the web - you can choose only your site, or any location that is web-accessible for results)

Example: partner-pub-0123456789012345:lnucfbm5dtp

If your partner-pub ID does not look like the example, you will see an error.

Also, keep in mind, all sites you put into the box for the adsense (one per line) will be integrated into the search and the search results.

Step 2:
Edit your searchresults.php file.
Find:
Code:
chdir('/path/to/your/forums/');
Put your correct value.

Example: chdir('/var/www/vhosts/yoursite.com/forums/');

Step 3:
Upload this file your forum's root. An example of your forum's root is below.

Example: http://www.yoursite.com/forums/searchresults.php

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

Step 5:
Configure your Admincp options
Go to Admincp => vBullitin Options => vBulletin Options => Find vB Google Search (Adsense) then click [Edit Settings]
Edit your new Partner-pub ID (the one you just had reset up - see example in red above), Google box width, iframe widthfor your results (I use 800 in the screenshot, but you can change this based on your needs), and the full URL to your searchresults.php.

NOTE! If you do not enter these in, you will see errors.

Step 6: Optional
Edit 1 template:
Admincp => Styles & Templates => Style Manager => Edit Templates (on your style) => Search Templates => search_forums => under $navbar, add $google_siteadsearch

Step 7: Optional (for vBAdvanced 3.x only)
vBa CMPS => Default Settings => Main Options => Portal Output Global Variables

Add these variables:
template_hook
google_navadsearch
homeurl

=> Save

vBa CMPS => Edit Modules => Search Forums => Select Action => Copy Module

Main Options
Module Title Google Search site / Forums
Template To Include search_google

Module Wrapper Template Options
Form Code Replace default code with
Code:
<form action="http://www.yoursite.com/forums/searchresults.php" type="hidden" name="search" target="_blank">
Click Save
Edit locations where you want to set this active to.

Download Now

File Type: zip vb_google_search_1_6.zip (4.5 KB, 597 views)

Screenshots

File Type: jpg admincp.jpg (51.0 KB, 0 views)
File Type: gif cmps.gif (4.8 KB, 0 views)
File Type: gif navbar.gif (7.2 KB, 0 views)
File Type: jpg searchphp.jpg (35.0 KB, 0 views)
File Type: jpg searchresults.jpg (60.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
JohorBahru

Comments
  #12  
Old 03-24-2009, 07:19 AM
ecihanuysal ecihanuysal is offline
 
Join Date: Apr 2008
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed..

but when i tried to search some words which include special characters "?,?,ğ,Ğ,İ,?,?,ş,Ş,?,?", i had an error without reason description.

Can you solve it please
Reply With Quote
  #13  
Old 03-30-2009, 11:09 AM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is something I'll have to investigate. I just got back. Give me a little bit. I believe it has to do with ISO encoding but let me see.
Reply With Quote
  #14  
Old 03-30-2009, 12:51 PM
Jasem's Avatar
Jasem Jasem is offline
 
Join Date: Feb 2006
Location: www.menokia.com
Posts: 594
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Good work, thank you!

Installed
Reply With Quote
  #15  
Old 03-30-2009, 05:56 PM
karel1985 karel1985 is offline
 
Join Date: Mar 2007
Location: Belgium
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Step 7: Optional (for vBAdvanced 3.x only)
vBa CMPS => Default Settings => Main Options => Portal Output Global Variables

Add these variables:
template_hook
google_navadsearch
homeurl

=> Save

vBa CMPS => Edit Modules => Search Forums => Select Action => Copy Module

Main Options
Module Title Google Search site / Forums
Template To Include search_google

Module Wrapper Template Options
Form Code Replace default code with
Code:

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

Click Save
Is it possible to change the width of the search box? Its strech my column out...
Reply With Quote
  #16  
Old 03-30-2009, 07:40 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your admincp options should give you that ability.
Reply With Quote
  #17  
Old 03-31-2009, 05:37 AM
universosymbian's Avatar
universosymbian universosymbian is offline
 
Join Date: Jan 2009
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have an error in the logs


Quote:
[Tue Mar 31 04:01:36 2009] [error] [client 66.249.66.40] PHP Warning: chdir() [<a href='function.chdir'>function.chdir</a>]: SAFE MODE Restriction in effect. The script whose uid is 10001 is not allowed to access /var/www/vhosts/universosymbian.org owned by uid 0 in /var/www/vhosts/universosymbian.org/httpdocs/searchresults.php on line 8

how can I fix this error?
Reply With Quote
  #18  
Old 03-31-2009, 10:39 AM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may not be able to fix that error, however, your host can. I would forward that error to your host and they can make a change on the server to accommodate this script or fix a possible issue (misconfiguration if safe mode is correctly set) as it appears you have safe mode on.
Reply With Quote
  #19  
Old 04-08-2009, 11:29 PM
thetgc thetgc is offline
 
Join Date: Apr 2009
Location: Middlesbrough
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I there

I did everything as said in the intructions apart from step 6 and i get a page with the following:

Code:
Bad Request
Your client has issued a malformed or illegal request.
What could be the problem?

Thanks

EDIT: Doesnt matter... fixed it...

You should put more info in the Google Pub ID in the AdminCP... It says to put this:
Code:
(you must start it with pub- and then your number)
but really it should say this
Code:
(you must start it with partner-pub- and then your number)
Reply With Quote
  #20  
Old 04-08-2009, 11:46 PM
davidw's Avatar
davidw davidw is offline
 
Join Date: Jul 2005
Location: Arkansas
Posts: 2,815
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought I had fixed that - but anyways, I've uploaded the correct one. I fixed the rest of it previously.

1.7's version will contain Google anywhere - which is a handy feature.
Reply With Quote
  #21  
Old 04-09-2009, 01:16 AM
aryshi's Avatar
aryshi aryshi is offline
 
Join Date: Sep 2005
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice job davidw

i have somthing that when i search with other language like arabic its give no result , is theresomthing that i need to do ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:47 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07888 seconds
  • Memory Usage 2,349KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete