Post by Infinite on Sept 28, 2004 20:59:39 GMT
Script Name: Warning Level
Version: 1
Script Creator: Reverence/Infinite
Cross-Browser: Unknown
Compatability: Proboards Forums (Though it may work on other forum systems it has not been tested there.)
Features:
- Adjustable warning level in members' profiles.
- Staff can only modify warning levels.
- Members are able to view their warning level when editing their profile.
- Displays the members' warning level on the view-profile page.
- Option whether or not to display the warning level in the miniprofile.
Future Features:
- Warning expiration date.
- Reason for warning.
- Warning bar.
If you find any errors please let me know immediately. Thanks.
Script:
Main Footer:
Board Footers:
Editing the Script: To edit the board footer section of the script just put Y if you want the warning level to be displayed in the miniprofile and leave it blank if you don't want it to be displayed in the miniprofile.
Version: 1
Script Creator: Reverence/Infinite
Cross-Browser: Unknown
Compatability: Proboards Forums (Though it may work on other forum systems it has not been tested there.)
Features:
- Adjustable warning level in members' profiles.
- Staff can only modify warning levels.
- Members are able to view their warning level when editing their profile.
- Displays the members' warning level on the view-profile page.
- Option whether or not to display the warning level in the miniprofile.
Future Features:
- Warning expiration date.
- Reason for warning.
- Warning bar.
If you find any errors please let me know immediately. Thanks.
Script:
Main Footer:
<script>
//Warning Level Version 1 created By Reverence/Infinite.
//Copyright 2004-2005, All Rights Reserved.
//This code may not be reposted or edited without the creator's consent.
//This copyright must stay intact at all times.
//Main Footer.
var tTable=document.getElementsByTagName("Table")
for(r=0;r<tTable.length;r++){
var TD=document.getElementsByTagName("TD")
if(location.href.indexOf("action=profile&")!=-1){
if(tTable[r].width=="100%" && tTable[r].cellPadding=="3" && tTable[r].innerHTML.match("Time Offset:")){
if(!TD[5].innerHTML.match(/action=admin/i)){
var rRow=tTable[r].insertRow(4)
var NewCell=rRow.insertCell(0)
NewCell.innerHTML='<font size="2"><b>Warning Level:</b></font><br/><font size="1">Please input a warning level between 0-100%<br/>for misconduct on the forum.</font>'
sSection=rRow.insertCell()
sSection.innerHTML='<font size="2"><input type="text" name="warnlevel" size="6" value="" maxlength="4" disabled></font>'
var theText=document.creator.usertext.value;
var crush=theText.split("/--/");
if(document.creator.usertext.value.match("/--/")){
document.creator.usertext.value=document.creator.usertext.value + "/--/" + document.creator.warnlevel.value
document.creator.usertext.value=crush[0]
document.creator.warnlevel.value=crush[1]
}
document.creator.onsubmit=storeIt;
function storeIt(){
document.creator.usertext.value=document.creator.usertext.value + "/--/" + document.creator.warnlevel.value
}
}}
if(tTable[r].width=="100%" && tTable[r].cellPadding=="3" && tTable[r].innerHTML.match("Time Offset:")){
if(TD[5].innerHTML.match(/action=admin/i)){
var rRow=tTable[r].insertRow(4)
var NewCell=rRow.insertCell(0)
NewCell.innerHTML='<font size="2"><b>Warning Level:</b></font><br/><font size="1">Please input a warning level between 0-100%<br/>for misconduct on the forum.</font>'
sSection=rRow.insertCell()
sSection.innerHTML='<font size="2"><input type="text" name="warnlevel" size="6" value="" maxlength="4"></font>'
var theText=document.creator.usertext.value;
var crush=theText.split("/--/");
if(document.creator.usertext.value.match("/--/")){
document.creator.usertext.value=document.creator.usertext.value + "/--/" + document.creator.warnlevel.value
document.creator.usertext.value=crush[0]
document.creator.warnlevel.value=crush[1]
}
document.creator.onsubmit=storeIt;
function storeIt(){
document.creator.usertext.value=document.creator.usertext.value + "/--/" + document.creator.warnlevel.value
}}}}}
var TD=document.getElementsByTagName("TD")
for(m=0;m<TD.length;m++){
if(location.href.indexOf("action=profile2")!=-1 || location.href.indexOf("action=viewprofile")!=-1){
if(TD[m].innerHTML.match("/--/") && TD[m].width=="30%"){
var itText=TD[m].innerHTML
var crush=itText.split("/--/");
var crush=crush[1].split("<B"+"R>");
TD[m].innerHTML=TD[m].innerHTML.replace("/--/"+crush[0],"")
var Table=document.getElementsByTagName("Table");
for(w=0;w<Table.length;w++){
if(Table[w].innerHTML.match("Name:") && Table[w].width=="100%"){
var TheRow=Table[w].insertRow(16);
var TheCell=TheRow.insertCell(0);
var TheCellB=TheRow.insertCell(1);
TheCell.innerHTML="<font size=2><b>Warning Level: </b></font>"
TheCellB.innerHTML="<font size=2>" + crush[0] + "</font>"
}}}}}
</script>
Board Footers:
<script>
//Warning Level Version 1 created By Reverence/Infinite.
//Copyright 2004-2005, All Rights Reserved.
//This code may not be reposted or edited without the creator's consent.
//This copyright must stay intact at all times.
//Board Footers.
//If you want the member's warning level to display in their miniprofile type Y.
var DisplayIt="Y"
var TD=document.getElementsByTagName("TD");
for(t=0;t<TD.length;t++){
if(DisplayIt=="Y"){
if(TD[t].innerHTML.match("/--/") && TD[t].width=="20%"){
var TheText=TD[t].innerHTML
var crush=TheText.split("/--/");
var crush=crush[1].split("<B"+"R>");
TD[t].innerHTML=TD[t].innerHTML.replace("/--/"+crush[0],"")
TD[t].innerHTML+="<center><font size=1><b>Warning Level: </b>" + crush[0] + "</font></center>"
}} else
if(TD[t].innerHTML.match("/--/") && TD[t].width=="20%"){
var TheText=TD[t].innerHTML
var crush=TheText.split("/--/");
var crush=crush[1].split("<B"+"R>");
TD[t].innerHTML=TD[t].innerHTML.replace("/--/"+crush[0],"")
}}
</script>
Editing the Script: To edit the board footer section of the script just put Y if you want the warning level to be displayed in the miniprofile and leave it blank if you don't want it to be displayed in the miniprofile.