-->

Friday, August 4, 2017

How to install 2 ads automatically for blog



How to install 2 ads automatically for blog:

1. Parse the google ads code at ==> http://www.blogcrowds.com/resources/parse_html.php
2. After diparte copy paste ads 1 in (CODE ADSENSE Part 1) and ads 2 in (CODE ADSENSE Part 2) in the code below.
3. Find <data: post.body /> then overwrite with the code below, if unsuccessful search <data: post.body /> others to succeed usually dibody article, no: 2 or no: 3.
4. This is for bloggers.
5. Set the ad layout in var ads1 = 1/5; Means the location of a fifth of the top and var ads2 = 3/5; Meaning three fifths of the bottom contents. Just change the number if you want more down the middle or up.

I myself already practice and Yes, it works!

thank you


CODE!!
<div expr:id='"post1" + data:post.id'/>
<div class='googlepublisherads' style='margin:20px 0'>
<center>
CODE ADSENSE Part 1
</center>
</div>
<div expr:id='"post2" + data:post.id'><data:post.body/></div>
<div class='googlepublisherads' style='margin:20px 0'>
<center>
CODE ADSENSE Part 2
</center>
</div>
<div expr:id='"post3" + data:post.id' />
&lt;script type='text/javascript'&gt;
var ads1=1/5;
var ads2=3/5;
var a=document.getElementById(&quot;post1<data:post.id/>&quot;);
var b=document.getElementById(&quot;post2<data:post.id/>&quot;);
var c=document.getElementById(&quot;post3<data:post.id/>&quot;);
var html=b.innerHTML;
var n=html.length;
var t=html.substr(0,n*ads1);
var i=t.lastIndexOf(&quot;&lt;br&gt;&quot;);
var t2=html.substr(0,n*ads2);
var i2=t2.lastIndexOf(&quot;&lt;br&gt;&quot;);
if(i&gt;0 &amp;&amp; i2&gt;0){
a.innerHTML=html.substr(0,i);
b.innerHTML=html.substr(i+4,i2);
c.innerHTML=html.substr(i2+4);
}&lt;/script&gt;

Advertiser