Forum Moderators: martinibuster

Message Too Old, No Replies

WebSearch color/display customization

...without modifying the html code

         

JordanAutomations

9:25 pm on Jun 19, 2004 (gmt 0)

10+ Year Member



Seems that according to the google websearch TOS we can't modify their html code. I assume that over time they will either relax on this, or set up tools to further customize colors and stuff.

Until this happens, I'm not going to modify the code. Some have mentioned that on a white text / black page, the search doesn't look right. (The img aliasing is wrong, and the color choices look funny). I whacked out a stylesheat that mostly fixes these problems. IOW, this html, when placed before the unmodified google code, changes the way the browser displys the google code.

Other's have probably done this, but I though I'd share what I did to save some the trouble. Here's the code. you'lll probably want to copy this to a copletely blank page, since I made some assumptions in this demo that could cause trouble with some exhisting layouts. (nothing that can't be fixed relatively easy though, but it's make the demo harder to follow)

### START ###
<body>
<style>
body{ background-color: #000000}
h1{color: #aabbcc}
h3{color: #aabbcc; padding: 5px; padding-bottom: -50px;}
div table{ background-color: #000000; color: #aabbcc;}
div table input{ background-color: #dddddd; }
div table font { display:none }
</style>

<h1>WebSearch Color Demo!</h1>
<div class="websearch">

<h3>Search This Site!</h3>

<!-- SiteSearch Google -->
your untouchable google code is in here
<!-- SiteSearch Google -->
</div>

<script>document.images[0].src="http://www.google.com/logos/Logo_25blk.gif";</script>
</body>
### END ###

This makes a black page, some light collored headers, and then the google websearch. then a single-line js call makes the google image switch to the black code. ( IE6/MZ compatible). you'll also notice that I hid the choice to search the site or internet via a display:none in the stylesheet.

Comments?
-pj

[edited by: JordanAutomations at 9:39 pm (utc) on June 19, 2004]

JordanAutomations

9:37 pm on Jun 19, 2004 (gmt 0)

10+ Year Member



If you want google's image and link to itself to go away, then change the

div table font { display:none }
to
div table font,a,img { display:none }

you really only need to make the add the a to the hide list, since the img is nested inside the anchor tag, but I tend to like the removing them both better.

-pj

added clarification

jomaxx

9:49 pm on Jun 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No question someone will try a stunt like using CSS to suppress the Google logo and get kicked out. I'm looking forward to a long and entertaining and flame-filled thread about the precise meaning of the phrase "without modification".

JordanAutomations

10:10 pm on Jun 19, 2004 (gmt 0)

10+ Year Member



I personally think "without modification" meaning whatevery google want's it to mean, within reason. Seems like the TOS is vague enough that if they want to terminate you, they'd be able to find a way to.

Therefore, my policy is to not do "stipid things", to put it bluntly. I think removing the logo would qualify as that. However, I'd do it in a spare account on a site I'm not concerned about using adsense on. I just wouldn't be surprised if it was kicked.

On the other hand, I think inverting the colors on a dark-based is a safe thing, since it makes the google bar fit in the way it was designed to, and not be an eye-sore.

And the advantage of doing it CSS-based is that a searcher script won't find it. It wold take human checking. And I personally think human checking is going to boot the logo-hider, and allow the color changer.

Anyway, the worst they'll do to you is kick you out. Its classic risk managemnt. I'm certainly not going to do it on all my sites. But I might on some.

-pj