vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Characters counter (https://vborg.vbsupport.ru/showthread.php?t=89280)

tnguy3n 06-05-2004 10:00 PM

Characters counter
 
JS textbox counter credits to Zach Evans

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

-------------------
requested by Carter876 here

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

Quote:

Originally Posted by Carter876
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

Quote:

Originally Posted by Carter876
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

Quote:

Originally Posted by walkingthepath
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. :)

HTML Code:

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.


All times are GMT. The time now is 05:24 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01030 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete