Post by Moose on Jun 16, 2006 10:26:03 GMT -8
Edit: Fixed A Bug
Just releasing codes I never released, not sure how many I want to release though. Anywho, this code prevents certain users from being moderated. Note: There are ways to get around this, as there is with pretty much any PB code.
Global Footer:
First thing to edit:
antimods[0] = "admin";
Okay so that prevents the admin from being moderated. You can remove that and to add more:
antimods[1] = "username";
antimods[2] = "username";
etc.
Now the user can still moderate themself. The next set of names allows the users to moderate anyone no matter who is prevented from being moderated:
ablemods[0] = "admin";
Allows the admin to moderate anyone.
To add more:
ablemods[1] = "username";
ablemods[2] = "username";
Enjoy.
Just releasing codes I never released, not sure how many I want to release though. Anywho, this code prevents certain users from being moderated. Note: There are ways to get around this, as there is with pretty much any PB code.
Global Footer:
<script type="text/javascript">
<!--
/*
Prevent Certain Users From Being Moderated
Coded By Moose
Don't repost or edit
*/
var antimods = new Array();
antimods[0] = "admin";
var ablemods = new Array();
ablemods[0] = "admin";
if(location.href.match(/board=/)){
var selfmodcheck = false;
for(a=0;a<antimods.length;a++){
if(antimods[a] == pb_username){
selfmodcheck = true;
break;
}}
if(selfmodcheck == false){
var provcheck = false;
for(e=0;e<ablemods.length;e++){
if(pb_username == ablemods[e]){
provcheck = true;
break;
}}
if(provcheck == false){
for(a=0;a<antimods.length;a++){
var td = document.getElementsByTagName('td');
for(t=0;t<td.length;t++){
if(td[t].className.match(/^windowbg/) && td[t].width == "5%" && td[t].align == "center" && td[t].getElementsByTagName('input')[0]){
if(td[t+4].getElementsByTagName('a')[0].href.match(new RegExp('user='+antimods[a][0]))){
document.getElementsByName('checkall')[0].disabled = true;
td[t].getElementsByTagName('input')[0].disabled = true;
}}}}}}}
if(location.href.match(/(action=display|recent|search=)/)){
var selfmodcheck = false;
for(a=0;a<antimods.length;a++){
if(antimods[a] == pb_username){
selfmodcheck = true;
break;
}}
if(selfmodcheck == false){
var provcheck = false;
for(e=0;e<ablemods.length;e++){
if(pb_username == ablemods[e]){
provcheck = true;
break;
}}
if(provcheck == false){
var firstcheck = true;
var amcheck = false;
for(a=0;a<antimods.length;a++){
var td = document.getElementsByTagName('td');
for(t=0;t<td.length;t++){
if(td[t].width == "20%" && td[t].className.match(/^windowbg/) && td[t].getElementsByTagName('b')[0] && td[t].getElementsByTagName('b')[0].getElementsByTagName('a')[0]){
if(firstcheck == true && td[t].getElementsByTagName('b')[0].getElementsByTagName('a')[0].href.match(new RegExp('user='+antimods[a][0]))){
amcheck = true;
break;
}
firstcheck = false;
amcheck = false;
}}
break;
}
for(t=0;t<td.length;t++){
if(td[t].width == "20%" && td[t].className.match(/^windowbg/) && td[t].getElementsByTagName('b')[0] && td[t].getElementsByTagName('b')[0].getElementsByTagName('a')[0] && td[t].getElementsByTagName('b')[0].getElementsByTagName('a')[0].href.match(new RegExp('user='+antimods[a][0]))){
var removeopps = td[t+1].getElementsByTagName('table')[0].getElementsByTagName('td')[2].firstChild;
var quote = removeopps.firstChild.cloneNode(true);
removeopps.innerHTML = '';
removeopps.appendChild(quote);
}}
if(amcheck == true){
for(t=0;t<td.length;t++){
if(td[t].vAlign == "middle" && td[t].align == "left" && td[t].width == "100%" && td[t].colSpan == "2" && td[t].getElementsByTagName('img')[0] && td[t].getElementsByTagName('img')[0].alt.match(/Admin Functions:/)){
td[t].parentNode.style.display = "none";
}}}}}}
//-->
</script>
First thing to edit:
var antimods = new Array();
antimods[0] = "admin";
antimods[0] = "admin";
Okay so that prevents the admin from being moderated. You can remove that and to add more:
antimods[1] = "username";
antimods[2] = "username";
etc.
Now the user can still moderate themself. The next set of names allows the users to moderate anyone no matter who is prevented from being moderated:
ablemods[0] = "admin";
Allows the admin to moderate anyone.
To add more:
ablemods[1] = "username";
ablemods[2] = "username";
Enjoy.