• Translate

12/02/2016

Tutorial How to Make Banner Rotation Automatically in Blog

Tutorial Blogspot |

Advertisement

How do I Create an Ad Changed when The Blogs Refresh | This tutorial I created for myself and friends blogger certainly, this tutorial is associated with the widget ad boxes where sometimes you join multiple affiliate so as to make your blog is full of your affiliate link to promote.

Of course this will make your blog become unsightly. So, this tutorial will help you solve the problem by making your ad will be replaced automatically after refresh your blog.

Tutorial How to Make Banner Rotation Automatically in Blog
to make it happen we need the javascript code, of course, is very lightweight code to your blog, the following ways to create an ad automatically changed when the blog refresh :

► Login to your Blogspotselect layout create new widgetspaste the code below 
<script type="text/javascript">
var trtmbn_id = 3;
var trtmbn_now = new Date()
var detik = trtmbn_now.getSeconds()
var trtmbn_place = detik % trtmbn_id;
trtmbn_place += 1;
if (trtmbn_place == 1) {
  url = "LINKS DESTINATION";
  alt = "DESCRIPTION ADVERTISING";
  title = "TITLE ADVERTISING";
  banner = "BANNER ADVERTISING";
  width = "300";
  height = "250";
}
if (trtmbn_place == 2) {
  url = "LINKS DESTINATION";
  alt = "DESCRIPTION ADVERTISING";
  title = "TITLE ADVERTISING";
  banner = "BANNER ADVERTISING";
  width = "300";
  height = "250";
}
if (trtmbn_place == 3) {
  url = "LINKS DESTINATION";
  alt = "DESCRIPTION ADVERTISING";
  title = "TITLE ADVERTISING";
  banner = "BANNER ADVERTISING";
  width = "300";
  height = "250";
}
document.write('<a href=\"' + url + '\" target=\"_blank\" rel=\"nofollow\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('title=\"' + title + '\" alt=\"' + alt + '\"></a>');
</script>
Please be filled in accordance with the description affiliate link, your ads, and others. Please save your widget.

The code above just for showing 3 types of affiliates or advertising links. so if you want to add one more please change the code trtmbn_id=3; be trtmbn_id=4; and add a new row below the third ad code 
if (trtmbn_place == 4) {
  url = "LINKS DESTINATION";
  alt = "DESCRIPTION ADVERTISING";
  title = "TITLE ADVERTISING";
  banner = "BANNER ADVERTISING";
  width = "300";
  height = "250";
Done, I hope this guide can help you in developing the ads on your blog

Disqus
Blogger
Comment
How to style text in Disqus comments Top Disqus Commentators
  • To write a bold letter please use <strong></strong> or <b></b>.
  • To write a italic letter please use <em></em> or <i></i>.
  • To write a underline letter please use <u></u>.
  • To write a strikethrought letter please use <strike></strike>.
  • To write HTML code, please use <code></code> or <pre></pre> or <pre><code></code></pre>, and please parse the code in the parser box below.
Show Parser Box

No comments Add Comment

Comments not appropriate topic will sign SPAM.