Breaking

logo

Kamis, 11 Agustus 2016

A new way to show adsense ads being surrounded the post, want to know how? ....

A new way to show adsense ads being surrounded the post, want to know how? ....

S P C E.com : Hallo friends - friends all this time I will share for a friend - a friend of all how to display the ads in the middle - the middle of the blog post. But earlier been my post about how to display ads inside posts. Namely in the article: How show ads adsense inside blog posts automatically and in article one is different again but still displaying AdSense ads automatically on page posting articles exactly in the middle of posting blog articles.

A new way to show adsense ads being surrounded the post, want to know how? ....

What if you do not have an Adsense account please register first website or your blog, click on this link to register your web and blog https://www.google.com/adsense/signup. Well what if already has a code from google adsense, you need to do to display adsense ads in the middle - middle post is.

1. Open the first www.blogspot.com
2. Go to edit template
3. Find the code <data: post.body />
4. Replace the code <data: post.body /> with the code below:
<div expr:id='"ads1" + data:post.id'></div><div style="clear:both; margin:10px 0"> Put your ads Adsense Code Already In Parse preemptively Here </div><div expr:id='"ads2" + data:post.id'><data:post.body/></div><script type="text/javascript">var obj0=document.getElementById("ads1<data:post.id/>");var obj1=document.getElementById("ads2<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. After the Save Template you and please see the result in your post page

What if using the code above would not be effective for articles that are too long, because the ads will be too much in the middle of the post, the above code is only effective when it is used for articles that are not too long, because nature split a two-page article .but what if you like it's okay.

A new way to show adsense ads being surrounded the post, want to know how? ....

Now please do display when writing your article, you can choose a code, this second, difference only in code (var t = s.substr (0, s.length / 2);) to be like (var r = s.search (/ \ x3C! - adsense - \ x3e / IgM);).

Is the same as the above do:

1. Open the first www.blogspot.com
2. Sign In Edit template
3. Find the code <data: post.body />
4. Replace the code <data: post.body /> with the code below:
<div expr:id='"ads1" + data:post.id'></div><div style="clear:both; margin:10px 0"> Put your ads Adsense Code Already In Parse preemptively Here </div><div expr:id='"ads2" + data:post.id'><data:post.body/></div><script type="text/javascript">var obj0=document.getElementById("ads1<data:post.id/>");var obj1=document.getElementById("ads2<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>
5. After you change the SAVE TEMPLATE and complete look at the results

It's just that I can share for friends may helpful you and for everyone else, waiting for the next article more interesting than www.saifulcomelektronik.com.