Forum Moderators: martinibuster
Q. Can I pre-fill the search box?
At this time, we do not provide the option of having a search box pre-filled with a search term.
Q. Can I modify the search box to use fewer characters and split it over three lines, such as to place it in a narrow margin?
In regard to modifying your code, we do allow limited customization of the WebSearch code. To help integrate the WebSearch box into your site, you may modify the length of the text box component. For example, to modify the length to 15 characters, edit your code as below:<INPUT TYPE=text name=q size=15 maxlength=255 value=''>
Additionally, you may display the Google logo, text box, and search button on separate lines by adding '<BR>' tags to your code:
<A HREF='http://www.google.com/'><br>
<IMG SRC='http://www.google.com/logos/Logo_25wht.gif' border=0 ALT='Google' align='absmiddle'></A><br> <INPUT TYPE=text name=q size=25
maxlength=255 value=''><br> <INPUT type=submit name=sa VALUE='Search'><br>You may modify the AdSense search code in this manner on your sites only.
Please remember that the AdSense search code must be pasted directly into the page source of the pages on which the search box appears, and should not be modified in any way not described above.
Q. What are these "fees"?
The WebSearch fees that are referenced in the AdSense Terms and Conditions will not be applied to all publishers. Google incurs a cost for each search that is performed through WebSearch, and generally we cover this cost through our portion of the earnings from advertiser clicks. However, publishers with very high numbers of searches in relation to their revenue may have an amount deducted from their final WebSearch earnings. We expect the number of publishers to be impacted by this to be very small.The WebSearch fees will never be greater than the publisher's WebSearch earnings, so no publisher will owe Google at the end of the month as a result of these fees. Earnings from AdSense for content clicks will not be affected. The adjustment will take place at the end of each month, when earnings are calculated.
So that's a relief. I can live with this, although allowing pre-filling with text in context with the page should be win-win for all. After all, only those publishers who don't mind losing a visitor will implement the search box.
(I don't know if that is a personal dispensation for me - "on your sites only" - I can't access someone else's site, surely. Will each publisher need to get a personal dispensation? - ASA?)
The changes that you've mentioned above are only allowed with written permission from Google, so yes - each publisher will need to write in personally.
These changes will allow you to modify the length of the text box, as well as add line breaks to the display, as the examples in anallawalla's post show... but please email the AdSense technical team to get written permission before modifying anything! They'll let you know exactly what changes are allowed on your site.
ASA.
I can live with this, although allowing pre-filling with text in context with the page should be win-win for all.
I'm too tired to check the Terms and Conditions or do any JavaScript testing, but I think it might be technically possible to have links, radio buttons or other web elements that when clicked populate the search form input box. That's not what I'd call pre-filled - it's suggesting searches that may be of interest to the user, then providing them a way to perform the searches without requiring them to type the characters. The user would still need to take action to 1. select the search to perform and 2. submit the form to perform the query. Just a thought.
[google.com...]
At this time, we do not provide the option of having a search box pre-filled with a search term.
First, according to the accessibility guidelines, the search box has to be pre-filled. Okay the WCAG WAI 1.0 is a set of recommendations, but it's a good set of recommendations and they are set out for a reason.
Secondly, what do you mean you don't provide the option?
<INPUT TYPE=text name=q size=25 maxlength=255 value=''>
People can type in whatever value they want, can't they?
I usually use
value="Enter query..." <rant>
Thirdly, why don't you put quote marks around all variables? You know they're supposed to be there so why write code like it's nineteen ninety-nine?
Fourthly, why do you use capitals? (Same applies).
People evidently find the transition from html to xhtml difficult enough, but you can at least write your html 4.01 in a way that would make it very easy to change to xhtml of whatever flavour in the future.
Whoever wrote that code looks like they last wrote a webpage before the turn of the century. (Except for the trailing slashes on the <br> tags which have no place in 4.01 - what was that, a token gesture towards xhtml?)
I don't tend to use xhtml, I usually use 4.01 transitional, but there's no excuse for this kind of sloppy looking markup, is there? Next time, please get someone to check the code, who actually knows how to write html.
Fifthly, please acquaint yourself with the WCAG WAI, because the lack of <label> amongst other things in your form is surprising to say the least. Or is it not your intention to make Google search forms accessible?
</rant>
First, according to the accessibility guidelines, the search box has to be pre-filled. Okay the WCAG WAI 1.0 is a set of recommendations,
[w3c.org...] - I can't find this particular guideline. It's not in the 2.0 draft either. As an aside, the W3C WAI site's Search link uses Google, but the default check is for the Web, not the site. None of the forms at W3C are pre-filled.
Personally, I'd rather that Google didn't have this limitation, but only from the viewpoint of making the form more relevant to the user.
I can understand the problem if everyone prefilled it with "mesothelioma attorney" or whatever is the most expensive keyword these days. But it would be easy to add wording to say that prefilling must be in context with the page on which it appears (and that no correspondence will be entered into on that point). :)
On the other hand changing the adsense code in order to add something that would make the ads open to a new page would be against the TOS.
Unfortunately, at this time we do not allow publishers to modify the
WebSearch code to link to searches as you have done at
[google.com...]
er I never changed any code, just the URL!
Please note that you may modify the WebSearch code only in this manner. We
do not allow publishers to make any other modifications to the WebSearch
code, including:
-changing the background color of the WebSearch box
-pre-populating the search field
-editing the value of the Search button
-altering the appearance of the WebSearch boxWe ask that you please make sure your WebSearch box contains only the
permitted modifications. Thank you for your cooperation.
I'm going to go back and have a look at what I can do with the code now. I can live with an unpopulated search field and if the search button must say "search" instead of "find" (which I prefer) I suppose I can live with that too.
I'm not happy that I can't change the background colour of the searchbox. Also there's no reference to the radio buttons, although I'm assuming if you can stack the other three elements, you must be able to stack those as well?
I don't know what this align="absmiddle" rubbish is... I don't see why I have to have that in the code.
They won't convince me to use CAPITALS either.
I see they got rid of that misplaced trailing slash in the <br> tag though.
Of concern: still no <label> tag!
On a completely different note, they also said:
Regarding your question about using **** for your alternate ad on pages
containing the WebSearch box, you are welcome to do so. Please keep in
mind that publishers may not use other Internet search services on sites
which contain the WebSearch box. However, publishers using the optional
SiteSearch feature may also use alternate site search products on the same
site.
So any page with WebSearch as well as AdSense can still feature contextual ad competitors as alternate ads to AdSense, if AdSense doesn't come up.
And competing site search products on the same site are okay, but competing internet search products are not.