Post by Ross on Sept 15, 2006 8:47:37 GMT
Global Footer
This will give members different ranks based on the gender selected in their profile. Members without a gender will use the default forum ranks. Edit the parts in bold for the male and female ranks where the number next to each is the number of posts required. Be careful of the commas, they should be after each rank apart from the last.
<script type="text/javascript">
<!--
/* ranks based on a users gender
coded by ross of
support.proboards.com
please do not repost */
var female_ranks = [
[0, "Female Rank Name 1"],
[50, "Female Rank Name 2"],
[100, "Female Rank Name 3"],
[250, "Female Rank Name 4"] // no comma on the last line
];
var male_ranks = [
[0, "Male Rank Name 1"],
[50, "Male Rank Name 2"],
[100, "Male Rank Name 3"],
[250, "Male Rank Name 4"] // no comma on the last line
];
// no need to edit below
var td = document.getElementsByTagName('td');
if(location.href.match(/ion=(display|search2|(user)?recent|(pm|calendar)?view)/i)) {
for(i=0; i<td.length; i++) {
if(td.item(i).width == '20%' && td.item(i).className.match(/^windowbg2?$/) && !td.item(i).innerHTML.match(/class="?group\d+/i) && td.item(i).innerHTML.match(/gender:\s(fe)?male/i)) {
var rank_arr = (RegExp.$1 == '')? male_ranks : female_ranks;
td.item(i).innerHTML.match(/Posts:\s((\d|,)+)(<|$)/);
var posts = parseInt(RegExp.$1.replace(/,/g, ''));
for(r=0; r<rank_arr.length; r++) {
if(rank_arr[r][0] > posts && r != 0) {
r--;
td.item(i).innerHTML = td.item(i).innerHTML.replace(/(<\/a><\/b><br>).+?(<br><img)/i, '$1'+rank_arr[r][1]+'$2');
break;
}
}
}
}
}
//-->
</script>
This will give members different ranks based on the gender selected in their profile. Members without a gender will use the default forum ranks. Edit the parts in bold for the male and female ranks where the number next to each is the number of posts required. Be careful of the commas, they should be after each rank apart from the last.
<script type="text/javascript">
<!--
/* ranks based on a users gender
coded by ross of
support.proboards.com
please do not repost */
var female_ranks = [
[0, "Female Rank Name 1"],
[50, "Female Rank Name 2"],
[100, "Female Rank Name 3"],
[250, "Female Rank Name 4"] // no comma on the last line
];
var male_ranks = [
[0, "Male Rank Name 1"],
[50, "Male Rank Name 2"],
[100, "Male Rank Name 3"],
[250, "Male Rank Name 4"] // no comma on the last line
];
// no need to edit below
var td = document.getElementsByTagName('td');
if(location.href.match(/ion=(display|search2|(user)?recent|(pm|calendar)?view)/i)) {
for(i=0; i<td.length; i++) {
if(td.item(i).width == '20%' && td.item(i).className.match(/^windowbg2?$/) && !td.item(i).innerHTML.match(/class="?group\d+/i) && td.item(i).innerHTML.match(/gender:\s(fe)?male/i)) {
var rank_arr = (RegExp.$1 == '')? male_ranks : female_ranks;
td.item(i).innerHTML.match(/Posts:\s((\d|,)+)(<|$)/);
var posts = parseInt(RegExp.$1.replace(/,/g, ''));
for(r=0; r<rank_arr.length; r++) {
if(rank_arr[r][0] > posts && r != 0) {
r--;
td.item(i).innerHTML = td.item(i).innerHTML.replace(/(<\/a><\/b><br>).+?(<br><img)/i, '$1'+rank_arr[r][1]+'$2');
break;
}
}
}
}
}
//-->
</script>