SMF Ads Support Forum

Support => Ad Support => Topic started by: geek4rent on July 16, 2006, 09:37:59 pm

Title: rotating ads?
Post by: geek4rent on July 16, 2006, 09:37:59 pm
first off great mod I love it...now to my question......

I have Entropy Banner on my web site...where ya put code in to have rotating banner ads....I tried using this with this addon but it will not work...I just put the code for the banner manager in the ad area...is there a way I can have rotation ads with this addon.....lets say at the bottom of the page.....and after i set up the ads then each refresh they would change to the next ad?
Title: Re: rotating ads?
Post by: bigguy on July 17, 2006, 07:02:27 am
This mod does not work as a rotation system.
Title: Re: rotating ads?
Post by: jerm on July 17, 2006, 10:55:38 am
if you are using version 2.0, you can have multiple ad codes, and it will randomly choose which ad code to display
Title: Re: rotating ads?
Post by: RebelRose on July 28, 2006, 07:11:17 pm
if you are using version 2.0, you can have multiple ad codes, and it will randomly choose which ad code to display

What do you mean it will randomly choose which ad, it does that by itself?

I have 2.0 installed on my forum.
Title: Re: rotating ads?
Post by: bigguy on July 29, 2006, 12:53:09 am
I think what is meant by that is every time the page is refreshed it will show a different ad as long as you have both ads with the same settings.
Title: Re: rotating ads?
Post by: Jump1979man on August 09, 2006, 11:35:51 am
if you are using version 2.0, you can have multiple ad codes, and it will randomly choose which ad code to display

can you go into more detail on how to accomplish this?  Thank you.
Title: Re: rotating ads?
Post by: jerm on August 10, 2006, 12:22:52 am
if you have multiple ad codes set to appear in the same area, a function randomly chooses which ad to display
Title: Re: rotating ads?
Post by: mommyland on August 17, 2006, 11:13:14 am
I hope you dont mind me saying something however I used this code in it and it worked fine every time the page refreshed it was a different banner. before I realized that if you put more then one check iin the same place it rotated them if that makes sense.

<script language="Javascript">
<!--
// original content taken from Nic's JavaScript Page with permission
// lack of these three lines will result in copyright infringment
// made by: Nic's JavaScript Page - http://www.javascript-page.com

var currentdate = 0;
var core = 0;

function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this = initArray.arguments;
  }
}

link = new initArray(
"http://3bgraphics.hypermart.net/",
"http://html.digitalsea.net/",
"http://www.javascript-page.com/"
);

image = new initArray(
"http://3bgraphics.hypermart.net/link/3bgraphics.gif",
"http://html.digitalsea.net/htmlnow.gif",
"http://www.geocities.com/~jsmaster/jsnow.gif"
);

text = new initArray(
"3B Graphics",
"Learn HTML in 7 Easy Steps",
"Nic's JavaScript Page"
);

var currentdate = new Date();
var core = currentdate.getSeconds() % image.length;
var ranlink  = link[core];
var ranimage = image[core];
var rantext  = text[core];

document.write('<a href=\"' +ranlink+ '\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');

//-->
</SCRIPT>
Title: Re: rotating ads?
Post by: Farmacija on February 17, 2007, 07:54:44 pm
if you have multiple ad codes set to appear in the same area, a function randomly chooses which ad to display

it isnt quite true, not for smf 1.1.2
(http://img95.imageshack.us/img95/7205/smfaduv6.th.jpg) (http://img95.imageshack.us/my.php?image=smfaduv6.jpg)

and codes are
<a href="http://www.collegium-yu.com" target="_blank"><img border="0" src="http://www.farmaceuti.com/BANERI/c1.gif" width="354" height"60"></a>
<a href="http://www.farmaceuti.com/forum/index.php/topic,2918.0.html" target="_blank"><img src="http://www.farmaceuti.com/BANERI/banersportskogdrustva2re0.jpg"></a>
Title: Re: rotating ads?
Post by: Farmacija on February 17, 2007, 08:44:23 pm
ok, bigguy gives this code in official smf support site
Code: [Select]
<SCRIPT LANGUAGE="JavaScript">



<!-- Begin
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="The World's Largest Online Bookstore, Amazon.com";
url="http://www.amazon.com";
alt="amazon.com";
banner="http://imageserv.imgis.com/images/Ad12669St1Sz1Sq1_Ban1.gif";
width="468";
height="60";
}
if (ad==2) {
txt="Palm III by 3Com, in stock!";
url="http://cybershop.com/";
alt="cybershop.com";
banner="http://imageserv.imgis.com/images/Ad13189St1Sz1Sq5_Ban10.gif";
width="468";
height="60";
}
if (ad==3) {
txt="Find it at GoTo.com";
url="http://www.goto.com";
alt="goto.com";
banner="http://imageserv.imgis.com/images/Ad13700St1Sz1Sq1_Ban1.gif";
width="468";
height="60";
}
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End -->
</SCRIPT>
how i can change how many seconds is needed for other banner to show?
Title: Re: rotating ads?
Post by: cybertelecom on March 02, 2007, 04:52:07 am
I try to put both javascript above in content box

If choose html, it doesn''t show anything
If choose PHP, it shows
Quote
Parse error: syntax error, unexpected '<' in /home/cytelbiz/public_html/insinyur/komunitas/Sources/Load.php(1724) : eval()'d code(387) : eval()'d code on line 1


so what should I do ????
Title: Re: rotating ads?
Post by: bigguy on March 02, 2007, 10:36:19 pm
@ cybertelecom: I'll post this for Jerm to see maybe he has an idea.

Title: Re: rotating ads?
Post by: jimbo21 on March 07, 2007, 09:28:55 pm
Hey this is very cool  8)
I did not realize this mod was able to do that.
Title: Re: rotating ads?
Post by: NYSEMTI on March 19, 2008, 09:39:58 pm
Did anyone ever get this to work?