Table Advertisements
-
- Posts: 97
- Joined: Fri Feb 06, 2009 3:13 pm
- Location: California
- Contact:
Table Advertisements
Greetings,
I would like to ask for some assistance in setting up the ads on my tables. I have a folder on my desktop named "poker ads" with 10 different jpg's in it. I would like a new ad to be randomly chosen and be displayed on the table every 5 minutes. Is this possible and if so, can someone please help me with the code. I am a total rookie with html, and can find no example to help get me started.
Thank you,
Chris
I would like to ask for some assistance in setting up the ads on my tables. I have a folder on my desktop named "poker ads" with 10 different jpg's in it. I would like a new ad to be randomly chosen and be displayed on the table every 5 minutes. Is this possible and if so, can someone please help me with the code. I am a total rookie with html, and can find no example to help get me started.
Thank you,
Chris
cuervo5150
http://www.iPokerBOT.com
http://www.iPokerBOT.com
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Table Advertisements
Try this:
Edit the list of AdImages[] and corresponding AdLinks[] arrays with as many items as you want, starting with element [0]. So 10 ads would be numbered 0 to 9. Also notice the "10000" number near the end. That's the delay in milliseconds (10000) between ads. Set that to 300000 if you want 5 minutes. Copy and paste all of the above into one of the HTML fields (e.g., Top ad HTML) in the server console Ad Settings group. Set the appropriate size (e.g., Top ad size = 60, etc.) and then specify the Ad Folder where you've stored all your JPG images (unless they're external).
Code: Select all
<a id="adLink" href="" target="_blank"><img id="adImage" border="0" src=""/></a>
<script>
adImages = []
adImages[0] = "banner1.jpg";
adImages[1] = "banner2.jpg";
adImages[2] = "banner3.jpg";
adLinks = []
adLinks[0] = "http://www.domain1.com";
adLinks[1] = "http://www.domain2.com";
adLinks[2] = "http://www.domain3.com";
AdNum = 0;
function nextAd()
{
document.getElementById("adImage").src = adImages[AdNum];
document.getElementById("adLink").href = adLinks[AdNum];
AdNum++;
if (AdNum == adImages.length) AdNum = 0;
window.setTimeout("nextAd()",10000);
}
nextAd();
</script>
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Table Advertisements
The previous javascript code just displayed all the ads in a sequential loop. If you prefer a random display then use this instead:
Code: Select all
<a id="adLink" href="" target="_blank"><img id="adImage" border="0" src=""/></a>
<script>
adImages = []
adImages[0] = "banner1.jpg";
adImages[1] = "banner2.jpg";
adImages[2] = "banner3.jpg";
adLinks = []
adLinks[0] = "http://www.domain1.com";
adLinks[1] = "http://www.domain2.com";
adLinks[2] = "http://www.domain3.com";
function nextAd()
{
AdNum = Math.floor(Math.random() * adImages.length);
document.getElementById("adImage").src = adImages[AdNum];
document.getElementById("adLink").href = adLinks[AdNum];
window.setTimeout("nextAd()",10000);
}
nextAd();
</script>
-
- Posts: 97
- Joined: Fri Feb 06, 2009 3:13 pm
- Location: California
- Contact:
Re: Table Advertisements
Thank you for such a quick reply. Where do I stick the path to the files?
C:\Documents and Settings\Administrator\Desktop\poker_ads\pepsi.gif
Your expertise is much appreciated!
C:\Documents and Settings\Administrator\Desktop\poker_ads\pepsi.gif
Your expertise is much appreciated!
cuervo5150
http://www.iPokerBOT.com
http://www.iPokerBOT.com
-
- Posts: 8
- Joined: Thu Mar 20, 2008 6:42 pm
Re: Table Advertisements
You put the root folder path in the "Ad Folder" option at the bottom of the system tab.
-
- Posts: 97
- Joined: Fri Feb 06, 2009 3:13 pm
- Location: California
- Contact:
Re: Table Advertisements
Hahaha, I totally did not see that field on the bottom!
Thanx.
Also, the ads only show up on the loading screen, not on the actual table, correct? If I want any advertising on the table I would have to manually include it onto the background graphic?
Thanx.
Also, the ads only show up on the loading screen, not on the actual table, correct? If I want any advertising on the table I would have to manually include it onto the background graphic?
cuervo5150
http://www.iPokerBOT.com
http://www.iPokerBOT.com
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Table Advertisements
Yes, that's correct. Or the table logo. But nothing there is clickable, however.cuervo5150 wrote:Also, the ads only show up on the loading screen, not on the actual table, correct? If I want any advertising on the table I would have to manually include it onto the background graphic?
-
- Posts: 97
- Joined: Fri Feb 06, 2009 3:13 pm
- Location: California
- Contact:
Re: Table Advertisements
Yep, it's me again.
I've read, copied/pasted all your html examples, but am still having issues with the ads on the loading screen. If I activate more than 1 ad, the banners start to stack on each other at the top. Also, the ad banners overlap the tables, instead of the tables floating above the banners. Am I doing something wrong?
Thank you
Chris
http://www.5150poker.com
I've read, copied/pasted all your html examples, but am still having issues with the ads on the loading screen. If I activate more than 1 ad, the banners start to stack on each other at the top. Also, the ad banners overlap the tables, instead of the tables floating above the banners. Am I doing something wrong?
Thank you
Chris
http://www.5150poker.com
cuervo5150
http://www.iPokerBOT.com
http://www.iPokerBOT.com
-
- Site Admin
- Posts: 5880
- Joined: Wed Mar 19, 2008 8:47 pm
Re: Table Advertisements
Did you set a size (e.g., "Top ad size" for "Top ad HTML", etc) to allocate enough space for the ad? You can send me the HTML you are using and I'll take a look.cuervo5150 wrote:I've read, copied/pasted all your html examples, but am still having issues with the ads on the loading screen. If I activate more than 1 ad, the banners start to stack on each other at the top. Also, the ad banners overlap the tables, instead of the tables floating above the banners. Am I doing something wrong?
-
- Posts: 97
- Joined: Fri Feb 06, 2009 3:13 pm
- Location: California
- Contact:
Re: Table Advertisements
Ok, my L/R banners are 161 and T/B are 90 pixels.
The html is....
<a id="adLink" href="" target="_blank"><img id="adImage" border="0" src=""/></a>
<script type="text/javascript">
adDelay = 10000; // milliseconds to display each ad
adImages = []
adImages[0] = "Top-B.gif";
adImages[1] = "Top-G.gif";
adImages[2] = "Top-Y.gif";
adLinks = []
adLinks[0] = "http://www.5150poker.com";
adLinks[1] = "http://www.5150poker.com";
adLinks[2] = "http://www.5150poker.com";
function nextAd()
{
AdNum = Math.floor(Math.random() * adImages.length);
document.getElementById("adImage").src = adImages[AdNum];
document.getElementById("adLink").href = adLinks[AdNum];
window.setTimeout("nextAd()",adDelay);
}
nextAd();
</script>
The html is....
<a id="adLink" href="" target="_blank"><img id="adImage" border="0" src=""/></a>
<script type="text/javascript">
adDelay = 10000; // milliseconds to display each ad
adImages = []
adImages[0] = "Top-B.gif";
adImages[1] = "Top-G.gif";
adImages[2] = "Top-Y.gif";
adLinks = []
adLinks[0] = "http://www.5150poker.com";
adLinks[1] = "http://www.5150poker.com";
adLinks[2] = "http://www.5150poker.com";
function nextAd()
{
AdNum = Math.floor(Math.random() * adImages.length);
document.getElementById("adImage").src = adImages[AdNum];
document.getElementById("adLink").href = adLinks[AdNum];
window.setTimeout("nextAd()",adDelay);
}
nextAd();
</script>
cuervo5150
http://www.iPokerBOT.com
http://www.iPokerBOT.com