开发者

Google Site Search - How do I get rid of branding?

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 si开发者_如何学Pythonte and when they go to page 2, they should see it in the same place as page 1.

Any ideas?

Thanks


If you are a paying customer go to:

  • Look and Feel
  • Customize tab
  • Google Branding

Check disable google branding and save.


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


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


Add the following code to your CSS:

input.gsc-input {
    background: none !important;
}

This works for everyone, not just paid customers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