Alternating Banner Code?
3 posters
Page 1 of 1
Re: Alternating Banner Code?
Anyone?DaSportsGuy34STC wrote:Is their a code we can use to get our banners to alternate?
Rotating Banner Example
Easiest way I've found to implement a rotating banner is via php:
Heres a quick tutorial I've read and modified to make it simpler.
1) Create a php file
example (ads.php)
2)Insert this code
3) Replace 'your code here' with your 'adsense' code or banners.
example
http://www.automax.tv/templates/frontend/ads3.php
Thats it, however I've hit a stumbling block, on my software, I've got an adblock that doesnt allow php.
So I've tried to include this via,
My website is http://automax.tv you can see the banner on any of the video pages.
i.e http://www.automax.tv/Ford_Fiesta_XR4_WQ.html
Heres a quick tutorial I've read and modified to make it simpler.
1) Create a php file
example (ads.php)
2)Insert this code
- Code:
<?php
$bannerAd[1] = 'your code here';
$bannerAd[2] = 'your code here';
$bannerAd[3] = 'your code here';
$adCount = count($bannerAd);
$randomAdNumber = mt_rand(1, $adCount);
echo $bannerAd[$randomAdNumber];
?>
3) Replace 'your code here' with your 'adsense' code or banners.
example
- Code:
$bannerAd[1] = '<a href="http://www.automax.tv/" target="_blank"><img src="../../images/logo.gif" border="0"></a>';
$bannerAd[2] = '<a href="http://www.automax.tv/" target="_blank"><img src="../../images/logo.png" border="0"></a>';
http://www.automax.tv/templates/frontend/ads3.php
Thats it, however I've hit a stumbling block, on my software, I've got an adblock that doesnt allow php.
So I've tried to include this via,
- Code:
<div>
<?php require_once "http://automax.tv/templates/frontend/ads3.php" ?>
</div>
My website is http://automax.tv you can see the banner on any of the video pages.
i.e http://www.automax.tv/Ford_Fiesta_XR4_WQ.html
automax- New Member
- Posts : 1
Reputation : 0
Language : english
Re: Alternating Banner Code?
Hey Guy's I posted a Solution to this question a couple weeks back, i solved it by writing a script with JS that will work on Forumotion's forums.
I have a working example of the banner changing script on the right side of my website. Almost every time you refresh the page a new picture will be in it's place.
If you end up using my script, please leave the Copyright and Comments intact.
If you have any problems you can contact me through my website.
Check out the Script Here:
Banner Changing Script.... (It's on the Forumotion Board)
I have a working example of the banner changing script on the right side of my website. Almost every time you refresh the page a new picture will be in it's place.
If you end up using my script, please leave the Copyright and Comments intact.
If you have any problems you can contact me through my website.
Check out the Script Here:
Banner Changing Script.... (It's on the Forumotion Board)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum