Thursday, October 16, 2008

Show Ads In The Middle of Posts


Another great hack that will boost your current click through rates ! You will be able to show your ads ( adsense , Chitika ,Yahoo and other ads) in the middle of your blog posts! This is really amazing ! Let me show you how to this :

Adding Codes to Template

Now go to your template codes expand widgets and find the codes below



Now replace the codes above with the line lines below

<div expr:id=""aim1" + data:post.id"></div>  
  • <div style="margin: 10px 0pt; clear: both;">  
  •   
  • <!-- Your AdSense code here -->  
  • </div>  
  • <div expr:id=""aim2" + data:post.id">  
  •   
  • <data:post.body>  
  • </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>  


    Now encode your Adsense codes from her
    and add after the line below



    Working demo here

    Preview template , if its OK save it !
  • 0 comments:

    Friends

    Popular Posts

    Advertisement

     

    Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com