![]() |
Replace search with Google Custom Search
1 Attachment(s)
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:
|
Can a mod move this to vb 4 forums please
|
Thanks, installed.
|
wanted for 3.7 !
|
Thanks,
|
|
Reserved.
|
Reserved.
|
Hello I have installed but when I give him a look I get this error.
I have made everything as you said. Thank you. HTML Code:
Not Found |
Read the instructions again. Some of the "replace" codes are examples and not to be taken literal.
|
According thank you very much I will look again.
Greetings. |
Hello again, my forum have 2
HTML Code:
</form> HTML Code:
</form><script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"> HTML Code:
<div class="above_body"> |
Place the <script> line only after the first </form>.
Your second closing form tag is for <form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices"> |
Hello, thank you very much for your help but is not happening does not.
I'm sorry if I trouble you with my questions. But this code is a bit complicated. I'm really sorry. Still thank you very much for your help you are very kind. I will leave that always fails. I do not understand what happens but anyway thank you very much indeed. Greetings. |
Is your result page titled google.php or did you give it another name? Again, my use of google.php was an EXAMPLE, you should use the name of the page that YOU created for google search.
|
From the Google page I have not downloaded anything, just the robot.txt and ID code
|
This is meant for people that use google adsense for search, if you have not completed the steps specified by Google this will not work for you.
|
Thank you very much sir, I will complete the registration to see if they give me some code to complete.
Thank you very much and apologize for the inconvenience. Greetings. |
Can post your google.php file?
|
Quote:
|
thanx man
|
Quote:
|
Your quote answered your question
Quote:
|
But where is the google supplied code ?
i dont see it . Help me, pls . |
Quote:
|
Thanks a lot, it works great although the google watermark isn't showing on mine like it is on yours (yes i did select the right option when setting it up in google) no problem though it still opens up to my custom search page when you do a search
|
Quote:
Quote:
|
Quote:
Disguise you adds as much as possible so they look like your site so your tricking people into clicking on them thinking it's part of your site, i think the same goes for this mod their more likely to use it if they think it's an internal search engine, it practically is if you set it up through adsense to search you site only... Now all need is the mod to add adsense to the postbit for vb4 |
As long as you are aware thast you could lose your adsense account as well as all earnings.
|
Would it be possible to have this AS WELL as the vB Search?
|
- What do I replace with value="FORID:10"?
- Also how can I create a vbulletin page for the results to show? |
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:
|
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?
|
Quote:
|
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.
|
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:
|
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! |
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 |
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 =)
|
Quote:
|
All times are GMT. The time now is 04:54 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|