|
Post by Ron White on Mar 24, 2006 22:26:15 GMT -5
Goes in the Global Footer
You input an array of ranks and the Karma required to acheive those ranks and this script will put a members karma rank underneath their karma in the mini-profile. Edit where instructed. Both arrays must be the same length.
<script> //Karma Ranks v1.0
//Copyright 10-09-2005 by ~Wonder //May be reposted anywhere as long as this header remains in tact
//Put in Global Footer
//Enter the titles for the Karma Ranks (you can use HTML, just \ special characters) and the Karma required to acheive that rank. Both arrays must be the same length. karmaTitles=new Array("title1","title2","title3","title4","title5"); karmaAmounts=new Array(-20,-10,0,10,20);
if(location.href.match(/action=(display|goto|viewprofile|pmview|recent)/)) { var td=document.getElementsByTagName("td"); for(i=0;i<td.length;i++) { if(td[i].width=="20%" && td[i].className.match(/windowbg/) && td[i].innerHTML.indexOf("Karma: ")!=-1) { p=td[i].innerHTML.substring(td[i].innerHTML.indexOf("Karma: ")+7,td[i].innerHTML.length)+"<"; temp=p.substring(0,p.indexOf("<")); p=parseInt(temp.replace(/,/ig,"")); if(p>=karmaAmounts[0]) { j=0;while(p>=karmaAmounts[j] && j<karmaAmounts.length){j++;} td[i].innerHTML=td[i].innerHTML.replace("Karma: "+temp,"Karma: "+temp+"<br>"+karmaTitles[j-1]); } } } } </script>
-+-Win32##Microsoft Internet Explorer 6.0##1280 × 768##1-+-
|
|