MyBB Community Forums

Full Version: Install Google Search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Users are complaining about the basic search engine. I have created a custom search from CSE Google -


<script>
  (function() {
    var cx = '007038648298853744575:1rur5psgcxm';
    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:search></gcse:search>

can anyone advise on where to insert it?

Thanks in advance.
It's simple, you can add the script function in footer and add the
<gscr:search></gsce:search>
where ever you want it to appear(header is a good place).
Does the script need to be in its own div?
(2016-11-30, 03:53 PM)Roger R Wrote: [ -> ]Does the script need to be in its own div?

It depends on how you like the style. The div will allow you to add your own CSS to just that selector, or at least make it easier.