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 Sept 5, 2005 14:02:43 GMT -8
Global FooterThis will select a random avatar to display. <script type="text/javascript"> <!-- /* random avatars by elindir do not edit or redistribute without permission*/
var avatar=[ ["admin","av1","av2","av3"], ["user1","av1","av2","av3","av4"], ["user2","av1","av2"] ];
for (r=0;r<avatar.length;r++){ var td=document.getElementsByTagName('td'); for (m=0;m<td.length;m++) if (td[m].className.match(/window(bg|bg2)/i) && td[m].width=="20%" && td[m].innerHTML.match('user='+avatar[r][0])){ var img=td[m].getElementsByTagName('img'); for (j=0;j<img.length;j++) if(img[j].alt=="[avatar]"){ var a = Math.floor(Math.random()*avatar[r].length); if(a==0){a=1} img[j].src=avatar[r]; } } } //--> </script>Edit these lines: [" admin","av1" ,"av2" ,"av3"], The red is the members username. The "av1","av2" etc are the URLs of their avatars. You can use as many avatars as they like. Make sure you do not leave any spaces inside the " quotes and that each avatar is seperated by a comma. Note, do not leave a hanging comma at the end of the last ] bracket. Look at how I've done it in the example (in orange)
|
|