• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Change Google Adsense Fonts ...

Perhaps one of the hardest chanellages while creating your website and trying to place google Ads is to change its (google Ads) style. I think most of the readers now want to say "We all can change the style". My answer to all the readers is "You can change not only google Ads colors but also the font size, type and remove google Ads image - text, if you want". Yeah, you can do it in 5 easy steps. Let us start and you will see what I am talking about.

View More Info

Perhaps one of the hardest chanellages while creating your website and trying to place google Ads is to change its (google Ads) style.

I think most of the readers now want to say "We all can change the style".

My answer to all the readers is "You can change not only google Ads colors but also the font size, type and remove google Ads image - text, if you want".

Yeah, you can do it in 4 easy steps. Let us start and you will see what I am talking about.

Ads Preview

1- Place your Google Ads script.

Put your Ads script which is generated from your Google Adsense account and remove all the Ads colors to be like the following script

<script language="JavaScript">
<!--
// This script sets the attributes for requesting ads.
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
google_min_num_ads = 4;
google_max_num_ads = 6;
google_feedback = "on";
google_ad_output = "js";
google_ad_channel ="6632411210";
google_ad_type = "text_image";
google_image_size = "300x250";
google_encoding = "utf8";
-->
</script>
<script language="JavaScript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

2- Define the following javascript variable.

Define the variable isA at the top of your webpage like this:

var sA = ;

3- Add the following javascript method.

This method displays the ad results. It must be defined above the script that calls show_ads.js to guarantee that it is defined when show_ads.js makes the call-back.

function google_ad_request_done(google_ads) {

// Proceed only if we have ads to display!
if (google_ads.length < 1 )
return;

// Display ads in a table
sA += <table width="300" cellspacing="1" cellpadding="0" border="0" bgcolor="#ffffff">;


// Print "Ads By Google" -- include link to Google feedback page if available
sA += <tr><td align="right"> +
<div style="text-align:left;font-size:12px">;

if (google_info.feedback_url) {
sA += <a href=" + google_info.feedback_url + "><font style="font-size:12px" face="Arial" color="#000000">Ads by Google</font></a> &nbsp; &nbsp; ;
} else {
sA += Ads by Google;
}

sA += </div><font style="font-size:10px"><br></td></tr>;

var TopRand=Math.floor(Math.random() * 2);

// For text ads, display each ad in turn.
// In this example, each ad goes in a new row in the table.
if (google_ads[0].type == ext) {
for(i = 0; i < google_ads.length; ++i) {

var first_line=google_ads[i].line2.split(" ");

var new_f_l=;
for(l = 2; l < first_line.length; ++l) {
new_f_l += " "+first_line[l];
}

if (i < 4 ){

if(TopRand <1){

sA += <tr><td bgcolor="#ffffff" id="taw1" class="ch" width="" height="" align="left" valign="top" onFocus="ss(go to + google_ads[i].visible_url +,aw1)" onMouseOver="ss(go to + google_ads[i].visible_url +,aw1)" onMouseOut="cs()" onClick="javascript:top.location.href= + google_ads[i].url + "><div style="overflow:hidden; width:580px; padding-left:2px"> +
<font style="line-height:16px;font-size:16px;font-weight:bold;" face="arial,sans-serif" color="#000088"><a id="aw0" onclick="javascript:top.location.href= + google_ads[i].url + " onmouseover="window.status=go to + google_ads[i].visible_url + " onmouseout="window.status=" style="text-decoration:none"> +
<b><font style="font-family:Arial,sans-serif;text-decoration:none;border-bottom:1px #009999 solid; color:#009999;font-size:18px;font-weight:bold;"> + google_ads[i].line1 + </b></a></font></font><font style="line-height:3px;font-size:3px"><br><br></font> +
<font style="font-size: 90%;text-decoration: none;color: #000000;font-size:small;font-family:Verdana,Arial;" color="#000000">+<b>+first_line[0] + + first_line[1]+</b> + new_f_l + &nbsp; + google_ads[i].line3 + <br></font> +
<font style="line-height:14px;font-size:12px" face="Verdana,Arial,sans-serif" color="#999999"> + google_ads[i].visible_url +
</font></div><font style="font-size:10px"><br></div></td></tr>;

}else{
sA += <tr><td bgcolor="#ffffff" id="taw1" class="ch" width="" height="" align="left" valign="top" onFocus="ss(go to + google_ads[i].visible_url +,aw1)" onMouseOver="ss(go to + google_ads[i].visible_url +,aw1)" onMouseOut="cs()" onClick="javascript:top.location.href= + google_ads[i].url + "><div style="overflow:hidden; width:580px; padding-left:2px"> +
<font style="line-height:16px;font-size:16px;font-weight:bold;" face="arial,sans-serif" color="#000088"><a id="aw0" onclick="javascript:top.location.href= + google_ads[i].url + " onmouseover="window.status=go to + google_ads[i].visible_url + " onmouseout="window.status=" style="text-decoration:none"> +
<b><font style="font-family:Arial,sans-serif;text-decoration:none;border-bottom:1px #4c7373 solid; color:#4c7373;font-size:18px;font-weight:bold;"> + google_ads[i].line1 + </b></a></font></font><font style="line-height:3px;font-size:3px"><br><br></font> +
<font style="font-size: 90%;text-decoration: none;color: #000000;font-size:small;font-family:Verdana,Arial;" color="#000000">+<b>+first_line[0] +</b> + new_f_l + &nbsp; + google_ads[i].line3 + <br></font> +
<font style="line-height:14px;font-size:12px" face="Verdana,Arial,sans-serif" color="#4c7373"> + google_ads[i].visible_url +
</font></div><font style="font-size:10px"><br></div></td></tr>;

}




}
}
}

// For an image ad, display the image; there will be only one .
if (google_ads[0].type == image) {
sA += <tr><td align="center"> +
<a href=" + google_ads[0].url + "style="text-decoration: none"> +
<img src=" + google_ads[0].image_url +
" border="0"></a></td></tr>;
}

// Finish up anything that needs finishing up


sA += </table>;

document.write(sA);
return;
}

