Como cambiar la fuente en Google Adsense

12 septiembre, 2009 por Khirr Dejar una respuesta »

Bueno, como alguna vez habrán visto en Softonic, el diseño de los anuncios es diferente para que así se puedan integrar más con el sitio; este proceso podría ser penalizado por Google Adsense o banear la cuenta, pero por lo que veo, a esta web no le ha pasado nada asi que se los comparto.

adsensediferentetl4

Este “truco” solo funciona con los anuncios antiguos de Adsense, los cuales también estan disponibles desde su web.

Coloque sus anuncios de google adsense: Estos anuncios son generados por google adsense:

<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>

Defina la siguiente variable en javascript: Definir la variable isa en la parte superior de su página web:

var sA = ;

Agregue el siguiente método JavaScript: Este método muestra los resultados en el anuncio. Debe ser definido antes que script que llama a show_ads.js para garantizar que se define cuando show_ads.js hace el 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;
  }

El resultado es el siguiente:

adssc9

Bueno, si desean implementarlo para pruebas, proyectos y demás, ahi esta el código, pero de todas formas sean cuidadosos ;)

Fuente | GeekThePlanet

Si tienes alguna duda y deseas que la comunidad de Actualidad Informatica te ayude puedes visitar nuestro Foro, solo necesitas registrarte y dejar tu mensaje, recibirás una respuesta rápidamente con la mejor solución.

2 comentarios

  1. El Mokis dice:

    Hola, tu haz echo este truco o solo lo copiaste de ese blog?

  2. El Mokis dice:

    Si puedes me agregas a mi mail para informarme eld0c1l_lep0n3@hotmail.com pago por paypal

Deja un comentario

Si necesitas más información sobre este tema o algun problema puedes decirlo en nuestro Foro y recibiras ayuda de toda nuestra comunidad informatica.