Replace Default Search With Google Custom Search (Adsense)

TheBigK

Well-known member
I've searched the forum but haven't been able to find an answer. What I'm trying to do is replace the quick search that appears in the navbar with Google search. I'm unable to find which template to edit and what changes should I make so that the search results are displayed on XF page.

Can someone help?
 
Reckons Team Google Custom Search can be used, if you made these litle 3 changes:

1. In Xenforo ACP, open the Template: rtGCS_search_google_results
... and replace all in it with this code:

HTML:
    <li id="google_results">
        <script>
              (function() {
                var cx = 'XXX';
                var gcse = document.createElement('script');
                gcse.type = 'text/javascript';
                gcse.async = true;
                gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(gcse, s);
              })();
        </script>
        <gcse:searchresults-only></gcse:searchresults-only>
    </li>
2. Replace the XXX (line 4) with your Google Custom Search Engine ID, but leave the ' ' at there place at beginnig and at the end of the ID.


3. Now you go to: https://cse.google.com/cse/search and change under "Design" from "Overlay to "Results only":
1513796680126.webp


Thats all, and the Add-on works like bevor Dezember 2017.


Vor me, with a Xenforo 1.5.15 it works as just bevor - so enjoy to made it also working again. :)
 
Top Bottom