![]() |
Google Search Mod that Actually WORKS!
There is a mod on here that purports to do this, but it doesn't work.
I need a mod that places a Google Search on my site by: -Showing me where to place the Google Custom Search code that I received from Google. -Creates an entry either in the Navbar or space below the user login area. Thanks. |
I assume you already have a Google CSE account?
|
Take a look at my website, I have the google search working on there perfectly fine ....if that is what you are looking for I will help you out ...
https://www.cagclan.com/community/forum.php |
Quote:
|
Quote:
|
That's what I thought, but I never used it so I was not sure. :)
|
Quote:
|
I wonder if Nelson has one, if he don't, it of course will not show. :)
|
@nelson58, needs to spend a bit more time reading and asking more exacting questions. So far we are just messaging among ourselves. :)
|
Here is what to do to get this on your site my Man ....
Step 1: Create a new template and name it "GOOGLE", make sure it's in all CAPS ! in that template add the following: Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html"> Step 2: In your "headinclude" template add the following at the very end: Code:
<!-- google cse --> Code:
<div id="globalsearch" class="globalsearch"> Code:
<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search"> Code:
<gcse:searchbox-only></gcse:searchbox-only> Code:
<?php --------------- Added [DATE]1410998655[/DATE] at [TIME]1410998655[/TIME] --------------- Quote:
|
Quote:
|
Quote:
|
Quote:
--------------- Added [DATE]1411009881[/DATE] at [TIME]1411009881[/TIME] --------------- Quote:
Nelson |
The message was not directed to you, so I do not understand why you took it personally. I was replying to @Ozzy and @Cag Cheechdog. Sorry, you took offense, but whatever.
|
Quote:
Nothing is showing up on the page. I checked the Google code and it is correct. I entered my code exactly as from the Google site. I must be doing something wrong. Is there anything I should try? |
Quote:
https://vborg.vbsupport.ru/showthread.php?t=314370 https://vborg.vbsupport.ru/showthread.php?t=314268 --------------- Added 17 Sep 2014 at 21:13 --------------- Quote:
|
Ok, here is why it wasn't working...
If you have the modification Dbtech VBNavtabs installed, which I did, You need to go to the dbtech_vbnavtabs_navbar template and make the same changes you recommended in the navbar template or it will not work. In any event, thanks for helping me to get this to work CAG CheechDogg. Much obliged. I have one more question. The custom search results page is not showing up, instead the Google page shows up and the user has to hit "back" to get back to the site. Any idea why that is happening? |
Did you make all the changes in the code regarding your forums domain name and all? If you didn't do those changes that is why it goes to the google search page and not the custom one on your forums ...
|
Quote:
Nelson --------------- Added [DATE]1411042691[/DATE] at [TIME]1411042691[/TIME] --------------- GOOGLE template: Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html"> Code:
<div id="navbar" class="navbar"> Code:
<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" /> google.php file: Code:
<?php |
Replace your DBTech dbtech_vbnavtabs_navbar
with this: Code:
This part here you dont include the www in your url: Code:
<gcse:searchbox-only></gcse:searchbox-only> |
No joy. It still goes to Google page:
Navbar: Code:
<div id="navbar" class="navbar"> dbtech_vbnavtabs_navbar: Code:
<div id="navbar" class="navbar"> |
Hmm...weird...go back to the google.php file and lave the following like you see it below and dont put google where it says "test" .... I just tried this on a new style and it worked .... I don't see why it doesn't work on your site ...
define('THIS_SCRIPT', 'test'); define('CSRF_PROTECTION', true); --------------- Added [DATE]1411075097[/DATE] at [TIME]1411075097[/TIME] --------------- Quote:
--------------- Added [DATE]1411076426[/DATE] at [TIME]1411076426[/TIME] --------------- Ok I might of found the problem: In your headinclude make sure the code looks like this: Code:
<!-- google cse --> in yours you left out the "partner-pub" in your id .... |
When I put the "partner-pub" in, it doesn't work at all, the box doesn't even appear.
Code:
<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" /> |
Quote:
The newer ID's do not include partner-pub. I learned this after making my see more custom google search modification. |
Quote:
|
Could it be interference from the DBtech Navan mod somewhere? It is still going to the Google page.
If you are stumped, then I am certainly done. --------------- Added [DATE]1411272699[/DATE] at [TIME]1411272699[/TIME] --------------- Looks like we're stumped. |
OMG, everyone is stumped?
(Faints) |
I don't know what's your problem, but test at my site: http://www.vuive.info/diendan/misc.p...-8&do=googlecs
Type anything, or type "Tieu Bao" for a test. Google Custom Search work fine for me :-) |
Can I see your template and PHP code?
|
1 Attachment(s)
This is my plugin, install and paste your Google search ID in vB Options -> Message Searching Options, there is a setting for Google Custom Search.
Edit navbar template, edit <form> search to this: PHP Code:
Good luck :D |
Thanks, I tried, but no luck.
I think the DBTech Navtabs plugin is conflicting. |
Quote:
I contacted DBTech, and they said if you use their NAVtabs, you cannot place the custom Google search in the Navtab area, you need to place it elsewhere. |
All times are GMT. The time now is 04:18 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:
|