tags:

views:

261

answers:

2

I've paid for Google Site Search for my site and despite it saying that you don't need to have branding, it puts a "Google Custom Search" watermark on the textbox. I don't want this to be displayed but it seems it is added by javascript by Google's API.

Any idea of how to remove this?

The code I'm using looks like this

It uses the Google

<div id="cse-search-form" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
  google.load('search', '1', {"nocss" : true});
  google.setOnLoadCallback(function(){
    var customSearchControl = new google.search.CustomSearchControl('XXXXXXXXXXXXXXX:xxxxxxxxxx');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    var options = new google.search.DrawOptions();
    options.setSearchFormRoot('cse-search-form');
    customSearchControl.draw('cse', options);
  }, true);
</script>
<link rel="stylesheet" href="search.css" type="text/css" />

I'm using the "Search element. Provides the most layout and customization options." option from the Look and Feel section.

Also, how come I only get 1 page of results and then a link to get more from Google? I want to keep people on my site and when they go to page 2, they should see it in the same place as page 1.

Any ideas?

Thanks

A: 

If you're a GSS customer, you can remove the Google branding from your CSBE either by using XML or by making the following change to your code if you're using the iframe:

from

<input type="hidden" name="cof" value="<<OLD VALUE>>" />

to

<input type="hidden" name="cof" value="<<OLD VALUE>>;NB:1" />

Make sure you've selected one of the non-Javascript branding options in the Look and feel section of your control panel.

If you're using the overlay display option, after getting the code for the results page, try these steps:

  1. Remove the first script tag. It should be on the sixth line of the code snippet after the form element.
  2. Inside the style tag (it should be on line 15 or 16 of the code snippet below the div for the results), insert the following rule:

    .gsc-branding-text, .gsc-branding-img { display: none; height: 0; }

Source

Shoban
Thanks, yeah I'd read that page already and it seems a bit dated as there is no Overlay optionThe options in the Look and Feel section are"Search element""Iframe""Google-hosted page"I have chosen "Search Element"See above (in original question) for code being used....The form is being dynamically populated by Google's AJAX API.
Graeme
A: 

Ok, finally managed to get it working - ended up going for the iframe solution. Could remove branding like the post above said.

Graeme