Post by skepsis on May 1, 2007 19:37:10 GMT -8
Forum URL: vardenera.proboards47.com
Example URL: vardenera.proboards47.com/index.cgi?action=viewprofile&user=saphira
Description: I want to be able to have the rank of each member displayed under their username even when they are in a group. I have already added the script from: support.proboards.com/index.cgi?board=codedatabase&action=display&n=1&thread=70395
and that only displays the rank for the moderators on my board. I have some groups that aren't staff, just groups, and it doesn't display their rank. It just says the name of their group. If you look at the url example, you will see that the rank is not displayed under a normal member's username - just their group. Please help.
Experienced By: Some of my members
Code URL: support.proboards.com/index.cgi?board=codedatabase&action=display&n=1&thread=70395
Web Browser: Mozilla Firefox
Code:
Example URL: vardenera.proboards47.com/index.cgi?action=viewprofile&user=saphira
Description: I want to be able to have the rank of each member displayed under their username even when they are in a group. I have already added the script from: support.proboards.com/index.cgi?board=codedatabase&action=display&n=1&thread=70395
and that only displays the rank for the moderators on my board. I have some groups that aren't staff, just groups, and it doesn't display their rank. It just says the name of their group. If you look at the url example, you will see that the rank is not displayed under a normal member's username - just their group. Please help.
Experienced By: Some of my members
Code URL: support.proboards.com/index.cgi?board=codedatabase&action=display&n=1&thread=70395
Web Browser: Mozilla Firefox
Code:
<script type="text/javascript">
<!--
/* staff have normal ranks - ross */
var keep = 'yes'; //
star = 'http://s2.images.proboards.com/star.gif';
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[i].width == '20%' && td[i].innerHTML.match(/group/i) && td[i].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[i].innerHTML = td[i].innerHTML.replace(/<br>(.+?)<br><img(.+?)<br>/i,newRank.innerHTML)
}
else
{
td[i].innerHTML = td[i].innerHTML.replace(/<br><img(.+?)<br>/i,'<br><img$1' +newRank.innerHTML)
}
}
}
//-->
</script>