inherit
Beware the ever changing head
33588
0
Nov 18, 2023 0:32:44 GMT -8
Ross
19,039
November 2004
elindir
|
Post by Ross on Feb 28, 2007 2:37:32 GMT -8
Description: This will change any image on your forum to a different image. Ideal if you're wanting to have a separate skin on just one of your boards.
Compatibility: This code should be completely compatible with any other code in IE and Firefox. I know of no reason why it should not work in browsers such as Safari or Opera too.
Editing: Edit/repeat the lines that look like this with the ALT text of the image (the text that appears when you hover over the image) and the URL of the new image, the first two have been done as an example. images.push(['ALT Text', 'New URL']);
Placement: Board Footer of any Boards to Affect
<script type="text/javascript"> <!-- /* Image Switch-It */
var images = Array(); images.push(['[Home]', 'http://yourhost.com/home.gif']); images.push(['[Help]', 'http://yourhost.com/help.gif']); images.push(['ALT Text', 'New URL']);
var img = document.getElementsByTagName('img'); for(i=0; i<img.length; i++) { if(!img.item(i).alt.match(/^(\[image\])?$/i)) { for(n=0; n<images.length; n++) { if(images[n][0] == img.item(i).alt) { img.item(i).src = images[n][1]; } } } } //--> </script>
|
|