How the Background colour of Adsence of this Digital Point website change

Discussion in 'AdSense' started by siddiq, Jun 27, 2008.

  1. #1
    How does the Background colour of Adsence of this Digital Point website change when ever we refresh
     
    siddiq, Jun 27, 2008 IP
  2. Jeehan

    Jeehan Well-Known Member

    Messages:
    1,578
    Likes Received:
    31
    Best Answers:
    1
    Trophy Points:
    115
    #2
    Chose Chose the right color and save some Palettes then chose "Multiple Palettes" then your saved Palettes. That would do the trick.
     
    Jeehan, Jun 27, 2008 IP
  3. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #3
    on the web server, before the html page is sent to the user's browser, a color tag value is inserted in the adsense code.

    
    google_color_border = "FFBB00";
    google_color_bg = "FFD0AA";
    
    Code (markup):
     
    JamesColin, Jun 28, 2008 IP
  4. ironmaiden

    ironmaiden Peon

    Messages:
    205
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    the point is not clear.. please elaborate them.
     
    ironmaiden, Jun 28, 2008 IP
  5. joel1st

    joel1st Active Member

    Messages:
    233
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #5
    If you look up the top right hand side of the forums and refresh the page the ad background changes color.
     
    joel1st, Jun 28, 2008 IP
  6. nathangjj

    nathangjj Peon

    Messages:
    98
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    exactly what wwwSENSERELYcom said, probably a tiny bit of php code that randomly generates the color hex code
     
    nathangjj, Jun 28, 2008 IP
  7. hexinator

    hexinator Peon

    Messages:
    357
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    modifying the code is not allowed. Instead you use multiple palettes
     
    hexinator, Jun 28, 2008 IP
  8. JamesColin

    JamesColin Prominent Member

    Messages:
    7,874
    Likes Received:
    164
    Best Answers:
    1
    Trophy Points:
    395
    Digital Goods:
    1
    #8
    I thought I should never read that sort of thing anymore, but I guess people afraid of everything will always be here...

    Changing the color with PHP is not modifying the code! Learn it once and for all even if you can't understand it.
     
    JamesColin, Jun 28, 2008 IP
  9. godsofchaos

    godsofchaos Peon

    Messages:
    2,595
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Cool thing, I always wondered how it changes! Lol. But never asked, dont know why. Will have to experiment myself now.
     
    godsofchaos, Jun 28, 2008 IP
  10. SEO-Expert

    SEO-Expert Well-Known Member

    Messages:
    328
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    140
    #10
    With the old AdSense coding you could setup multiple colours without having to use any scripting language.

    I used to use this technique on some of my sites, this is the format (still works)-

    <script type="text/javascript"><!--
    google_ad_client = "pub-8325072546567078";
    google_ad_width = 468;
    google_ad_height = 60;
    google_ad_format = "468x60_as";
    google_ad_type = "text_image";
    google_ad_channel ="";
    google_color_border = ["336699","B4D0DC","A8DDA0","DDB7BA"];
    google_color_bg = ["0000FF","0000CC","0000CC","0000CC"];
    google_color_link = "008000";
    google_color_url = "008000";
    google_color_text = ["000000","6F6F6F","6F6F6F","6F6F6F"];
    //--></script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>

    This works by choosing either the 1st, 2nd, 3rd or 4th colour code at random and using the same colour number in the other lines of code.

    So if AdSense randomly chooses the 2nd border colour it will also choose the 2nd bg colour and 2nd text colour, if the 3rd colour is randomly chosen it's the 3rd for all variables (unless there's only one listed). Not sure what would happen if you used 4 colours for one variable and 3 for the others.

    In this way you can use up to 4 distinct colour themes for your AdSense ads (only works with the first 4 colours).

    You'll see above I didn't use 4 colours for the link and URL, you can though.

    Been a while since I used this sort of coding as now I use fully blended colours and there's only one of those :)

    David Law
     
    SEO-Expert, Jun 28, 2008 IP