Post by Ross on Jan 7, 2006 18:07:02 GMT -5
Global Footer
What this does is either replaces a staff members member group with the equivalent rank or adds the equivalent rank to the profile.
Preview: Click Here
<script type="text/javascript">
<!--
var keep = 'yes'; //Keep the member group? 'yes' or 'no'
star = 'http://proboards8.com/images/star.gif'; //URL of the member star
rank = [];
rank[0]=['New Member',1,0];
rank[1]=['Junior Member',2,50];
rank[2]=['Full Member',3,100];
rank[3]=['Senior Member',4,250];
rank[4]=['God',5,500];
td = document.getElementsByTagName("td");
for(i=0; i<td.length; i++)
{
if(td.width == '20%' && td.innerHTML.match(/group/i) && td.parentNode.innerHTML.match(/Posts: (.+?)</))
{
posts = parseInt(RegExp.$1.replace(/,/g,''));
newRank = document.createElement('div');
for(r=rank.length-1; r>=0; r--)
{
if(posts > rank[r][2])
{
newRank.appendChild(document.createElement('br'));
newRank.appendChild(document.createTextNode(rank[r][0]));
newRank.appendChild(document.createElement('br'));
for(z=0; z<rank[r][1]; z++)
{
newRank.appendChild(document.createElement('img'));
newRank.lastChild.src = star;
}
newRank.appendChild(document.createElement('br'));
break;
}
}
if(keep.toLowerCase() == 'no')
{
td.innerHTML = td.innerHTML.replace(/<br>(.+?)<br><img(.+?)<br>/i,newRank.innerHTML)
}
else
{
td.innerHTML = td.innerHTML.replace(/<br><img(.+?)<br>/i,'<br><img$1' +newRank.innerHTML)
}
}
}
//-->
</script>
Edit the stuff in red, following the comments. Then, edit the ranks in purple. Following this layout:
rank[1]=['Rank Name',2,50];
Green - This number needs to always be one greater than the previous number.
Blue - Rank Name
Orange - Number of Stars for this rank
Red - Number of posts required to reach this rank
Make sure that the ranks keep in this order, the one with the highest number of posts at the bottom.
What this does is either replaces a staff members member group with the equivalent rank or adds the equivalent rank to the profile.
Preview: Click Here
<script type="text/javascript">
<!--
var keep = 'yes'; //Keep the member group? 'yes' or 'no'
star = 'http://proboards8.com/images/star.gif'; //URL of the member star
rank = [];
rank[0]=['New Member',1,0];
rank[1]=['Junior Member',2,50];
rank[2]=['Full Member',3,100];
rank[3]=['Senior Member',4,250];
rank[4]=['God',5,500];
td = document.getElementsByTagName("td");
for(i=0; i<td.length; i++)
{
if(td.width == '20%' && td.innerHTML.match(/group/i) && td.parentNode.innerHTML.match(/Posts: (.+?)</))
{
posts = parseInt(RegExp.$1.replace(/,/g,''));
newRank = document.createElement('div');
for(r=rank.length-1; r>=0; r--)
{
if(posts > rank[r][2])
{
newRank.appendChild(document.createElement('br'));
newRank.appendChild(document.createTextNode(rank[r][0]));
newRank.appendChild(document.createElement('br'));
for(z=0; z<rank[r][1]; z++)
{
newRank.appendChild(document.createElement('img'));
newRank.lastChild.src = star;
}
newRank.appendChild(document.createElement('br'));
break;
}
}
if(keep.toLowerCase() == 'no')
{
td.innerHTML = td.innerHTML.replace(/<br>(.+?)<br><img(.+?)<br>/i,newRank.innerHTML)
}
else
{
td.innerHTML = td.innerHTML.replace(/<br><img(.+?)<br>/i,'<br><img$1' +newRank.innerHTML)
}
}
}
//-->
</script>
Edit the stuff in red, following the comments. Then, edit the ranks in purple. Following this layout:
rank[1]=['Rank Name',2,50];
Green - This number needs to always be one greater than the previous number.
Blue - Rank Name
Orange - Number of Stars for this rank
Red - Number of posts required to reach this rank
Make sure that the ranks keep in this order, the one with the highest number of posts at the bottom.