Cammie Skye``
SOPHOMORES•ADMIN[/Color][/B][/size]
POPULARS
Posts: 264
|
Post by Cammie Skye`` on Oct 7, 2008 19:14:18 GMT -5
Okay...I know I'm an Admin but I'm not sure how to do this. Is it possible to have like a tiny word count at the bottom on the Message?
|
|
|
Post by Bane Thompson on Oct 11, 2008 20:50:31 GMT -5
I made it my duty to find this (aka, I had nothing to do) put this code, which I found here in the Global Footer and that should put a word count in the quick replies AND the normal replies. I have tested this on another proboards forum I am on and assure you it works. <script type="text/javascript"> <!-- /* Posting/PM Word Count - created by Eton Bones */
//set to minimum word count needed in order to make a post //or set to 0 to disable word count enforcement. var wordCountLimit=0;
if(document.getElementsByName('message').length){ var __submitBtn,__wc,__msg __msg=document.getElementsByName('message')[0]; __submitBtn=document.getElementsByTagName('input'); for(var count=0;count<__submitBtn.length;count++){ if(__submitBtn[count].accessKey && __submitBtn[count].accessKey=='s'){__submitBtn=__submitBtn[count];break;} } if(typeof(__submitBtn.length)=="undefined"){ __btnText=__submitBtn.value; __wc=document.createElement('div'); __wc.id="wordcount"; __wc.appendChild(document.createTextNode('Word Count: ')); __wc.appendChild(document.createElement('span')); __submitBtn.parentNode.appendChild(__wc); count=__msg.value.match(/\b\w+\b/g); count=(count)?count.length:0; __wc.lastChild.innerHTML=count; if(count<wordCountLimit && !location.href.match(/ion=pmsend/)){__submitBtn.disabled=true;} if(document.addEventListener){ __msg.addEventListener("keyup",wordUp,false); __msg.addEventListener("input",wordUp,false); __msg.addEventListener("change",wordUp,false); }else if(document.attachEvent){ __msg.attachEvent("onpropertychange",wordUp); }else{ __msg.onkeyup=wordUp; __msg.onmouseup=wordUp; __msg.onchange=wordUp; } } }
function wordUp(event){ if(this.document){var thiss=event.srcElement;}else{var thiss=this;} var count=thiss.value.match(/\b\w+\b/g); count=(count)?count.length:0; if(count>=wordCountLimit && wordCountLimit >0 && __submitBtn.disabled){ __submitBtn.disabled=false; } __wc.lastChild.innerHTML=count;
} //--> </script>
|
|
|
Post by bethany on Oct 11, 2008 20:55:52 GMT -5
Thanks, Adding it now. [/size][/center]
|
|
|
Post by Bane Thompson on Oct 11, 2008 20:58:57 GMT -5
;D Welcome
|
|
Cammie Skye``
SOPHOMORES•ADMIN[/Color][/B][/size]
POPULARS
Posts: 264
|
Post by Cammie Skye`` on Oct 12, 2008 15:30:31 GMT -5
yay. thnxthnx <3 !
|
|