inherit
Handsome Devil
20992
0
Oct 26, 2012 20:34:21 GMT -8
ⓦ৹₪deⓡ
No animals were harmed in the feeding of this human.
925
March 2004
chickenturkeybacon
|
Post by ⓦ৹₪deⓡ on Oct 9, 2005 1:40:51 GMT -8
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. Put in Global Footer. Do NOT PM me for support or code requests. That's what the coding boards are for. Enjoy. ~Wonder
<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>
~modified Oct 25th, 2005 at 12:49am to fix problem with commas
|
|