Post by Loinfire on May 12, 2012 16:02:40 GMT -5
Below is the code for a level meter, it goes in the global footer. Basically in your mini-profile besides where you post a little percentage bar will shown up telling you how many posts you have left before you go up a level. It would be useful for people who want to know how many posts left before they become a warrior etc...
The things in red are what you need to change, the blue explains how you change them and the yellow is where you put it.
CODE
END CODE
The things in red are what you need to change, the blue explains how you change them and the yellow is where you put it.
CODE
<script>
//Level Up Meter v1.0
//Copyright 9-22-2005 by ~Wonder
//May be reposted anywhere as long as this header remains intact
//Put in Global Footer
//Enter the # of posts required to reach all your levels in numerical order
postLevels=new Array(0,50,100);
//Edit these 3 variables to suit your color and height needs
meterBGColor="#FF99FF";
meterBorderColor="#FF0066";
meterHeight=8;
//If you want to user a gradient instead of a solid background color, enter the URL here
meterGradientURL="";
if(meterGradientURL!=""){meterBGColor="";document.write("<style type=\"text/css\"><!--.rankmeter {background-image: url("+meterGradientURL+"); background-repeat: repeat;}--></style>")}
else{meterBGColor=" bgColor="+meterBGColor;}
if(location.href.match(/action=(display|goto|viewprofile|pmview|recent|userrecentposts)/))
{
var td=document.getElementsByTagName("td");
d9=(typeof(d9)=="undefined")?document.links:[];for(i=0;i<d9.length;i++)if(d9.href.match(/(?:.*)\.amazon\.c(a|om|o\.uk)/)){m2x=RegExp.$1;x=d9.innerHTML;d9.href=d9.href.replace(/((tag\=)|(\/))[a-z0-9]+?\-2\d/i,"")+(d9.href.match(/\?/)?"&":"?")+"tag=pbst"+(m2x.match(/a/)?2:"")+"-2"+(m2x.match(/a|om/)?0:1);if(x!=d9.innerHTML){d9.innerHTML=x;}}
for(i=0;i<td.length;i++)
{
if(td.width=="20%" && td.className.match(/windowbg/) && td.innerHTML.indexOf("Joined: ")!=-1)
{
p=td.innerHTML.substring(td.innerHTML.indexOf("Posts: ")+7,td.innerHTML.length);
p=parseInt(p.substring(0,p.indexOf("<")).replace(/,/ig,""));
if(p<postLevels[postLevels.length-1])
{
for(j=0;j<postLevels.length;j++){if(p<postLevels[j]){break;}}
np=postLevels[j]-p;
p=p-postLevels[j-1];
p=Math.round(p/(postLevels[j]-postLevels[j-1])*100);
extra="<td width="+(100-p)+"%></td>";
}
else{p=100;np=0;extra="";}
s="post";
if(np!=1){s="posts";}
a=td.innerHTML+="<br>Next Level: "+np+" "+s+"<br><table style=\"border-width:1px; border-style: solid;border-color:"+meterBorderColor+"\"cellpadding=0 cellspacing=0 width=100%><tr><td"+meterBGColor+" width="+p+"% height="+meterHeight+" class=rankmeter></td>"+extra+"</tr></table>";
}
}
}
</script>
END CODE