Post by Todge on Mar 2, 2008 10:03:06 GMT -8
This will add an extra signature box in your member's profiles that you can add to, which will then be added to the end of the member's signatures in their posts..
Use it as an awards system, warning system, whatever you wish..
Put it in your main Footer..
Edit this part of the code...
Edit the red parts with the USERNAMES of the staff members you want to have access to the extra signature box. You can add as many as you like, just separate them with the | symbol.
You will also need to add something to your censored words list..
Copy and paste this character into the left box..
§
And add what you want the separator to be that separates the member's signature from the note added by you..
eg. [hr]Admin's Note:[/hr]
Will give..
The code adds to your member's signature, so will take the extra sig box into consideration when working out the characters remaining...
Use it as an awards system, warning system, whatever you wish..
Put it in your main Footer..
<script type="text/javascript">
<!--
/*
Admin Note in member's signature by Todge.
Main Footer
Copyright © 2008
Please keep this header intact
*/
if(document.modifyForm)
{
// Edit below...
var mods = /^(admin|mod1|mod2|mod3)$/;
// Edit above...
var sig = document.modifyForm.signature;
var sigContent = sig.value;
if(pb_username.match(mods))
{
var sigTR = sig.parentNode.parentNode.parentNode;
var newTR = document.createElement('tr');
var newTD1 = document.createElement('td');
var newTD2 = document.createElement('td');
var newTD3 = document.createElement('td');
var newFont1 = document.createElement('font');
newFont1.setAttribute('size','-1');
newFont1.innerHTML = 'Admin Note:';
newTD1.vAlign = 'top';
var newFont3 = document.createElement('font');
newFont3.setAttribute('size','-2');
newFont3.innerHTML = "Anything you put here will be added to the end of this members signature. Please be aware that your note uses up the member's 'character count'. You can not use more than the available characters without editing the signature to make room first.";
newTD3.vAlign = 'top';
newTD1.appendChild(newFont1);
newTD3.appendChild(newFont3);
var newText = document.createElement('textarea');
newText.setAttribute('rows','5');
newText.setAttribute('cols','32');
newText.setAttribute('id','adminNote');
newTD2.appendChild(newText);
newTD2.vAlign = 'top';
newTR.appendChild(newTD1);
newTR.appendChild(newTD2);
newTR.appendChild(newTD3);
sigTR.parentNode.insertBefore(newTR,sigTR.nextSibling);
if(sigContent.match('§'))
{
sigContent = sigContent.split('§');
document.modifyForm.signature.value = sigContent[0];
document.getElementById('adminNote').value = sigContent[1];
}
document.modifyForm.signature.onchange = function(){
if((this.value.length+document.getElementById('adminNote').value.length+1) > 400) this.value=this.value.substring(0,(400-document.getElementById('adminNote').value.length-1));
document.modifyForm.sigLength.value=(400-(this.value.length+document.getElementById('adminNote').value.length+1));
}
document.modifyForm.signature.onkeyup = function(){
if((this.value.length+document.getElementById('adminNote').value.length+1) > 400) this.value=this.value.substring(0,(400-document.getElementById('adminNote').value.length-1));
document.modifyForm.sigLength.value=(400-(this.value.length+document.getElementById('adminNote').value.length+1));
}
document.getElementById('adminNote').onchange = function(){
if((this.value.length+document.modifyForm.signature.value.length+1) > 400) this.value=this.value.substring(0,(400-document.modifyForm.signature.value.length-1));
document.modifyForm.sigLength.value=(400-(this.value.length+document.modifyForm.signature.value.length+1));
}
document.getElementById('adminNote').onkeyup = function(){
if((this.value.length+document.modifyForm.signature.value.length+1) > 400) this.value=this.value.substring(0,(400-document.modifyForm.signature.value.length-1));
document.modifyForm.sigLength.value=(400-(this.value.length+document.modifyForm.signature.value.length+1));
}
document.modifyForm.nextaction.nextSibling.onclick = function(){
if(document.getElementById('adminNote').value.length > 0)
{
sig.value = sig.value+'§'+document.getElementById('adminNote').value;
}}}
else
{
if(sigContent.match('§'))
{
sigContent = sigContent.split('§');
document.modifyForm.signature.value = sigContent[0];
document.modifyForm.nextaction.nextSibling.onmousedown = function(){
sig.value = sig.value+'§'+sigContent[1];
}
document.modifyForm.signature.onchange = function(){
if((this.value.length+sigContent[1].length+1) > 400) this.value=this.value.substring(0,(400-sigContent[1].length-1));
document.modifyForm.sigLength.value=(400-(this.value.length+sigContent[1].length+1));
}
document.modifyForm.signature.onkeyup = function(){
if((this.value.length+sigContent[1].length+1) > 400) this.value=this.value.substring(0,(400-sigContent[1].length-1));
document.modifyForm.sigLength.value=(400-(this.value.length+sigContent[1].length+1));
}
sigTR.lastChild.innerHTML = sigTR.lastChild.innerHTML.replace('use a maximum of 400 characters.','only use a set amount of characters for your signature.');
}}}
// -->
</script>
Edit this part of the code...
var mods = /^(admin|mod1|mod2|mod3)$/;
Edit the red parts with the USERNAMES of the staff members you want to have access to the extra signature box. You can add as many as you like, just separate them with the | symbol.
You will also need to add something to your censored words list..
Copy and paste this character into the left box..
§
And add what you want the separator to be that separates the member's signature from the note added by you..
eg. [hr]Admin's Note:[/hr]
Will give..
Member's sig......
Admin's Note:
Blah blah blah...
The code adds to your member's signature, so will take the extra sig box into consideration when working out the characters remaining...