Welcome to Dream.In.Code
Click Here
Getting Help is Easy!

Join 117,165 Programmers for FREE! Ask your question and get quick answers from experts. There are 2,515 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



Customize Google Adsense Ads

 
Reply to this topicStart new topic

Customize Google Adsense Ads, How to customize google adsense lay out - font face, size, color, numb

abhijitkd
post 22 Sep, 2007 - 10:27 AM
Post #1


New D.I.C Head

*
Joined: 22 Sep, 2007
Posts: 1


My Contributions


How to customize google adsense lay out - font face, size, color, number of ads, etc. for example www.about.com, www.cricketnext.com. This is legal. I also attached show_ads.js here. Plz help me to do the same.I tried same on my web page but not working. any questions regarding the same welome. Any help for html, web designing, blogging, sources for codes, wordpress, shopping cart installation, i will help you just mail me. I like this website.------------------------------------------------------------------------------

CODE
<script language=JavaScript>
                        function google_ad_request_done(google_ads)
                        {
                            var s = '';
                            var i;

                            if (google_ads.length == 0)
                            {
                                return;
                            }
                        
                            if (google_ads[0].type == "image")
                            {
                                s += '<a href="' + google_ads[0].url +
                                '" target="_top" title="go to ' + google_ads[0].visible_url +
                                '"><img style="border:none;" src="' + google_ads[0].image_url +
                                '"width="' + google_ads[0].image_width +
                                '"height="' + google_ads[0].image_height + '"/></a>';
                            }
                            else
                            {
                                if (google_ads.length == 1)
                                {
                                    /*
                                    * Partners should adjust text sizes
                                    * so ads occupy the majority of ad space.
                                    */
                                    s += '<td align=center><a href="' + google_ads[0].url + '" ' +
                                                            'onmouseout="window.status=\'\'" ' +
                                                            'onmouseover="window.status=\'go to ' +
                                                            google_ads[0].visible_url + '\'" ' +
                                                            ' class="red-11" style="font-size:10px">'+
                                                            google_ads[0].line1 + '</a><br>' +
                                                            '<a href="' + google_ads[0].url + '" ' +
                                                            'onmouseout="window.status=\'\'" ' +
                                                            'onmouseover="window.status=\'go to ' +
                                                            google_ads[0].visible_url + '\'" ' +
                                                            ' class="grey11" ><font style="text-decoration:none;"><font class=ash11><font color=black>' +
                                                            google_ads[0].line2 + ' ' +
                                                            google_ads[0].line3 + '</font></a></td>';
                                }
                                else if (google_ads.length > 1)
                                {
                                    /*
                                    * For text ads, append each ad to the string.
                                    */
                                    for(i=0; i < google_ads.length; ++i)
                                    {
                                        
                                        s += '<td width=250px valign=top><a href="' + google_ads[i].url + '" ' +
                                                                  'onmouseout="window.status=\'\'" ' +
                                                                  'onmouseover="window.status=\'go to ' +
                                                                  google_ads[i].visible_url + '\'" ' +
                                                                  ' class="red-11" style="font-size:14px">' +
                                                                  '<font class=ash11 color=#0099ff><b>' + google_ads[i].line1 + '</b></a><br>' +
                                                                  '<a href="' + google_ads[i].url + '" ' +
                                                            'onmouseout="window.status=\'\'" ' +
                                                            'onmouseover="window.status=\'go to ' +
                                                            google_ads[i].visible_url + '\'" ' +
                                                            ' class="grey11" style="text-decoration:none;"><font style="text-decoration:none;"><font class=ash11 color=black>' +
                                                                  google_ads[i].line2 + ' ' +
                                                                  google_ads[i].line3 + '</font></a></td>';

                                    
                                        if(i<1)
                                        {
                                            s +='<td width=30px></td>';
                                        }
                                    }
                                }
                            }
                            document.write(s);
                            return;
                        }
                        google_ad_client = 'pub-2242539371574078';
                        //2007-09-20: blog
                        google_ad_channel = "6442827050";
                        google_ad_output = 'js';
                        google_max_num_ads = '4';
                        google_targeting = 'content';
                        google_ad_type='text';
                        google_feedback = 'on';
                        google_language = 'en';
                        google_encoding = 'utf8';
                        google_ad_section = 'default';
                    </SCRIPT>

          <script language=JavaScript
          src="./show_ads.js">
                    </SCRIPT>



[Mod Edit] Use the code tags. mad.gif


Attached File(s)
Attached File  show_ads.zip ( 4.57k ) Number of downloads: 96
User is offlineProfile CardPM

Go to the top of the page


skyhawk133
post 9 Oct, 2007 - 04:37 PM
Post #2


Head DIC Head

Group Icon
Joined: 17 Mar, 2001
Posts: 14,584



Thanked 39 times

Dream Kudos: 1650

Expert In: Web Development

My Contributions


This is not legal, you can not customize google ads. It's a violation of the TOS. The sites you listed are part of the premium publisher program for sites with over 5,000,000 page views monthly.

If you touch your adsense code, you will be thrown out of the adsense program forever.
User is offlineProfile CardPM

Go to the top of the page

Fygar
post 10 Oct, 2007 - 06:32 AM
Post #3


I liek milk!!1

Group Icon
Joined: 28 Mar, 2002
Posts: 4,311



Dream Kudos: 50
My Contributions


IPB Image

For-ever... For-ever... For-ever...
User is offlineProfile CardPM

Go to the top of the page

axel
post 17 Oct, 2007 - 12:48 PM
Post #4


Bug Juice Doesn't Come in a Jar

Group Icon
Joined: 31 Dec, 2006
Posts: 1,807



Dream Kudos: 100
My Contributions


Fygar, you are amazing.


and yeah dude, that is not a good idea at ALL. Leave it alone.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/6/08 11:17AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month