|
Author | Topic: Word counter (Read 96 times) |
darkangel Guest
|  | Word counter « Thread Started on Apr 15, 2008, 6:01pm » | |
Can you add a word counter? It makes it easier to post when you see how many words you have.
| |
|
Daphne Greengrass Slytherin
     5th Year member is offline
![[avatar]](http://i220.photobucket.com/albums/dd310/Dreaming_in_Blue/Celebs/Sexy_Elisha_Cuthbert_167-1.jpg)
Why don't you kiss this; and I don't mean on my rosy red lips
Joined: Apr 2008 Gender: Female  Posts: 15 Karma: 0 |  | Re: Word counter « Reply #1 on Apr 15, 2008, 9:23pm » | |
Well I was bored, so I found the code for you, just in case. It goes in to your Global Footer =]
Code:<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.postForm && document.postForm.message){ var __submitBtn,__wc,__msg __msg=document.postForm.message; __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){__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>
|
|
|
![[image]](http://i226.photobucket.com/albums/dd48/slayer202/Daph.png) |
|
Hermione Granger Gryffindor
     Prefect 5th Year member is offline
![[avatar]](http://i46.photobucket.com/albums/f134/johoar/hermioneavi.jpg)
Joined: Apr 2008 Posts: 22 Karma: 1 |  | Re: Word counter « Reply #2 on Apr 15, 2008, 9:26pm » | |
If you use word it's also a lot easier. There's a word count there, automatic spell check and after a while you know where to aim to get say 400 words or something.
|
![[image]](http://i46.photobucket.com/albums/f134/johoar/hermione.jpg)
I will follow you Into the Dark |
|
Daphne Greengrass Slytherin
     5th Year member is offline
![[avatar]](http://i220.photobucket.com/albums/dd310/Dreaming_in_Blue/Celebs/Sexy_Elisha_Cuthbert_167-1.jpg)
Why don't you kiss this; and I don't mean on my rosy red lips
Joined: Apr 2008 Gender: Female  Posts: 15 Karma: 0 |  | Re: Word counter « Reply #3 on Apr 15, 2008, 9:31pm » | |
I personally don't have Word - if I want to know how many words something is I have to count it by hand =/
|
![[image]](http://i226.photobucket.com/albums/dd48/slayer202/Daph.png) |
|
Hermione Granger Gryffindor
     Prefect 5th Year member is offline
![[avatar]](http://i46.photobucket.com/albums/f134/johoar/hermioneavi.jpg)
Joined: Apr 2008 Posts: 22 Karma: 1 |  | Re: Word counter « Reply #4 on Apr 15, 2008, 10:05pm » | |
Really?? I thought all computers these days have wordcount. Well on here if you press reply and if you fill the whole box once it's 150 words generally. So if you fill it say three times you have aroung 450 words.
|
![[image]](http://i46.photobucket.com/albums/f134/johoar/hermione.jpg)
I will follow you Into the Dark |
|
Bellatrix Lestrange Death Eater
     member is offline
![[avatar]](http://i208.photobucket.com/albums/bb307/Bellatrixje/Helena%20Bonham%20Carter/018fk0.jpg)
I'm gunna make you into a pie ok?
Joined: Apr 2008 Gender: Female  Posts: 60 Location: Under a rock somewhere Karma: 1 |  | Re: Word counter « Reply #5 on Apr 16, 2008, 6:22am » | |
Hey if you go online to good and search for
"Online word counter."
they'll be websites where all you have to do is copy and paste everything that you've written and it'll count the words in like seconds ^_^.
I use it for drama essays *shifty*
|
![[image]](http://i229.photobucket.com/albums/ee314/coley98/Bellatrix-4.jpg) Support a good cause |
|
Daphne Greengrass Slytherin
     5th Year member is offline
![[avatar]](http://i220.photobucket.com/albums/dd310/Dreaming_in_Blue/Celebs/Sexy_Elisha_Cuthbert_167-1.jpg)
Why don't you kiss this; and I don't mean on my rosy red lips
Joined: Apr 2008 Gender: Female  Posts: 15 Karma: 0 |  | Re: Word counter « Reply #6 on Apr 16, 2008, 7:19am » | |
Really? Ooooh, I'll have to look that in to that - thank you =]
|
![[image]](http://i226.photobucket.com/albums/dd48/slayer202/Daph.png) |
|
Bellatrix Lestrange Death Eater
     member is offline
![[avatar]](http://i208.photobucket.com/albums/bb307/Bellatrixje/Helena%20Bonham%20Carter/018fk0.jpg)
I'm gunna make you into a pie ok?
Joined: Apr 2008 Gender: Female  Posts: 60 Location: Under a rock somewhere Karma: 1 | |
Ofelia Cruz Administrator
     DADA Professor Ravenclaw HOH Death Eater member is offline
![[avatar]](http://i226.photobucket.com/albums/dd48/slayer202/katev-1.png)
Spanish Flower
Joined: Apr 2008 Gender: Female  Posts: 120 Karma: 2 |  | Re: Word counter « Reply #8 on Apr 16, 2008, 11:50am » | |
There you go, I added the code for you guys.
|
![[image]](http://i226.photobucket.com/albums/dd48/slayer202/deltaddf-1.png)
![[image]](http://www.wizardrockumentary.com/sitebuildercontent/sitebuilderpictures/largebanner.gif)
|
|
|