vForums Support > Programming & Coding :: Code Requests & Support :: > [F] Change an image in a select board

[F] Change an image in a select board - Posted By dog199200 (dog199200) on 25th Mar 08 at 1:59am
can i please get a code that will let me change an image in a select board only, i want to change the New Thread icon to another image..but only in a select board..

Re: Change an image in a select board - Posted By Michael (wrighty) on 25th Mar 08 at 2:02am
try this:

Edit where ti says 'OLD IMAGE' and 'NEW IMAGE'

<script>
var old = 'OLD IMAGE';
var new_i = 'NEW IMAGE';

for(i=0;i<get('img','tag').length;i++){
    if(get('img','tag')[i].src.match(old)){
        get('img','tag')[i].src = new_i;
    }
}
</script>


Board Footers

Re: Change an image in a select board - Posted By dog199200 (dog199200) on 25th Mar 08 at 2:08am
ok is it the images url that you put in or ideas? mostly talking for the image im trying to replace, because i put in the two images and the old one is still there

Re: Change an image in a select board - Posted By Marc (cr0w) on 25th Mar 08 at 3:26am
Posted By dog199200 on 25th Mar 08 at 2:08am
 
ok is it the images url that you put in or ideas? mostly talking for the image im trying to replace, because i put in the two images and the old one is still there


You put in the URL. {Wink}

Re: Change an image in a select board - Posted By dog199200 (dog199200) on 25th Mar 08 at 3:38am
ok then it doesn't work...

Re: Change an image in a select board - Posted By Michael (wrighty) on 25th Mar 08 at 11:43am
Recopy, keep forgetting that I can't use 'new' as a variable name!:P

Re: Change an image in a select board - Posted By dog199200 (dog199200) on 25th Mar 08 at 5:08pm
ok ty, it works now