The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Replace search with Google Custom Search Details »» | |||||||||||||||||||||||||||||
Replace search with Google Custom Search
Developer Last Online: Dec 2018
This mod assumes you have an adsense account and are using Google Custom Search.
You want to make sure your results page is named something other than the vb default search.php, this leaves the vb option open to those who click "advanced search" Open your template navbar find PHP Code:
replace with the form line of the google supplied code example: PHP Code:
find PHP Code:
replace with the first 3 hidden input types in your google code example: PHP Code:
find PHP Code:
replace with PHP Code:
find PHP Code:
replace with PHP Code:
find PHP Code:
add this after PHP Code:
Screenshots
Show Your Support
|
Comments |
#32
|
|||
|
|||
- What do I replace with value="FORID:10"?
- Also how can I create a vbulletin page for the results to show? |
#33
|
||||
|
||||
I'm stuck. I've followed all the instructions and created a site search page from my Adsense account. I get a blank page from my search results.
My google.php looks like this: PHP Code:
|
#34
|
||||
|
||||
I guess what I'm asking is if the google.php should have any other code within it? Should I just create a new file called google.php, paste the above code to it and then upload it or should there be some other code before and after it so it will display inline?
|
#35
|
|||
|
|||
Quote:
|
#36
|
|||
|
|||
The code for your search results page looks fine. I have to ask if it may have been a case of "give google 10 minutes to update"? If not, make certain your form is calling the proper file. If the form call is correct paste the important part of your form here and I will check it out.
|
#37
|
||||
|
||||
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
1. In your Adsense Setup page for your Custom Search
2. Create a file called google.php to upload to your forum root. Here are my contents PHP Code:
PHP Code:
PHP Code:
|
#38
|
|||
|
|||
Semper, thanks! When you comment "// ###### YOUR CUSTOM CODE GOES HERE #####"
Are you referring to the Search Results Code? And where exactly do we paste it? Or do we just paste everything into google.php without modifying anything? If I do that, I get a blank page. thanks! |
#39
|
||||
|
||||
No, you do not need to make any modifications to google.php. You can copy, paste, and save exactly as above. The only customization you need to make above is to Step 4. You can customize Step 3 by making the frame width for search higher but that's minor.
Regarding Step 4, when you go to Google Adsense in Step 1 to create your Custom Search (be sure to save that Custom Search), then you will be able to get the code you need from Google so your particular code is inserted where the XX's are in my example. If you're getting a blank page then either you have not created the Template (Step 3) or you have not modified the navbar template correctly (Step 4). You should be able to test google.php out just by visiting the page. You'll see that the page works even if there are no search results. Also, make sure to set the file permissions to 755 for google.php |
#40
|
|||
|
|||
Thank you SO MUCH Semper! It is indeed working now, with the default google.php you supplied, my mistake was trying to add the code in there. Again, thanks =)
|
#41
|
|||
|
|||
Thanks for posting this, it made it very easy to implement.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|