Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Want to run my own ads
#1
I have created a single gif that has 3 different ad's that rotate, I can add it to my advertisements but I can only put in 1 link, I need to make them link to the 3 different sites when they rotate. Maybe I'm using the wrong plug-in...Any suggestions?
#2
You need 3 different images if you want to link to 3 different sites. Or, need something like flash.
#3
well if I made 3 different images, which I can do, is there a plug in to play #1 for a few seconds then change to # 2 and so one?
added:
I noticed http://mods.mybb.com/view/daily-sponsor-bar , will that do the trick?

and thanks Alex for your reply
#4
Not that I know of. But, it is possible with javascript.
#5
JavaScript would be the way to go.

Load a script with an array of 3 image URLs and the 3 destination URLs. Then have a timer cycle through them. Then have JavaScript alter a HTML anchor element to display the correct URL and image.
#6
I'm pretty sure there might be plugins out there to put your own ads on your website.
#7
I have an image rotater on my homepage, it's only a few lines of code using jQuery. You can see it here: http://mybbconnect.com/index.php

If its what you need let me know and I'll give you the code.
#8
can you create a different link to each image? if so sure...I'd appreciate the code.
#9
You can do it with Template Conditionals http://mybbhacks.zingaburga.com/showthread.php?tid=464 if you want it simple without animation. Remember to put the .txt from package to inc/plugins.

Then put this in any template:
<setvar randomadnumber>rand(1,3)</setvar>
<if $tplvars['randomadnumber'] == 1 then>
<a href="www.myfirstlink.com"><img alt="" src="images/myfirstimg.png" /></a>
<elseif $tplvars['randomadnumber'] == 2 then>
<a href="www.mysecondlink.com"><img alt="" src="images/mysecondimg.png" /></a>
<else>
<a href="www.mythirdlink.com"><img alt="" src="images/mythirdimg.png" /></a>
</if>

It will rotate on each page refresh, not sure if that's what you meant, otherwise you need JS like this http://jquery.malsup.com/cycle/
#10
try dis code.

<script language="Javascript">
<!--


var currentdate = 0;
var core = 0;

function initArray() {

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

link = new initArray(
"http://www.linkofsite1.com",
"http://www.linkofsite2.com",
"http://www.linkofsite3.com"

);

image = new initArray(
"http://linkofbanner1.com",
"http://linkofbanner2.com",
"http://linkofbanner3.com"

);

text = new initArray(
"Name Of Site1",
"Name Of Site2",
"Name Of Site3"

);

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+ '\" target=\"_blank\"><img src=\"'+ranimage+'\" border="0" alt=\"'+rantext+'\"></a>');

//-->
</SCRIPT>


Forum Jump:


Users browsing this thread: 1 Guest(s)