PDA

View Full Version : Alternate Style = Change Google Style ...



TRshady
02-08-2004, 09:46 AM
Hey all, Im making a new design which uses just css (Its current progress (http://www.rileysresource.net/newindex.php)) but have came over a problem I'm not to sure about. As there are two different styles, how would I go about having different colours for the google ads?

For example, when changing to 'sewage' ... how can I also make the google ad script change from blue/orange to the matching green and red colours?

Anyone know of a way?

Thanks

h1
02-08-2004, 11:44 PM
Your links are all broken, Tony. :D

And I don't think you can, the ad showing script is on Google's site.

I.am
02-09-2004, 12:15 AM
Well I doubt it as well. You can always customize those ad's in adsense but customizing your way is quite not possible. What kind of code does google adsense gives you?

TRshady
02-09-2004, 12:41 AM
The site links aren't set up yet which explains why there broken, but lemme explain the problem a bit better. The javascript code for adding adverts to your site include this:


google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "FF6600";
google_color_url = "0000FF";
google_color_text = "333333";


So I was thinking of a way of having two codes in two different .txt files which have different colours set, and some sort of if/else php script that if the 'default' style sheet is being used, then load ad1.txt which has the code set up to match the colours. So if the 'sewage' stylesheet is being used, then the php scripts includes ad2.txt and then colours all match up.

So I would need the stylesheet name to be set as a variable and then compared, which I'm sure would work ..... hopefully this makes things a bit clearer. :)

I.am
02-09-2004, 03:44 AM
I think you might be able to do it. If you set those colors to different variables and the variables get the values from a css file. When you change the skin a different css is called. It should be doable.

h1
02-09-2004, 05:58 AM
You could also just change the script variables and redraw the ad. :)