View Full Version: [S] In Search Of A Code

RPG-Directory > Solved Support Topics > [S] In Search Of A Code



Title: [S] In Search Of A Code


xxmandurr - August 12, 2008 05:32 AM (GMT)
So I really don;t knwo what it's called, but on a few sites I've pictures on there sidebar in black or white or dulled ad once you roll over them you see the real image with the color. I was wondering what the code was for that. For an example of what I am talking about you can see here. They use it on the admin pictures. I have a Invisionfree board so I don't know I the code would be different.

Thanks in advance to who ever knows this.

pathogenicoma - August 12, 2008 05:40 AM (GMT)
Read page source.

CODE
border=0 style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)">


It would go in after your image url. So...

CODE
<img src="http://i64.photobucket/craziness/redrum.jpg" border=0 style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)">


That's what they are using to do that.

Same should work with you. HTML is HTML whether it's proboards or IF. You change how faded the image looks as well by adjusting the opacity.

Cookies to me for my awesome made up photobucket url.

xxmandurr - August 12, 2008 05:50 AM (GMT)
thanks. *hands over cookies* you deserve them.

EDIT:
I used it, but once you roll over the image it doesn't...how do you say....show the original none dull picture.

junebug! - August 12, 2008 06:33 PM (GMT)
QUOTE (xxmandurr @ Aug 12 2008, 05:50 AM)
thanks. *hands over cookies* you deserve them.

EDIT:
I used it, but once you roll over the image it doesn't...how do you say....show the original none dull picture.

1. where did you insert the code?
2. did you put the code path gave you for the images' urls?

Make sure you've got this in your javascript section (Board Wrappers):

CODE
<script language="JavaScript1.2">

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

</script>

xxmandurr - August 12, 2008 09:12 PM (GMT)
I placed the code right after the image code.
example:
QUOTE
<a href="http://z10.invisionfree.com/thegreatdivide/index.php?showuser=1"><img src="http://i289.photobucket.com/albums/ll203/syb-forum/ldsidebar/thspirit.jpg"border=0 style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)"></a>


But the javascript you gave you me works. Thanks. :p




Hosted for free by InvisionFree