PDA

View Full Version : Show Thread Enhancements - Characters counter


tnguy3n
06-05-2004, 10:00 PM
JS textbox counter credits to Zach Evans (http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=4213&lngWId=2)

Template mods: 4
- editor_clientscript
- editor_toolbar_off
- editor_toolbar_standard
- showthread_quickreply

Installation Time: 5-10 mins (just find and replace mostly). :)

I have tested this in IE and Mozilla firefox , and use it on mah site too. See it in action here (http://www.all4actions.net)

-------------------
requested by Carter876 here (http://www.vbulletintemplates.com/mods/showthread.php?p=51323)

imported_chuanse
06-09-2004, 06:51 PM
So, does it also works in wysiwyg?
I guess not, since those templates are not to be edited for this mod :/

Carter876
06-12-2004, 02:16 PM
This hack counts the VB tags and the smile code (for esxample [b*][/b*])?

Regards

tnguy3n
06-13-2004, 05:56 AM
This hack counts the VB tags and the smile code (for esxample [b*][/b*])?

Regards
Unfortunately, it counts every input chars.

Carter876
06-13-2004, 10:37 AM
Uhm I think there is a bug :( , if I write my post and the characters count is under 5k all works fine, but when I paste a text from another post and the characters count is more than 5k the hack delete the characters in excess (and this is good :) ) but when I click on Preview button Vb say me that "The text that you have entered is too long (5030 characters). Please shorten it to 5000 characters long" but the characters counter say me that "Characters remaining are 2" :confused: :confused:


I think that this is a bug of characters counter that counts the characters in excess that the hack have been cancelled, tnguy3n what you think about it?

Regards

tnguy3n
06-13-2004, 10:55 AM
Uhm I think there is a bug :( , if I write my post and the characters count is under 5k all works fine, but when I paste a text from another post and the characters count is more than 5k the hack delete the characters in excess (and this is good :) ) but when I click on Preview button Vb say me that "The text that you have entered is too long (5030 characters). Please shorten it to 5000 characters long" but the characters counter say me that "Characters remaining are 2" :confused: :confused:


I think that this is a bug of characters counter that counts the characters in excess that the hack have been cancelled, tnguy3n what you think about it?

Regards
I guess there's a little inaccuracy of this char counter. I'll look into vb built-in counter script than this one when i have time. :)

Carter876
06-13-2004, 12:01 PM
ok tnguy3n, if you need a tester I'm avaible ;)

Tnx for your work :)

Regards

imported_marsauae
06-14-2004, 02:28 PM
Good work bro :)

masterstanf2k
06-15-2004, 03:35 PM
It's not working for me.... :(

I'm using the wysiwyg editor... :(

tnguy3n
06-15-2004, 09:43 PM
It's not working for me.... :(

I'm using the wysiwyg editor... :(
To have it worked, make sure that you have these following contributes added in to <textarea ...> of your editor templates. :)

onkeyup="textareaCounter('qr_message','MyCounter', $vboptions[postmaxchars])" onkeydown="textareaCounter('qr_message','MyCounter', $vboptions[postmaxchars])"

Carter876
06-27-2004, 06:54 AM
tnguy3n are there some news about this hack?! :rolleyes:

Regards

yoyoyoyo
07-10-2005, 05:40 AM
Has anyone gotten this to work with the wysiwyg editor? If so, how? It seems to work fine for me in the standard editor, but the directions above to add it to the wysiqyg editor is a bit too vague for me, I am afraid.

I included the code in the <textarea...> part and I can get the box to appear, but the function is not there. I also tried pasting the javascript in to the very top of the wysiwyg editor tempklate, but that didn't work, either.

Any ideas?

c0d3x
07-16-2005, 09:21 PM
i can't add this hack to the wysiwyg editor too :ermm: :tired:

lewisbeech
08-11-2005, 03:44 PM
mine doesn't work, i have installed it and i do not get that box where it tells you how many characters you have left :(

JPnyc
06-08-2006, 12:42 PM
I'm curious if any of you who got this to work, found that it breaks the "undo" function in IE only. I wrote my own one of these and the function works fine in all browsers however in IE you can't use UNDO, it's grayed out in the menu that comes up on R-click in the text editor. Firefox and Opera are both fine. I think it has something to do with the way IE handles the onkeyup event.

JPnyc
06-08-2006, 12:43 PM
As to the WYSIWYG editor, it's an entirely different animal. It's not a textarea being used so it requires a completely different function to be written.