4- Show the final result.

Ads Preview

 View Full Story.
Posted at 02:51:30 pm | Permalink | Posted in UI  Javascript  Google  CSS  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

7 Comments |Add your comment.

hariharakumar said:

my blogger template is not accepting this code , can you please give directions onhow to install in blogger template.

Posted at June 19, 2008 03:46:27 pm
Alan Who? said:

Isnt this against googles ts and cs?

Posted at July 16, 2007 01:12:01 pm
gajul said:

it is not allowed by adsense TOCplease beware, publisher

Posted at July 16, 2007 08:23:41 am
frenadoll said:

Could this be used to fire a function inside that loads this code on dom ready? Google ads delays this event causing an ugly interface load.

Posted at July 3, 2007 10:08:21 pm
racer said:

Easy and nice!

Posted at July 3, 2007 12:29:13 pm
Web Design Architect said:

Fantastic explanation

Posted at June 27, 2007 10:33:36 pm
Marcus T said:

Great, but youve used the same image twice, so it looks like theres no difference!

Posted at June 20, 2007 05:19:48 pm

Your Comment ...

  Name (required)

  Email (required, hidden)

  Website


About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Recent Stuff

ASP.NET MVC & Threads

How to add Google Maps to your website

Speeding Up Post Load Script

Simple AJAX Methodology

Javascript Ajax Class

Threading in JavaScript


Our Partners

Ajax Projects

Web 2.0 Sites

Webloglines

Human Development Handbook

Software Development Company

Ajaxlines


Search


Topics

  • .Net (98)
  • Articles (78)
  • Bookmarking (35)
  • Calendar (18)
  • Chat (38)
  • ColdFusion (3)
  • CSS (33)
  • Email (23)
  • Flash (13)
  • Games (6)
  • Google (22)
  • Html (10)
  • Image (11)
  • International Calls & VOIP (7)
  • Java (35)
  • Javascript (156)
  • JSON (19)
  • Perl (2)
  • PHP (83)
  • Presentation (19)
  • Python (3)
  • Resources (2)
  • RSS (1)
  • Ruby (7)
  • Storage (4)
  • Toolkits (90)
  • Tutorials (193)
  • UI (11)
  • Utilities (162)
  • Web2.0 (13)
  • XmlHttpRequest (19)
  • YUI (4)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange