Wednesday, June 6, 2012

ADSENSE CODE EVERYWHERE


Steps:

1. Log in to blogger account
2. Go to Layout – Edit HTML – Click (tick) Expand Widget Templates
3. Find :

 <data:post.body/>

and replace with this code :

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


<div style="clear:both; margin:10px 0">
YOUR ADSENSE CODE AFTER PARSE 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 r=s.search(/x3C!-- adsense --x3E/igm);if(r>0) {obj0.innerHTML=s.substr(0,r);obj1.innerHTML=s.substr(r+16);}</script>


Change the code

You should change your adsense code. PARSE HERE !!! with your adsense code. To parse your adsense code, change your adsense code.

Note : If you have read more hack installed, you will find 2 (two) code of <data:post.body/> change / replace the first one!

4. Save your template !

5. How to make it shows in the middle of your post:

Create a new post, write an article and when you finished your article, insert this tag <!– adsense –> in the middle of your article (example : after the first paragraph)
Note : If you didn’t put <!– adsense –> tag in your post, by default adsense ads will show up below the post title.
Now publish your new post and see whether adsense ads in the middle of blogger post is worked.