jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 7, 2007 7:46:28 GMT -8
I need this Code to be Non-Conpatable with Codes. When I Type this: [size=1]Hello everyone![/size] I want it to be considered 2 Words, but the code considers it 4 Words. (size=1 and /size) Can someone make it so that the Word Counter is not Compatable with ANYTHING in "[ ]" marks? I would be very Happy if so. Thanks in Advance!
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 8, 2007 5:17:24 GMT -8
bump. This is about 24 hours. It's 23 Hours, but I'm leaving in about 1/2 hour.... Sorry.
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 10, 2007 5:39:22 GMT -8
bump
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 11, 2007 3:59:16 GMT -8
I'm early. Bump. and hour. I'll be gone in a nhour.
BUMP!
Please?
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 12, 2007 4:53:54 GMT -8
bump.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Dec 12, 2007 20:41:53 GMT -8
Try that---haven't thoroughly tested it but it should ignore all standard ubbc tags
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 13, 2007 5:18:21 GMT -8
Thanks! I'll test it out!
Is it possible just to have it on one boards footer?
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Dec 13, 2007 9:45:28 GMT -8
yes
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 13, 2007 11:22:35 GMT -8
It doesn't work. All it does is put all that wording on the bottom of the page.
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Dec 13, 2007 19:46:02 GMT -8
<script type="text/javascript"> <!-- code goes here //--> </script>
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 14, 2007 4:34:37 GMT -8
<script type="text/javascript"> <!-- /* Posting/PM Word Count - created by Eton Bones SELECTIVE BOARDS VERSION GLOBAL FOOTER */
/* OPTIONAL For each board you want a minimum word count limit on add boardID and minimum word allowed to post on that board (example next line) rpboardid:200, <-- board with ID rpboardid will have a 200 word minimum post Each boardID and limit gets it own line and should have a comma at the end of the line unless it is the last or only line. If you wish to apply one limit to all boards not specifically given a limit then use "all" (no quotes) as the boardID */ var wordCountLimit={ /*=====start examples===== rpboardid:200, <-- board with ID rpboardid will have a 200 word minimum post all:100 <-- all boards except rpboardid will have a 100 word minimum =====end examples=====*/ } var re_UBBC=/\[\/?(glow|shadow|move|(?:block)?quote|url|ftp|img|email|table|tr|td|sup|sub|tt|code|list|\*|noubbc|link|pre|b|i|u|s)(?:[=\s]?[^\]]*?)?\]/gim if(document.getElementsByName('message').length){ var __submitBtn,__wc,__msg,__wcl var __boardID=""; __msg=document.getElementsByName('message')[0]; __submitBtn=document.getElementsByTagName('input'); for(var count=0;count<__submitBtn.length;count++){ if(__submitBtn[count].name=="board")__boardID=__submitBtn[count].value; if(__submitBtn[count].accessKey && __submitBtn[count].accessKey=='s'){__submitBtn=__submitBtn[count];break;} } if(typeof(__submitBtn.length)=="undefined"){ __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.replace(re_UBBC,'').match(/\b\w+\b/g); count=(count)?count.length:0; __wc.lastChild.innerHTML=count; __wcl=((__boardID.length && (__boardID in wordCountLimit))?wordCountLimit[__boardID]:(__boardID.length && ("all" in wordCountLimit))?wordCountLimit["all"]:0) if(count<__wcl){__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.replace(re_UBBC,'').match(/\b\w+\b/g); count=(count)?count.length:0; __wcl=((__boardID.length && (__boardID in wordCountLimit))?wordCountLimit[__boardID]:(__boardID.length && ("all" in wordCountLimit))?wordCountLimit["all"]:0) if(count<__wcl){__submitBtn.disabled=true;}else{__submitBtn.disabled=false} __wc.lastChild.innerHTML=count;
} //--> </script> I'll test it out.
Okay, it works!
1 Addition, again. Can you make it NOT take any image URL stuff? Example:
Hi! [url]www.proboards.com[/URL]
That would be considered 4. 1 for "Hi", 2 for "www", 3 for "proboards" and 4 "com".
Can you do that? I'm fine if not...
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Dec 14, 2007 13:53:42 GMT -8
Once again I haven't tested the impact this modification may make on the code's behavior, I only tested that the constructed regex works in both FF and IE...
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 14, 2007 14:04:18 GMT -8
I need to put the script java thing on it, right?
<script type="text/javascript"> <!-- /* Posting/PM Word Count - created by Eton Bones SELECTIVE BOARDS VERSION GLOBAL FOOTER */
/* OPTIONAL For each board you want a minimum word count limit on add boardID and minimum word allowed to post on that board (example next line) rpboardid:200, <-- board with ID rpboardid will have a 200 word minimum post Each boardID and limit gets it own line and should have a comma at the end of the line unless it is the last or only line. If you wish to apply one limit to all boards not specifically given a limit then use "all" (no quotes) as the boardID */ var wordCountLimit={ /*=====start examples===== rpboardid:200, <-- board with ID rpboardid will have a 200 word minimum post all:100 <-- all boards except rpboardid will have a 100 word minimum =====end examples=====*/ } var re_UBBC=/\[\/?(glow|shadow|move|(?:block)?quote|url|ftp|img|email|table|tr|td|sup|sub|tt|code|list|\*|noubbc|link|pre|b|i|u|s)(?:[=\s]?[^\]]*?)?\]/gim if(document.getElementsByName('message').length){ var __submitBtn,__wc,__msg,__wcl var __boardID=""; __msg=document.getElementsByName('message')[0]; __submitBtn=document.getElementsByTagName('input'); for(var count=0;count<__submitBtn.length;count++){ if(__submitBtn[count].name=="board")__boardID=__submitBtn[count].value; if(__submitBtn[count].accessKey && __submitBtn[count].accessKey=='s'){__submitBtn=__submitBtn[count];break;} } if(typeof(__submitBtn.length)=="undefined"){ __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.replace(re_UBBC,'').replace(/((ht|f)tp\:\/\/)?(www\.)?(\w+\.){1 ,}(com|edu|org|tv|info)(\/[^/]+)*/,'').match(/\b\w+\b/g); count=(count)?count.length:0; __wc.lastChild.innerHTML=count; __wcl=((__boardID.length && (__boardID in wordCountLimit))?wordCountLimit[__boardID]:(__boardID.length && ("all" in wordCountLimit))?wordCountLimit["all"]:0) if(count<__wcl){__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.replace(re_UBBC,'').replace(/((ht|f)tp\:\/\/)?(www\.)?(\w+\.){1,}(com|edu|org|tv|info)(\/[^/]+)*/,'').match(/\b\w+\b/g); count=(count)?count.length:0; __wcl=((__boardID.length && (__boardID in wordCountLimit))?wordCountLimit[__boardID]:(__boardID.length && ("all" in wordCountLimit))?wordCountLimit["all"]:0) if(count<__wcl){__submitBtn.disabled=true;}else{__submitBtn.disabled=false} __wc.lastChild.innerHTML=count;
} //--> </script>
Correct?
|
|
inherit
Official Code Helper
65613
0
1
Apr 15, 2024 17:01:41 GMT -8
Chris
"'Oops' is the sound we make when we improve"
8,858
December 2005
horace
|
Post by Chris on Dec 14, 2007 16:41:36 GMT -8
Correct. Any script you put directly in your header/footer need to be wrapped in script tags if you want the browser to execute it.
|
|
jack-attack
Junior Member
See you at Studio Zero!
Posts: 248
inherit
115040
0
Feb 18, 2008 11:02:32 GMT -8
jack-attack
See you at Studio Zero!
248
November 2007
backboy
|
Post by jack-attack on Dec 19, 2007 6:04:01 GMT -8
Okay, prefect, thanks, but one more addition.
Can you have this code on the bottom of a post, write "WC: ###" (Word Count: Whatever Number)
Thanks, so much Eton.
|
|