Google Search

GK User
Tue Apr 02, 2013 4:40 pm
Hello guys,

I am wondering to know how to implement the google personalized search inside my Boutique template since the code is a script:

Code: Select all
<script>
  (function() {
    var cx = '005626605444055210219:gceezfsc-i0';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:searchbox></gcse:searchbox>


How to create a module with this code ?

Thanks
User avatar
Expert Boarder

GK User
Tue Apr 02, 2013 6:51 pm
Hi, on JED you will few "custom code" or "blank module" modules, which can be used to insert such a code.

Little help: http://extensions.joomla.org/extensions ... in-modules
User avatar
Platinum Boarder

GK User
Wed Apr 03, 2013 9:17 am
Hello, thanks for your reply. I know about JED, I already tried JIncludes & Flexi Custom Code with same result: no google search box published. The position of the module is correct (if I write something inside it show up perfectly). But the google code (so the google personalized box search) does not appear. Maybe I have to setup someting else ... but what ?
User avatar
Expert Boarder

GK User
Wed Apr 03, 2013 3:25 pm
Hi,
hmm... maybe it's stupid question, but why do you need google search in your joomla?
Joomla have OpenSearch feature in search module or others nice collections of search extensions.

....or is something wrong with source code?
try to insert it in simple test.php file and check if it works, without any cms.
User avatar
Platinum Boarder


cron