|
Post by Wormopolis on Dec 28, 2008 4:59:22 GMT -8
Browser Tested: IE and FF placement: wherever you want it
Makes a table with scrolling images of affiliate sites. hovering your mouse over the images magnifies them in the upper part of table.
<!-- Wormoffiliate Table HTML --> <table id="affTable" cellspacing="1" cellpadding="0" border="0" width="510" height="400" align="center" bgcolor="000000" class="bordercolor"> <tr> <td width="100%"> <table border="0" width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="000000" width="100%"> <table width="100%" height="400"><tr><td valign="center" align="center" width="100%" height=300 id="topview"><a href="/index.cgi"><img src="http://i280.photobucket.com/albums/kk168/SKBundy/316017686_429ce64b01.gif" ></a><img src="blank.gif" style="display: none"><img src="blank.gif" style="display: none"></td></tr><tr valign="bottom"><td width="100%"> <marquee id="parade" direction="left" onmouseover = "this.stop()" onmouseout = "this.start()"><a href="http://wormocodes.proboards.com"><img src="http://i280.photobucket.com/albums/kk168/SKBundy/316017686_429ce64b01.gif" border="0" width="100" onmouseover = "holdit=document.getElementById('topview'); holdit.firstChild.firstChild.src = this.src; tem2=document.getElementById('affTable').width-10; tem3=holdit.height-10; if (holdit.firstChild.firstChild.width>tem2) {tem=holdit.firstChild.firstChild.width; holdit.firstChild.firstChild.height=holdit.firstChild.firstChild.height*(tem2/tem); holdit.firstChild.firstChild.width=tem2;} if (holdit.firstChild.firstChild.height>tem3) {tem=holdit.firstChild.firstChild.height; holdit.firstChild.firstChild.width=holdit.firstChild.firstChild.width*(tem3/tem); holdit.firstChild.firstChild.height=tem3;}" onmouseout="holdit=document.getElementById('topview'); holdit.firstChild.firstChild.src = holdit.firstChild.nextSibling.src; holdit.firstChild.firstChild.removeAttribute('width'); holdit.firstChild.firstChild.removeAttribute('height');"></a> </marquee></td></tr> <tr><td><table><tr><td width="40%"><table><tr><td width="50%">Affiliate with<br>WormoCodes:</td><td><a href="http://wormocodes.proboards.com"><img src="http://i280.photobucket.com/albums/kk168/SKBundy/affiliate_1-1.jpg" border=0></a></td></tr></table></td><td valign="bottom"><textarea cols="58" rows="3" style="font-size: 9;"><a href="http://wormocodes.proboards.com"><img src="http://i280.photobucket.com/albums/kk168/SKBundy/affiliate_1-1.jpg" border=0></a></textarea></td></tr></table></td></tr> </table> </td> </tr> </table> </td> </tr></table> <!-- HTML end -->
<script type="text/javascript"> <!-- // Wormoffiliate table v2.0 // Keep Header Intact - do not repost // by Wormopolis // [url]wormocodes.proboards.com[/url]
var affiliateList=[ ["http://tbserialkillers.proboards.com","http://i280.photobucket.com/albums/kk168/SKBundy/SKlogo1.jpg"], ["http://daewars.proboards.com","http://i127.photobucket.com/albums/p134/farhendae/BlueEarthDaekleiner.jpg"], ["http://partisanincorporate.proboards.com","http://i290.photobucket.com/albums/ll274/Blitz_of_MK/ECTOGREEN-1.png"],["http://tbcrysis.proboards.com","http://i303.photobucket.com/albums/nn128/ncfirestar/crysis_logo.jpg"],["http://rcagain.proboards.com","http://i38.tinypic.com/21l4aj5.png"], ["http://ncchaos2006.proboards.com","http://i183.photobucket.com/albums/x108/gabe_curry/ncbanner-1-1.jpg"] // no comma last line ];
// NO NEED TO EDIT BELOW
affiTable=document.getElementById('affTable'); if (true) { mainImage=affiTable.getElementsByTagName('td')[2].getElementsByTagName('img')[0]; saveImage=affiTable.getElementsByTagName('td')[2].getElementsByTagName('img')[1]; saveImage.src=mainImage.src; saveImage.height=mainImage.height; saveImage.width=mainImage.width; imageParade=document.getElementById("parade"); firstLemming=imageParade.firstChild; for (i=0; i<affiliateList.length; i++) { newLemming=firstLemming.cloneNode(true); newLemming.href=affiliateList[i][0]; newLemming.firstChild.src=affiliateList[i][1]; imageParade.appendChild(newLemming); } } // --> </script>
Preview: on main page
|
|
|
Post by Wormopolis on Jan 10, 2009 0:49:15 GMT -8
updated: version 2. now will allow images of larger size as sources but will resize to fit into the table size you specify in HTML.
|
|
|
Post by Wormopolis on Aug 9, 2009 2:58:39 GMT -8
Update: modifed to fix overheight images
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Oct 5, 2010 16:02:51 GMT -8
Is this the same code that is on the main page? If so, you may want to consider adding this line below "newLemming.href=affiliateList[0];" to open affiliates in a new window/tab (depending on browser settings):
newLemming.target="_blank";
|
|
µ/S†ylµs²/µ.Ldr
Not New Member
ಠ_ಠ
Posts: 28
µ/S†ylµs²/µ.Ldr said 0 great things
|
Post by µ/S†ylµs²/µ.Ldr on Jan 11, 2011 11:31:33 GMT -8
I was wondering if it would be ok to move the Worm affiliate default to one of our main affiliates. No offence intended, but it will cause much confusion and many questions if our allied clans sees that there by default.
>Edit< I have no problem keeping your affiliate banner there, just not as the default displayed.
|
|
|
Post by Wormopolis on Jan 11, 2011 18:37:53 GMT -8
That is fine with me. Its mainly there as a default to keep the array from underflowing (plus it serves as good advertisment).
while on the subject, try out the affiliate request thing I have going in the affiliate request board.
|
|
wildgoosespeeder
Code Helper
Tiers are for strangers!
Posts: 530
wildgoosespeeder said 161 great things
|
Post by wildgoosespeeder on Jan 11, 2011 21:17:52 GMT -8
Is this the same code that is on the main page? If so, you may want to consider adding this line below "newLemming.href=affiliateList [0];" to open affiliates in a new window/tab (depending on browser settings):
newLemming.target="_blank"; Are you going to take my suggestion?
|
|
|
Post by Wormopolis on Jan 12, 2011 0:36:58 GMT -8
I left it in the thread.. if they want it to open in a new window, they just have to add the line in. dont have a problem with it opening in the same window..
|
|