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!!
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' />
<script type='text/javascript'>
var ads1=1/5;
var ads2=3/5;
var a=document.getElementById("post1<data:post.id/>");
var b=document.getElementById("post2<data:post.id/>");
var c=document.getElementById("post3<data:post.id/>");
var html=b.innerHTML;
var n=html.length;
var t=html.substr(0,n*ads1);
var i=t.lastIndexOf("<br>");
var t2=html.substr(0,n*ads2);
var i2=t2.lastIndexOf("<br>");
if(i>0 && i2>0){
a.innerHTML=html.substr(0,i);
b.innerHTML=html.substr(i+4,i2);
c.innerHTML=html.substr(i2+4);
}</script>
<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' />
<script type='text/javascript'>
var ads1=1/5;
var ads2=3/5;
var a=document.getElementById("post1<data:post.id/>");
var b=document.getElementById("post2<data:post.id/>");
var c=document.getElementById("post3<data:post.id/>");
var html=b.innerHTML;
var n=html.length;
var t=html.substr(0,n*ads1);
var i=t.lastIndexOf("<br>");
var t2=html.substr(0,n*ads2);
var i2=t2.lastIndexOf("<br>");
if(i>0 && i2>0){
a.innerHTML=html.substr(0,i);
b.innerHTML=html.substr(i+4,i2);
c.innerHTML=html.substr(i2+4);
}</script>