Post by MarvinRules on Sept 8, 2005 15:11:36 GMT -5
This code:
was posted here:
swg.proboards4.com/index.cgi?board=ct&action=display&n=1&thread=625
However it would be nice if it could have these modifications:
However in IE it does not unfade. And it kind of fade's away to the left...
And if you could fix the FireFox thing, that would be AUSOME!!!!
Edit. That fading effect in IE is actually kind of cool... Especially if it could be on both ends... (Where if fades away...)
This is the FireFox thing I was refering to..
Some codes for v3.
Aren't you so funny.
*looks at monty*
Go to a different thread!
Also, there's a way to do the sort of make the copy code, code work in browsers other then IE.
I might make an info center... just need to think of some ideas first.
Thank you mutch! Take your time. ;D
mbarker22 said:
Try this code:<style type="text/css">
<!--
#affscroll img
{
/* Modify these values as desired */
opacity: 0.5;
-moz-opacity: 0.5;
filter: alpha(opacity = 50);
}
#affscroll img:hover
{
opacity: 1.0;
-moz-opacity: 1.0;
filter: alpha(opacity = 100);
}
-->
</style>
<div align="center">
<table align="center" border="0" width="92%" cellspacing="0" cellpadding="0" class="bordercolor">
<tr>
<td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td class="titlebg" align="center" colspan="2">
<font class="text1" size="2"><b>Affiliates</b></font>
</td>
</tr>
<tr>
<td align="center" valign="top" class="windowbg" width="67%">
<script type="text/javascript">var doesstart = '';</script>
<marquee id="affscroll" onmouseover="this.stop();" onmouseout="if(doesstart==0){this.start();}" direction="left" scrollamount="4" style="Filter:Alpha(Opacity=100, FinishOpacity=5, Style=1, StartX=30, StartY=0, FinishX=0, FinishY=0);">
<!-- Affiliate codes beyond here -->
<!-- No affiliate codes beyond here -->
</marquee>
<button class="windowbg" style="border:0px;cursor:hand;font-family:verdana;font-size:100%;padding-top:0px;padding-bottom:0px;" onclick="vcr(1,this);">Slower</button>
<button class="windowbg" style="border:0px;cursor:hand;font-family:verdana;font-size:100%;padding-top:0px;padding-bottom:0px;" onclick="vcr(2,this);">Faster</button>
<button class="windowbg" style="border:0px;cursor:hand;font-family:verdana;font-size:100%;padding-top:0px;padding-bottom:0px;" name="pause" onclick="vcr(3,this);doesstart = 1;">Pause</button>
<button class="windowbg" style="border:0px;cursor:hand;font-family:verdana;font-size:100%;padding-top:0px;padding-bottom:0px;display:none;" name="resume" onclick="vcr(4,this);doesstart = 0;">Resume</button>
<button class="windowbg" style="border:0px;cursor:hand;font-family:verdana;font-size:100%;padding-top:0px;padding-bottom:0px;" name="revfwd" onclick="vcr(5,this);">Reverse</button>
<button class="windowbg" style="border:0px;cursor:hand;font-family:verdana;font-size:100%;padding-top:0px;padding-bottom:0px;" onclick="vcr(6,this);doesstart = 0;">Reset</button><br />
You can also hover over the banners to pause.
<script type="text/javascript">
<!--
function vcr(action,button)
{
var marq = document.getElementById('affscroll');
switch (action)
{
case 1:
if (marq.scrollAmount > 0)
{
marq.scrollAmount -= 2;
}
else
{
alert('Already at minimum!');
}
break;
case 2:
if (marq.scrollAmount < 100)
{
affscroll.scrollAmount = eval(parseInt(affscroll.scrollAmount) + 2);
}
else
{
alert('Already at maximum!');
}
break;
case 3:
marq.stop();
button.style.display = 'none';
document.getElementsByTagName('button')['resume'].style.display = '';
break;
case 4:
marq.start();
button.style.display = 'none';
document.getElementsByTagName('button')['pause'].style.display = '';
break;
case 5:
if (marq.direction == 'left')
{
marq.direction = 'right';
button.value = 'Forward';
}
else if (marq.direction == 'right')
{
marq.direction = 'left';
button.value = 'Reverse';
}
break;
case 6:
marq.start();
marq.scrollAmount = 6;
marq.direction = 'left';
document.getElementsByTagName('button')['pause'].style.display = '';
document.getElementsByTagName('button')['resume'].style.display = 'none';
document.getElementsByTagName('button')['revfwd'].value = 'Reverse';
break;
default:
void(0);
break;
}
}
// -->
</script>
</td>
<td align="center" class="windowbg2" valign="middle" width="33%">
<a href="javascript:doCopy();" title="Click to copy my affiliate code to the clipboard. (IE only)"><img src="YOUR MINI-BANNER URL GOES HERE" alt="" border="0" /></a>
<div id="myaffcodeblock" style="text-align: left;">
Feel free to add my banner to your site!<br />
Simply place this HTML code on your web site:<br />
<textarea id="myaffcodebox" rows="2" cols="20"><a href="YOUR BOARD URL GOES HERE" target="_blank"><img src="YOUR MINI-BANNER URL GOES HERE TOO" height="31" border="0" /></a></textarea>
</div>
<script type="text/javascript">
<!--
function isMSIE()
{
if (navigator.appName.indexOf('Microsoft Internet Explorer') != -1 && navigator.userAgent.indexOf('Opera') == -1)
{
return true;
}
return false;
}
function doCopy()
{
if (isMSIE())
{
var mycode = document.getElementById('myaffcodebox').createTextRange();
mycode.execCommand("Copy");
alert('The HTML code has been copied to the clipboard.');
}
else
{
alert('You do not appear to be using Internet Explorer, so the copy link doesn\'t work.\nHighlight all of the text in the text box, and press Ctrl+C.');
}
}
if (isMSIE())
{
document.getElementById('myaffcodeblock').style.display = 'none';
}
// -->
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</div>
was posted here:
swg.proboards4.com/index.cgi?board=ct&action=display&n=1&thread=625
However it would be nice if it could have these modifications:
tavisjohn said:
OK the browser smart affiliate code share part works PERFECT! However the hover fader thing does not work very well... In FireFox it works fine, I over over the image, and it unfades.However in IE it does not unfade. And it kind of fade's away to the left...
And if you could fix the FireFox thing, that would be AUSOME!!!!
Edit. That fading effect in IE is actually kind of cool... Especially if it could be on both ends... (Where if fades away...)
This is the FireFox thing I was refering to..
ccworld said:
admin said:
An RPG or a portal.admin said:
I know!! (gasp!)Some codes for v3.
Aren't you so funny.
*looks at monty*
Go to a different thread!
Also, there's a way to do the sort of make the copy code, code work in browsers other then IE.
I might make an info center... just need to think of some ideas first.
Thank you mutch! Take your time. ;D