Post by Peter on Oct 30, 2004 13:30:04 GMT
Code by Fla5hbash
NOTE TO EVERYONE:
I think I found what has been causing everyone's problems. Try using the code now.
Main Footers:
Board Footers:
Make sure your IP image is named "ip.gif," otherwise, this script won't work. There are ways around this, but it's easier to just rename your file.
for more info and previews:
www32.brinkster.com/fla5hba5h/webd/scripts/warninglevel.html
NOTE TO EVERYONE:
I think I found what has been causing everyone's problems. Try using the code now.
Main Footers:
<script>
// Warning Level v1.3 by Fla5hba5H
// Main Footers
// This code may be used as long as this message is fully intact. This code may not be re-posted without my permission.
// Exceptions:
// http://ssdesigns.proboards17.com, http://fla5hba5h.proboards19.com, http://www.fla5hba5h.tk
var defaultwarning="0"
if(location.href.match("action=viewprofile")||location.href.match("action=profile2")){
var level=defaultwarning,ls=document.links
for(l=0;l<ls.length;l++){
if(ls[l].href.match(/\?xxWarningLevel=/i)){
level=unescape(ls[l].href.split(/\?xxWarningLevel=/i)[1]);
ls[l].href=ls[l].href.split(/\?xx/i)[0]
}}
var ts=document.getElementsByTagName('table')
for(t=0;t<ts.length;t++){
for(r=0;r<ts[t].rows.length;r++){
if(ts[t].rows[r].innerHTML.match("Posts:")&&ts[t].rows[r].cells.length==2&&!ts[t].rows[r].cells[0].innerHTML.match("Name:")&&!done){
var a=ts[t].insertRow(r+1)
var b=a.insertCell()
b.innerHTML="<font size=2><b>Warning Level:</b></font>"
var c=a.insertCell()
c.innerHTML="<font size=2>"+level+"</font>"
var done=true
}}}}
if(location.href.match("action=profile")&&!location.href.match("action=profile2")){
var staff,ls=document.links,level=defaultwarning,inputs=document.getElementsByTagName("input")
for(l=0;l<ls.length;l++){
if (ls[l].href.match("action=admin")) staff="y"
}
for(i=0;i<inputs.length;i++) {
if(inputs[i].value.match(/\?xxWarningLevel=/i)){
level=unescape(inputs[i].value.split(/\?xxWarningLevel=/i)[1]);
inputs[i].value=inputs[i].value.split(/\?xxW/i)[0]
}}
if (staff=="y") {
var tables=document.getElementsByTagName("table")
for(x=0;x<tables.length;x++){
if (tables[x].innerHTML.match("Position:")&&!tables[x].innerHTML.match("Edit Profile")){
var a=tables[x].insertRow(6);
var s=a.insertCell();
s.innerHTML='<font size=2><b>Warning Level:</b></font><b'+'r><font size=1>Default level is "'+defaultwarning+'". Change in headers/footers.</font>'
var z=a.insertCell();
z.innerHTML='<input type=text name=warninglevel size=4 value="'+level+'">'
}}}
var f=document.creator
var wu=f.websiteurl
function appendwarning() {
if (wu.value.match(/\?xxWarningLevel=/i)) {wu.value=wu.value.split(/\?xxWarningLevel=/i)[0];alert("Don't hack the hack, you fool.")}
if (f.websitetitle.value==""||wu.value=="") {wu.value="http://about:blank";f.websitetitle.value="[ No Homepage ]"}
if (staff=="y") {wu.value+="?xxWarningLevel="+escape(f.warninglevel.value)}
if (staff!="y") {wu.value+="?xxWarningLevel="+escape(level)}
}
f.moda[0].onclick=appendwarning}
</script>
Board Footers:
<script>
// Warning Level v1.3 by Fla5hba5H
// Board Footers
// This code may be used as long as this message is fully intact. This code may not be re-posted without my permission.
// Exceptions:
// http://ssdesigns.proboards17.com, http://fla5hba5h.proboards19.com, http://www.fla5hba5h.tk
var defaultwarning="0",levelToDisplay=defaultwarning;
if(location.href.match("action=display"))
{
var tds = document.getElementsByTagName('td');
for (a=0;a<tds.length;a++)
{
if (tds[a].width=="20%") {
if(tds[a].innerHTML.match(/\?xxWarningLevel=/i)) {
levelToDisplay=unescape(tds[a].innerHTML.split(/\?xxWarningLevel=/i)[1].split(/"/i)[0])
tds[a].innerHTML=tds[a].innerHTML.replace("?xxWarningLevel="+levelToDisplay,"")}
}
if (tds[a].align=="right" && tds[a].innerHTML.match("ip.gif")) {
tds[a].innerHTML=tds[a].innerHTML.replace(/<img/i,"Warning Level: "+levelToDisplay+" || <img");levelToDisplay=defaultwarning;}}}
</script>
Make sure your IP image is named "ip.gif," otherwise, this script won't work. There are ways around this, but it's easier to just rename your file.
for more info and previews:
www32.brinkster.com/fla5hba5h/webd/scripts/warninglevel.html