Post by Ross on Aug 15, 2005 10:46:16 GMT
Global Footer Similar to v1 of this code but the "edit" box automatically updates each time you edit the post. Should be no need to edit
<script type="text/javascript">
<!--
/* reason for edit - v2
by elindir http://101support.proboards43.com
do not redistribute or reproduce without permission */
if(document.title.match(/modify post/i) && document.postForm)
{
var mes=document.postForm.message;
var tr=mes.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("tr");
for(j=0;j<tr.length;j++)
if(tr[j].innerHTML.match(/Disable Smilies:/) && tr[j-1].innerHTML.match(/Message:/))
{
var editRow=mes.parentNode.parentNode.parentNode.parentNode.insertRow(j);
}
var desCell=editRow.insertCell(0);
desCell.innerHTML='<font size="2">Reason for Edit:</font>';
desCell.className="windowbg";
var editCell=editRow.insertCell(1);
editCell.className="windowbg";
editCell.innerHTML='<input type="text" name="edit" size="40" value="" />';
var input=document.getElementsByTagName("input");
for(r=0;r<input.length;r++)
if(input[r].name=="edit"){
iedit=input[r];
}
var check=/Reason For Edit: (.+?)\[\/size\]/g
if(mes.value.match(check))
{
var theEdit=RegExp.$1;
iedit.value=theEdit;
mes.value=mes.value.replace('\[i\]\[size\=1\]Reason For Edit: '+theEdit+'\[\/size\]\[\/i\]','');
}
document.postForm.onsubmit=function()
{
if(iedit.value.match(/\w/))
{
document.postForm.message.value+='\n\n\[i\]\[size=1\]Reason For Edit: '+iedit.value+'\[\/size\]\[\/i\]';
return true;
}
}
}
//-->
</script>
Reason For Edit: To Test.....well I also I had to fix a bug
<script type="text/javascript">
<!--
/* reason for edit - v2
by elindir http://101support.proboards43.com
do not redistribute or reproduce without permission */
if(document.title.match(/modify post/i) && document.postForm)
{
var mes=document.postForm.message;
var tr=mes.parentNode.parentNode.parentNode.parentNode.getElementsByTagName("tr");
for(j=0;j<tr.length;j++)
if(tr[j].innerHTML.match(/Disable Smilies:/) && tr[j-1].innerHTML.match(/Message:/))
{
var editRow=mes.parentNode.parentNode.parentNode.parentNode.insertRow(j);
}
var desCell=editRow.insertCell(0);
desCell.innerHTML='<font size="2">Reason for Edit:</font>';
desCell.className="windowbg";
var editCell=editRow.insertCell(1);
editCell.className="windowbg";
editCell.innerHTML='<input type="text" name="edit" size="40" value="" />';
var input=document.getElementsByTagName("input");
for(r=0;r<input.length;r++)
if(input[r].name=="edit"){
iedit=input[r];
}
var check=/Reason For Edit: (.+?)\[\/size\]/g
if(mes.value.match(check))
{
var theEdit=RegExp.$1;
iedit.value=theEdit;
mes.value=mes.value.replace('\[i\]\[size\=1\]Reason For Edit: '+theEdit+'\[\/size\]\[\/i\]','');
}
document.postForm.onsubmit=function()
{
if(iedit.value.match(/\w/))
{
document.postForm.message.value+='\n\n\[i\]\[size=1\]Reason For Edit: '+iedit.value+'\[\/size\]\[\/i\]';
return true;
}
}
}
//-->
</script>
Reason For Edit: To Test.....well I also I had to fix a bug