Post by Todge on Dec 16, 2007 6:29:42 GMT -8
This will give the main admin the option of leaving a note in other member's posts..
Put the code in your Global Footer, no editing is required.
All that has to be done is for the admin to 'modify' the offending post, in the posting page there should be another text box below the message box, just put your note in there and it will be added to the bottom of the post in bold, red letters..
Put the code in your Global Footer, no editing is required.
<script type="text/javascript">
<!--
/*
Admin Note in posts by Todge.
Global Footer
Copyright © 2007
Please keep this header intact
*/
if(document.postForm)
{
var postSplit = document.postForm.message.value.split(/adminnote:/);
document.postForm.message.value = postSplit[0];
if(location.href.match('"e=') && postSplit.length > 1){
document.postForm.message.value += '[/quote]';
}
if(postSplit.length > 1){
postSplit[1] = postSplit[1].split(/\[\/quote\]/i)[0];
var modify = document.getElementsByTagName('input')
for(m=0; m<modify.length; m++){
if(modify[m].value.match(/(Modify|Post|Preview)/))
{
modify[m].onmouseup = function(){document.postForm.message.value += '\nadminnote:'+postSplit[1];}
}}}}
if(document.postForm && location.href.match('modifypost') && pb_username == 'admin'){
var tr = document.createElement('tr');
var td1 = document.createElement('td');
var td2 = document.createElement('td');
var adminnote = document.createElement('textarea');
adminnote.name = 'adminnote';
adminnote.rows = '2';
adminnote.cols = '70';
td1.className = 'windowbg2';
td2.className = 'windowbg2';
td1.innerHTML = '<font size="2">Admin Note:</font>';
td2.appendChild(adminnote);
tr.appendChild(td1);
tr.appendChild(td2);
var adminNote = document.postForm.nosmiles.parentNode.parentNode;
adminNote.parentNode.insertBefore(tr,adminNote);
if(postSplit.length > 1){
adminnote.value = postSplit[1].split('Admin Note: ')[1].split('[/b')[0];
}
var modify = document.getElementsByTagName('input')
for(m=0; m<modify.length; m++){
if(modify[m].value.match(/(Modify Post|Preview)/)){
modify[m].onmouseup = function(){if(adminnote.value.length > 1){
document.postForm.message.value += '\n\nadminnote:[color=red][b]Admin Note: '+adminnote.value+'[/b][/color]';}}
}}}
if(location.href.match('action=display')){
var post = document.getElementsByTagName('font');
for(p=0; p<post.length; p++){
if(post[p].innerHTML.match('google_ad_section_end') && post[p].innerHTML.match('adminnote:')){
post[p].innerHTML = post[p].innerHTML.replace('adminnote:','');
}}}
// -->
</script>
All that has to be done is for the admin to 'modify' the offending post, in the posting page there should be another text box below the message box, just put your note in there and it will be added to the bottom of the post in bold, red letters..