Post by ⓦ৹₪deⓡ on Jan 22, 2006 23:30:42 GMT -8
This code will show who deleted a post for all posts deleted after this code was installed. Do NOT PM me for support or requests, that's what the coding boards are for. No editing required. Enjoy.
~Wonder
Global Footer
~Wonder
Global Footer
<script>
//Show Who Deleted Post v1.0
//Copyright 01-23-2005 ~Wonder
//May be reposted anywhere as long as this header remains in tact
//In loving memory of Tess, the best dog in the world. I'll miss you :'(
//Put in Global Footer
for(i=1;i<document.links.length;i++)
{
if(document.links[i].href.match(/javascript:doConfirm/) && document.links[i-1].href.match(/ion\=modifypost/))
document.links[i].href=document.links[i-1].href+"&deletereplace=1";
else if(location.href.match(/ion\=(modify)?post/) && document.links[i].href.match(/http\:\/\/\[del\:(.+)\]/))
document.links[i].parentNode.innerHTML="This post has been deleted by <a href=\"/index.cgi?action=viewprofile&user="+RegExp.$1+"\">"+RegExp.$1+"</a>.";
}
if(location.href.match(/action=(display|goto|viewprofile|pmview|recent|calendarview|search)/))
{
td=document.getElementsByTagName("td");
for(i=0;i<td.length;i++)
{
if(td[i].width=="20%" && td[i].className.match(/windowbg/))
{
if(td[i].nextSibling.firstChild.getElementsByTagName("b")[0].innerHTML.match(/^Deleted by (.+)/))
{
td[i].nextSibling.firstChild.style.display="none";
td[i].nextSibling.vAlign="middle";
c=document.createElement("center");
c.innerHTML="This post has been deleted by <a href=\"/index.cgi?action=viewprofile&user="+RegExp.$1+"\">"+RegExp.$1+"</a>.";
td[i].nextSibling.insertBefore(c,td[i].nextSibling.firstChild);
}
}
}
}
if(location.href.match(/deletereplace\=1/))
{
document.postForm.parentNode.getElementsByTagName("b")[0].innerHTML="Are you sure you want to delete this post?";
tr=document.postForm.parentNode.getElementsByTagName("table")[0].getElementsByTagName("tr");
for(i=1;i<tr.length;i++)
{
tr[i].style.display="none";
}
temprow=document.postForm.parentNode.getElementsByTagName("table")[0].insertRow(-1);
temp=temprow.insertCell(0);
temp.bgColor=tr[1].getElementsByTagName("td")[0].bgColor;
temp.colSpan=2;
temp.innerHTML="<input type=button onclick=\"deletePost()\" value=\"Yes\"> <input type=button onClick=\"history.go(-1)\" value=\"No\">";
}
function deletePost()
{
document.postForm.subject.value="Deleted by "+pb_username;
document.postForm.message.value+="[url]http://[del:"+pb_username+"][/url]";
document.postForm.submit();
}
</script>