Selasa, 12 Juni 2012

The Trick to put adsense in the middle of posted Article

It is highly recommended that you to try this trick on the exerimental blog so that if the experiment does not work it does not damage your main blog.
1. Login / go to blogger.com -> Design / Design -> checklist on Expand Widgdt Templates.
2. Find the following code: <data:post.body/>
3. Replace with the following code:


<div expr:id='"aim1" + data:post.id'></div>
<div style="clear:both; margin:10px 0">

    <!-- your adSense code here -->

</div>
<div expr:id='"aim2" + data:post.id'>
    <data:post.body/>
</div>

<script type="text/javascript">
var obj0=document.getElementById("aim1<data:post.id/>");
var obj1=document.getElementById("aim2<data:post.id/>");
var s=obj1.innerHTML;
var t=s.substr(0,s.length/2);
var r=t.lastIndexOf(" ");
if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+1);}
</script>


5. Replace <!-- your adsense code here --> with your adsense code, BUT AFTER CONVERTED by this tool >> Adsense blogger Converter

0 komentar: