Post by Michael on Aug 5, 2008 15:48:54 GMT -8
This code will allow you to stop members counting as staff in the info center. Useful if you make just one member a mod of a board, but not in the staff group. (done as a request)
<script>
/*Member doesn't count as staff
Created By Wrighty
Do Not: Rip, Repost or Claim*/
if(location.href.match(/action=home/) | !location.href.match(/action/)){
var list = /&user=(someone)/i
var d = document.getElementsByTagName('td');
for(a=0;a<d.length;a++){
if(d.className == 'windowbg' && d.firstChild.alt == 'online'){
for(z=0;z<d[a+1].getElementsByTagName('a').length;z++){
if(d[a+1].getElementsByTagName('a')[z].href.match(/user=/) && d[a+1].getElementsByTagName('a')[z].href.match(list)){
if(d[a+1].getElementsByTagName('td')[0].innerHTML.match(/>(.+?)\sStaff\sMember(s)?,/)){
if(RegExp.$2 == ''){
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(/>(.+?)\sStaff\sMember(s)?,\s/, '>');
}else{
var x = RegExp.$1.replace(/,/,'');
var n = parseInt(x - 1);
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$1 + ' Staff'), n + ' Staff');
}
}
if(d[a+1].getElementsByTagName('td')[0].innerHTML.match(/>((.+?)\sStaff\sMember(s)?, )?(.+?)\sMember(s)?,/)){
var x = RegExp.$4.replace(/,/,'');
var n =parseInt(x) + parseInt(1);
if(RegExp.$4 == '0'){
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$4 + ' Members'), n + ' Member');
}else if(RegExp.$4 == '1'){
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$4 + ' Member'), n + ' Members');
}else{
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$4 + ' Member'), n + ' Member');
}
}
}
}
}
}
}
</script>
Main Footer
--
edit: var list = /&user=(someone)/i
to add another user: var list = /&user=(someone|someone2)/i
13th July 2010: - Modified list RexEx to refine match.
<script>
/*Member doesn't count as staff
Created By Wrighty
Do Not: Rip, Repost or Claim*/
if(location.href.match(/action=home/) | !location.href.match(/action/)){
var list = /&user=(someone)/i
var d = document.getElementsByTagName('td');
for(a=0;a<d.length;a++){
if(d.className == 'windowbg' && d.firstChild.alt == 'online'){
for(z=0;z<d[a+1].getElementsByTagName('a').length;z++){
if(d[a+1].getElementsByTagName('a')[z].href.match(/user=/) && d[a+1].getElementsByTagName('a')[z].href.match(list)){
if(d[a+1].getElementsByTagName('td')[0].innerHTML.match(/>(.+?)\sStaff\sMember(s)?,/)){
if(RegExp.$2 == ''){
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(/>(.+?)\sStaff\sMember(s)?,\s/, '>');
}else{
var x = RegExp.$1.replace(/,/,'');
var n = parseInt(x - 1);
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$1 + ' Staff'), n + ' Staff');
}
}
if(d[a+1].getElementsByTagName('td')[0].innerHTML.match(/>((.+?)\sStaff\sMember(s)?, )?(.+?)\sMember(s)?,/)){
var x = RegExp.$4.replace(/,/,'');
var n =parseInt(x) + parseInt(1);
if(RegExp.$4 == '0'){
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$4 + ' Members'), n + ' Member');
}else if(RegExp.$4 == '1'){
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$4 + ' Member'), n + ' Members');
}else{
d[a+1].getElementsByTagName('td')[0].innerHTML = d[a+1].getElementsByTagName('td')[0].innerHTML.replace(new RegExp(RegExp.$4 + ' Member'), n + ' Member');
}
}
}
}
}
}
}
</script>
Main Footer
--
edit: var list = /&user=(someone)/i
to add another user: var list = /&user=(someone|someone2)/i
13th July 2010: - Modified list RexEx to refine match.