The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Banner Rotation not working properly

View previous topic View next topic Go down

Solved Banner Rotation not working properly

Post by Neoroify on October 12th 2010, 9:04 pm

Greetings, I am encountering a problem with forumotion, each time i attempt to include my banner rotation script in the top footer as you can see at http://forum.neoroify.eu/ it's only stuck at one image and is not cycling, also it redirects you to the forum homepage http://neoroify.forumotion.com/ and is not redirecting to the affiliate's link.

The script code:
Code:

<center>
<script type="text/javascript">
var imgs1 = new Array("http://www.icybux.com/banner.jpg","http://adf.ly/images/banners/adfly.468x60.4.gif");
var lnks1 = new Array("http://icybux.com/index.php?ref=Neoroify","http://adf.ly/?id=95055");
var alt1 = new Array("Icybux - The only PTC you will ever need","adf.ly - Make money by shrinking links!");
var currentAd1 = 0;
var imgCt1 = 2;
function cycle1() {
  if (currentAd1 == imgCt1) {
    currentAd1 = 0;
  }
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
  banner1.src=imgs1[currentAd1]
  banner1.alt=alt1[currentAd1]
  document.getElementById('adLink1').href=lnks1[currentAd1]
  currentAd1++;
}
  window.setInterval("cycle1()",10000);
</script>
<a href=""http://icybux.com/index.php?ref=Neoroify"" id="adLink1" target="_blank">
<img src="http://www.icybux.com/banner.jpg" id="adBanner1" border="0" width="468" height="60"></a>

It must cycle each 10 seconds, but it is not!

Neoroify
Forumember

Posts : 99
Reputation : 0
Language : English

Back to top Go down

Solved Re: Banner Rotation not working properly

Post by RoNo on October 12th 2010, 10:32 pm

It'll work in templates by linking the script....

Create an Html page with your code
I've titled the page LinkedScript_js for this example
Code:
var imgs1 = new Array("http://www.icybux.com/banner.jpg","http://adf.ly/images/banners/adfly.468x60.4.gif");
var lnks1 = new Array("http://icybux.com/index.php?ref=Neoroify","http://adf.ly/?id=95055");
var alt1 = new Array("Icybux - The only PTC you will ever need","adf.ly - Make money by shrinking links!");
var currentAd1 = 0;
var imgCt1 = 2;
function cycle1() {
  if (currentAd1 == imgCt1) {
    currentAd1 = 0;
  }
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
  banner1.src=imgs1[currentAd1]
  banner1.alt=alt1[currentAd1]
  document.getElementById('adLink1').href=lnks1[currentAd1]
  currentAd1++;
}
  window.setInterval("cycle1()",10000);
Save code only, no tags or titles.


Get the page Url from Html pages management
and link it like I've done in this example (add to overall footer)
Code:
<script src="http://zone2.forumotion.net/LinkedScript_js-h182.htm" type="text/javascript"></script>

<center>
<a href=""http://icybux.com/index.php?ref=Neoroify"" id="adLink1" target="_blank">
<img src="http://www.icybux.com/banner.jpg" id="adBanner1" border="0" width="468" height="60"></a></center>
The above example has been *tested & works fine.
Create your own page since I will be deleting the example page.

RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

Solved Re: Banner Rotation not working properly

Post by Neoroify on October 12th 2010, 11:31 pm

Worked fine, Thanks for your help.

Neoroify
Forumember

Posts : 99
Reputation : 0
Language : English

Back to top Go down

Solved Re: Banner Rotation not working properly

Post by RoNo on October 13th 2010, 12:25 am


RoNo
Active Poster

Male Posts : 1270
Reputation : 135
Language : English
Location : Laguna Beach, California

http://bf2mercenaries.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum