I have google ads on my site and one of the themes are dark, while the others are light, so the white background on the ads doesn't really fit in.
How would I show different content, or different ads, within a block if the user has the darker theme?
The only way i can think of is if you some how manage to import the style.css to the code of the googlead layout, instead of it's own.
Cant say how this is done, but i think it's the soultion though.
with Google ads you are not restricted to just a white background, try different color combinations, see what will match in with all colors on your site.
Oh boy I sound like a google salesman :o
Hm, i think we got your secret out in the open Lesmond :2funny:
oh no G6 you found me out :-X
There must be a way to check if the user has a certain theme, then display google ad(dark), else display google ad(light).
Sure there is, but how many people can code that? That would require a database call to check the theme setting for the user, then display something dependant upon that. Its possible, but beyond most people around here including me. I could probably figure it out with some hard work, but I just don't have the time to do that for you right now sorry.
Sounds complicated :(
If i was you I would go with Lesmonds idea:
Quote from: Lesmond on January 03, 2007, 11:49:18 AM
with Google ads you are not restricted to just a white background, try different color combinations, see what will match in with all colors on your site.
Oh boy I sound like a google salesman :o
You could use a php block and include
global $user_info;
and then use $user_info['theme'] to determine which theme is being used. It's the number of the theme, with the forum default being 0. You may have to experiment a bit.
ah, see. I learned something new today. I need to take a look at that user info aray. :)