Adsense colors

Discussion in 'AdSense' started by gbh1935, Aug 16, 2005.

  1. #1
    Does anyone have any suggestions on how to deal with variable color schemes. I have a site where they can customize the color scheme and would like the adsense ads to change to maintain their color coordination. This would be simple to do if I could dynamically set the color codes in the adsense code, but of course last I read adsense says no to modifying their code.... Has anyone ever been successful in getting Google to bend on this rule?
     
    gbh1935, Aug 16, 2005 IP
  2. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think setting a color code is technically "modifying the adsense code". I use php to change the adsense color, but the code it ends up looking exactly the same as if I created it in on the adsense website. I use php to set the channel, font color, border etc.
     
    woodside, Aug 16, 2005 IP
  3. exaro

    exaro Peon

    Messages:
    615
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #3
    set the colors in the AS code as PHP variables but make them the same you use in your pages that change.
     
    exaro, Aug 16, 2005 IP
  4. kawebspy

    kawebspy Peon

    Messages:
    491
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you can actually make the color of Adsense Ads varies dynamically. There's no problem with that. Just assign the color values with the dynamic variables on your site script.
     
    kawebspy, Aug 16, 2005 IP
  5. exaro

    exaro Peon

    Messages:
    615
    Likes Received:
    39
    Best Answers:
    0
    Trophy Points:
    0
    #5


    Exactly. Suppose your code for the color changing site is...

    if($color == '1') {
    $bgcolor = "#000000";
    $fontcolor = "#ffffff";
    $tableborder = "#aaaaaa";
    $ASbackground = $bgcolor;
    $AStext = $fontcolor;
    $ASborder = $tableborder;
    }

    When someone goes to http://yourdomain.com/yourpage.php?color=1 than the Background and Adsense Background will be black, the font and AS font will be white, and the table borders and AS borders will be gray.




    That may not be the exact code but it's just to prove a point.

    And change for each specific color change.
     
    exaro, Aug 16, 2005 IP
  6. Willy

    Willy Peon

    Messages:
    281
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just look at the AdSense here on DP for an example ;) Very effective for overcoming ad blindness.
     
    Willy, Aug 16, 2005 IP
  7. Liminal

    Liminal Peon

    Messages:
    1,279
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #7
    There is no need for a custom script. AdSense alllows you to have up to 4 color variations for each variable for which you can specify color:

    ...
    google_color_border = ["628098","628098","000000","000000"];
    google_color_link = ["000000","BBB90C","BBB90C","628098"];
    google_color_url = ["000000","628098","000000","000000"];
    google_color_text = ["628098","628098","000000","000000"];
    ...
     
    Liminal, Aug 16, 2005 IP
    Willy likes this.