Post by Peter on Oct 30, 2004 14:53:23 GMT
Code by Uchiha Sasuke
alright, this is a code i made, which will give all yours users a warning level, and money in there miny profile, and post profile
Features:
Money editable in profile
Warning Level editable in profile
Choose Money Name
Give Reason for giving warning, and tell who is was given by
DEBUGGED
Directions:
just insert the first code into your main footers, and then insert the second code into all board footers
more directions below:
MAIN FOOTER
BOARD FOOTERS
ok, now, it isn't very hard, just for one, edit the red parts in the code's above
now, to edit the money and/or warning level, just go into a users profile, and go to the bottom, where you will find a few extra inboxes at the end, as shown in the image here
the first, in the green box, is for the money, if you want to edit this members money, just select wether you want to add or subtract money, then put how much in the next box after it
the second, in the red box, this is that members warning level, this can be edited to what ever number you want,
the third, in the blue box, you can give your reason and your name in the two boxes under it for why you gave the warning
More Previews:
members.lycos.co.uk/dragoondeathblade/SSD/miniprofileshot.gif
members.lycos.co.uk/dragoondeathblade/SSD/postshot.gif
alright, this is a code i made, which will give all yours users a warning level, and money in there miny profile, and post profile
Features:
Money editable in profile
Warning Level editable in profile
Choose Money Name
Give Reason for giving warning, and tell who is was given by
DEBUGGED
Directions:
just insert the first code into your main footers, and then insert the second code into all board footers
more directions below:
MAIN FOOTER
<script>
/*
Warning Level and Money (editable in profile)
coded by NCGI (Uchiha Sasuke)
This code may not be reposted or otherwise without express permission from the maker (Uchiha Sasuke)
*/
//This is by how much the posts will be multiplied for the money
MultiplyBy = "2"
//This is the Name of the money
MoneyName = "Money"
//This is the sign that'll be next to the code
MoneySign = "$"
iTable = document.getElementsByTagName('table')
TD = document.getElementsByTagName('td')
for (z=0;z<iTable.length;z++) {
for (x=0;x<iTable[z].rows.length;x++) {
if (TD[5].innerHTML.match(/action=admin/)) {memberstatus = "staff"}
else {memberstatus = "member"}
function removeMoney() {
if (document.creator.websiteurl.value.match(/\?warning=(\d+)\?/i)) {
wl = RegExp.$1; document.creator.warning.value = wl}
else {wl = "0"}
if (document.creator.websiteurl.value.match(/\?reason=(.+?)\?/i)) {
wr = RegExp.$1;}
else {wr = "For Bad Behavior"}
if (document.creator.websiteurl.value.match(/\?reason=Distributed By: (.+?)<br\/>(.+?)\?/i)) {document.creator.dby.value = RegExp.$1; document.creator.reason.value = RegExp.$2}
if (document.creator.websiteurl.value.match(/\?schange=(\d+)\?achange=(\d+)\?/i)) {subamount = RegExp.$1; addamount = RegExp.$2;
document.creator.schange.value = subamount;
document.creator.achange.value = addamount
replacer='?schange='+subamount+'?achange='+addamount+'?warning='+wl+'?reason='+wr+'?'
document.creator.websiteurl.value = document.creator.websiteurl.value.replace(replacer,''); removeMoney()}
}
function SpecialMoney() {
selectv = document.creator.method.options[document.creator.method.selectedIndex].value
amount = document.creator.camount.value
if (selectv == "-") {document.creator.schange.value = Math.floor(document.creator.schange.value)+Math.floor(amount)}
else {document.creator.achange.value = Math.floor(document.creator.achange.value)+Math.floor(amount)}
}
function doMoney() {
removeMoney()
SpecialMoney()
if (document.creator.websiteurl.value=="") {
if (location.href.match(/(.+?)action=/i)) {
document.creator.websitetitle.value = "Home"
document.creator.websiteurl.value = RegExp.$1}}
document.creator.warningfinal.value='Distributed By: '+document.creator.dby.value+'<br/>'+document.creator.reason.value;
if (document.creator.warning.value == "0") {document.creator.warningfinal.value = "This user has no warnings"}
document.creator.websiteurl.value+='?schange='+document.creator.schange.value+'?achange='+document.creator.achange.value+'?warning='+document.creator.warning.value+'?reason='+document.creator.warningfinal.value+'?'
}
if (location.href.indexOf('action=profile&') != -1) {
if (iTable[z].border=="0" && iTable[z].cellPadding=="3" && iTable[z].width=="100%" && iTable[z].rows[x].cells(0).innerHTML.match(/Signature:/i)) {
EditMoney = iTable[z].insertRow()
EditMoney.insertCell().innerHTML='<font size=2><b>'+MoneyName+':</b></font><br/>Please insert how much money you would like to add, or subtract from this users '+MoneyName
EditMoney.insertCell().innerHTML='<select name="method"><option name="add" value="+">Add<option name="subtract" value="-">Subtract</select><input type="hidden" name="schange" value="0"><input type="hidden" name="achange" value="0"> <input type="text" value="0" size="20" name="camount">'
WarningLevel = iTable[z].insertRow()
WarningLevel.insertCell().innerHTML = '<font size=2><b>Warning Level:</b></font><br/>This is where you can give this user a warning level'
WarningLevel.insertCell().innerHTML='<input type="text" name="warning" value="0" size="2">'
WarningReason = iTable[z].insertRow()
WarningReason.insertCell().innerHTML = '<font size=2><b>Warning Reason:</b></font><br/>This is where you can give your reason for giving this user a warning, it will be displayed in a pop up in a user click the "Reason: Click Here" link under the Warning Level'
WarningReason.insertCell().innerHTML='Distributed By: <input type="text" name="dby" value="Your Name"><br/>Reason For Warning: <input type="text" name="reason" value="For Bad Behavior"><input type="hidden" name="warningfinal">'
if (memberstatus == "member") {EditMoney.style.display = "none"; WarningLevel.style.display="none"; WarningReason.style.display="none"}
window.onload = removeMoney; document.creator.onsubmit = doMoney
}}}}
function DeleteFactors() {
for (a=0;a<TD.length;a++) {
if (TD.innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/gi)) {
returnurl = "?schange="+RegExp.$1+"?achange="+RegExp.$2+"?warning="+RegExp.$3+"?reason="+RegExp.$4+"?";
TD.innerHTML = TD.innerHTML.replace(returnurl,''); DeleteFactors()
}}}
if (location.href.indexOf('action=profile2') != -1 || location.href.indexOf('action=viewprofile') != -1) {
for (t=0;t<TD.length;t++) {
if (TD[t].width=="30%" && TD[t].className=="windowbg" && TD[t].align=="center" && TD[t].innerHTML.match(/Posts: (\d+)/gi)) {PostAmount = RegExp.$1
if (TD[t].innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/i)) {
asubamount=RegExp.$1; aaddamount=RegExp.$2; awl=RegExp.$3; awr=RegExp.$4;
MoneyAmount = Math.floor((PostAmount*MultiplyBy)-asubamount)+Math.floor(aaddamount)}
else {awl = "0"; awr = "This user has no warning";
MoneyAmount = Math.floor(PostAmount*MultiplyBy)}
AddMoney = 'Posts: '+PostAmount;
function reasonWin() {newwin = window.open("","reason","height=300,width=380")
newwin.document.write(awr)}
TD[t].innerHTML = TD[t].innerHTML.replace(AddMoney,AddMoney+'<br/>'+MoneyName+': '+MoneySign+MoneyAmount+'<br/>Warning Level: '+awl+'<br/><a href="javascript:reasonWin()">Reason: Click Here</a>')}}
for (y=0;y<iTable.length;y++) {
if (iTable[y].cellSpacing=="0" && iTable[y].cellPadding=="2" && iTable[y].width=="100%") {
FAddRow = iTable[y].insertRow(2)
FAddRow.insertCell().innerHTML='<font size="2"><b>'+MoneyName+':</b></font> '
FAddRow.insertCell().innerHTML='<font size="2">'+MoneySign+MoneyAmount+'</font>'
SAddRow = iTable[y].insertRow(3)
SAddRow.insertCell().innerHTML='<font size="2"><b>Warning Level:</b></font> '
SAddRow.insertCell().innerHTML='<font size="2">'+awl+'</font>'
TAddRow = iTable[y].insertRow(4)
TAddRow.insertCell().innerHTML='<font size="2"><b>Warning Reason:</b></font> '
TAddRow.insertCell().innerHTML='<font size="2">'+awr+'</font>'
}}
DeleteFactors()}
</script>
/*
Warning Level and Money (editable in profile)
coded by NCGI (Uchiha Sasuke)
This code may not be reposted or otherwise without express permission from the maker (Uchiha Sasuke)
*/
//This is by how much the posts will be multiplied for the money
MultiplyBy = "2"
//This is the Name of the money
MoneyName = "Money"
//This is the sign that'll be next to the code
MoneySign = "$"
iTable = document.getElementsByTagName('table')
TD = document.getElementsByTagName('td')
for (z=0;z<iTable.length;z++) {
for (x=0;x<iTable[z].rows.length;x++) {
if (TD[5].innerHTML.match(/action=admin/)) {memberstatus = "staff"}
else {memberstatus = "member"}
function removeMoney() {
if (document.creator.websiteurl.value.match(/\?warning=(\d+)\?/i)) {
wl = RegExp.$1; document.creator.warning.value = wl}
else {wl = "0"}
if (document.creator.websiteurl.value.match(/\?reason=(.+?)\?/i)) {
wr = RegExp.$1;}
else {wr = "For Bad Behavior"}
if (document.creator.websiteurl.value.match(/\?reason=Distributed By: (.+?)<br\/>(.+?)\?/i)) {document.creator.dby.value = RegExp.$1; document.creator.reason.value = RegExp.$2}
if (document.creator.websiteurl.value.match(/\?schange=(\d+)\?achange=(\d+)\?/i)) {subamount = RegExp.$1; addamount = RegExp.$2;
document.creator.schange.value = subamount;
document.creator.achange.value = addamount
replacer='?schange='+subamount+'?achange='+addamount+'?warning='+wl+'?reason='+wr+'?'
document.creator.websiteurl.value = document.creator.websiteurl.value.replace(replacer,''); removeMoney()}
}
function SpecialMoney() {
selectv = document.creator.method.options[document.creator.method.selectedIndex].value
amount = document.creator.camount.value
if (selectv == "-") {document.creator.schange.value = Math.floor(document.creator.schange.value)+Math.floor(amount)}
else {document.creator.achange.value = Math.floor(document.creator.achange.value)+Math.floor(amount)}
}
function doMoney() {
removeMoney()
SpecialMoney()
if (document.creator.websiteurl.value=="") {
if (location.href.match(/(.+?)action=/i)) {
document.creator.websitetitle.value = "Home"
document.creator.websiteurl.value = RegExp.$1}}
document.creator.warningfinal.value='Distributed By: '+document.creator.dby.value+'<br/>'+document.creator.reason.value;
if (document.creator.warning.value == "0") {document.creator.warningfinal.value = "This user has no warnings"}
document.creator.websiteurl.value+='?schange='+document.creator.schange.value+'?achange='+document.creator.achange.value+'?warning='+document.creator.warning.value+'?reason='+document.creator.warningfinal.value+'?'
}
if (location.href.indexOf('action=profile&') != -1) {
if (iTable[z].border=="0" && iTable[z].cellPadding=="3" && iTable[z].width=="100%" && iTable[z].rows[x].cells(0).innerHTML.match(/Signature:/i)) {
EditMoney = iTable[z].insertRow()
EditMoney.insertCell().innerHTML='<font size=2><b>'+MoneyName+':</b></font><br/>Please insert how much money you would like to add, or subtract from this users '+MoneyName
EditMoney.insertCell().innerHTML='<select name="method"><option name="add" value="+">Add<option name="subtract" value="-">Subtract</select><input type="hidden" name="schange" value="0"><input type="hidden" name="achange" value="0"> <input type="text" value="0" size="20" name="camount">'
WarningLevel = iTable[z].insertRow()
WarningLevel.insertCell().innerHTML = '<font size=2><b>Warning Level:</b></font><br/>This is where you can give this user a warning level'
WarningLevel.insertCell().innerHTML='<input type="text" name="warning" value="0" size="2">'
WarningReason = iTable[z].insertRow()
WarningReason.insertCell().innerHTML = '<font size=2><b>Warning Reason:</b></font><br/>This is where you can give your reason for giving this user a warning, it will be displayed in a pop up in a user click the "Reason: Click Here" link under the Warning Level'
WarningReason.insertCell().innerHTML='Distributed By: <input type="text" name="dby" value="Your Name"><br/>Reason For Warning: <input type="text" name="reason" value="For Bad Behavior"><input type="hidden" name="warningfinal">'
if (memberstatus == "member") {EditMoney.style.display = "none"; WarningLevel.style.display="none"; WarningReason.style.display="none"}
window.onload = removeMoney; document.creator.onsubmit = doMoney
}}}}
function DeleteFactors() {
for (a=0;a<TD.length;a++) {
if (TD.innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/gi)) {
returnurl = "?schange="+RegExp.$1+"?achange="+RegExp.$2+"?warning="+RegExp.$3+"?reason="+RegExp.$4+"?";
TD.innerHTML = TD.innerHTML.replace(returnurl,''); DeleteFactors()
}}}
if (location.href.indexOf('action=profile2') != -1 || location.href.indexOf('action=viewprofile') != -1) {
for (t=0;t<TD.length;t++) {
if (TD[t].width=="30%" && TD[t].className=="windowbg" && TD[t].align=="center" && TD[t].innerHTML.match(/Posts: (\d+)/gi)) {PostAmount = RegExp.$1
if (TD[t].innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/i)) {
asubamount=RegExp.$1; aaddamount=RegExp.$2; awl=RegExp.$3; awr=RegExp.$4;
MoneyAmount = Math.floor((PostAmount*MultiplyBy)-asubamount)+Math.floor(aaddamount)}
else {awl = "0"; awr = "This user has no warning";
MoneyAmount = Math.floor(PostAmount*MultiplyBy)}
AddMoney = 'Posts: '+PostAmount;
function reasonWin() {newwin = window.open("","reason","height=300,width=380")
newwin.document.write(awr)}
TD[t].innerHTML = TD[t].innerHTML.replace(AddMoney,AddMoney+'<br/>'+MoneyName+': '+MoneySign+MoneyAmount+'<br/>Warning Level: '+awl+'<br/><a href="javascript:reasonWin()">Reason: Click Here</a>')}}
for (y=0;y<iTable.length;y++) {
if (iTable[y].cellSpacing=="0" && iTable[y].cellPadding=="2" && iTable[y].width=="100%") {
FAddRow = iTable[y].insertRow(2)
FAddRow.insertCell().innerHTML='<font size="2"><b>'+MoneyName+':</b></font> '
FAddRow.insertCell().innerHTML='<font size="2">'+MoneySign+MoneyAmount+'</font>'
SAddRow = iTable[y].insertRow(3)
SAddRow.insertCell().innerHTML='<font size="2"><b>Warning Level:</b></font> '
SAddRow.insertCell().innerHTML='<font size="2">'+awl+'</font>'
TAddRow = iTable[y].insertRow(4)
TAddRow.insertCell().innerHTML='<font size="2"><b>Warning Reason:</b></font> '
TAddRow.insertCell().innerHTML='<font size="2">'+awr+'</font>'
}}
DeleteFactors()}
</script>
BOARD FOOTERS
<script>
/*
Warning Level and Money (editable in profile)
coded by NCGI (Uchiha Sasuke)
This code may not be reposted or otherwise without express permission from the maker (Uchiha Sasuke)
*/
//This is by how much the posts will be multiplied for the money
MultiplyBy = "2"
//This is the Name of the money
MoneyName = "Money"
//This is the sign that'll be next to the code
MoneySign = "$"
TD = document.getElementsByTagName('td')
for (t=0;t<TD.length;t++) {
if (TD[t].width=="20%" && TD[t].rowSpan=="2" && TD[t].innerHTML.match(/Posts: (\d+)/gi)) {PostAmount = RegExp.$1
if (TD[t].innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/gi)) {subamount = RegExp.$1; addamount = RegExp.$2;
wl = RegExp.$3; awr = RegExp.$4;
MoneyAmount = Math.floor((PostAmount*MultiplyBy)-subamount)+Math.floor(addamount)}
else {wl = "0"; awr = "This user has no warning";
MoneyAmount = Math.floor(PostAmount*MultiplyBy)}
AddMoney = 'Posts: '+PostAmount;
newwin = "window.open('','reason','height=300,width=380').document"
TD[t].innerHTML = TD[t].innerHTML.replace(AddMoney,AddMoney+'<br/>'+MoneyName+': '+MoneySign+MoneyAmount+'<br/>Warning Level: '+wl+'<br/><a href="javascript:'+newwin+'.write(\''+awr+'\')">Reason: Click Here</a>')
if (TD[t].innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/gi)) {
returnurl = "?schange="+RegExp.$1+"?achange="+RegExp.$2+"?warning="+RegExp.$3+"?reason="+RegExp.$4+"?"
TD[t].innerHTML = TD[t].innerHTML.replace(returnurl,'')
}}}
</script>
/*
Warning Level and Money (editable in profile)
coded by NCGI (Uchiha Sasuke)
This code may not be reposted or otherwise without express permission from the maker (Uchiha Sasuke)
*/
//This is by how much the posts will be multiplied for the money
MultiplyBy = "2"
//This is the Name of the money
MoneyName = "Money"
//This is the sign that'll be next to the code
MoneySign = "$"
TD = document.getElementsByTagName('td')
for (t=0;t<TD.length;t++) {
if (TD[t].width=="20%" && TD[t].rowSpan=="2" && TD[t].innerHTML.match(/Posts: (\d+)/gi)) {PostAmount = RegExp.$1
if (TD[t].innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/gi)) {subamount = RegExp.$1; addamount = RegExp.$2;
wl = RegExp.$3; awr = RegExp.$4;
MoneyAmount = Math.floor((PostAmount*MultiplyBy)-subamount)+Math.floor(addamount)}
else {wl = "0"; awr = "This user has no warning";
MoneyAmount = Math.floor(PostAmount*MultiplyBy)}
AddMoney = 'Posts: '+PostAmount;
newwin = "window.open('','reason','height=300,width=380').document"
TD[t].innerHTML = TD[t].innerHTML.replace(AddMoney,AddMoney+'<br/>'+MoneyName+': '+MoneySign+MoneyAmount+'<br/>Warning Level: '+wl+'<br/><a href="javascript:'+newwin+'.write(\''+awr+'\')">Reason: Click Here</a>')
if (TD[t].innerHTML.match(/\?schange=(\d+)\?achange=(\d+)\?warning=(\d+)\?reason=(.+?)\?/gi)) {
returnurl = "?schange="+RegExp.$1+"?achange="+RegExp.$2+"?warning="+RegExp.$3+"?reason="+RegExp.$4+"?"
TD[t].innerHTML = TD[t].innerHTML.replace(returnurl,'')
}}}
</script>
ok, now, it isn't very hard, just for one, edit the red parts in the code's above
now, to edit the money and/or warning level, just go into a users profile, and go to the bottom, where you will find a few extra inboxes at the end, as shown in the image here
the first, in the green box, is for the money, if you want to edit this members money, just select wether you want to add or subtract money, then put how much in the next box after it
the second, in the red box, this is that members warning level, this can be edited to what ever number you want,
the third, in the blue box, you can give your reason and your name in the two boxes under it for why you gave the warning
More Previews:
members.lycos.co.uk/dragoondeathblade/SSD/miniprofileshot.gif
members.lycos.co.uk/dragoondeathblade/SSD/postshot.gif