Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Page 1 of 2 • Share •
Page 1 of 2 • 1, 2 
Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
![]() | Notice: This tutorial can only be preformed by Founders, whilst in the Founding account. After Saving these edits, when an update is released, you will be required to manually add the new template codes in yourself (Otherwise you will have to delete the customizations and re-add them) |
This tutorial will provide you the ability to add the counter to the quick reply, extended reply, PM's & the signature.
The counter can only read the non-WYSIWYG Mode.
Forum Version: PunBB
Adding a count in the signature
1) Head to Display > Templates > Profile > Profile_Edit_Signature.
Locate this code: {SIGNATURE_EDIT}
In the line ABOVE it, insert this script.
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 1000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(1000- tet.length);
});
});</script>
Save & publish the template.
Now you may view your new counter in the signature.
2) Adding a count in the extended reply box.
Templates / Post & Private message.
Locate the code: , which should be 3 lines above: {L_MESSAGE}
and insert this code, in the line ABOVE the first code.
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Now save & Publish it.
Now you can see your Counter in the extended reply editor
3) Now head to the template called "Posting_body_wysiwyg"
Locate this code: <tr valign="top">
Insert our script in the line ABOVE it
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Now save & publish
Note: After that last modification, the counter is now in the private messages.
There's no additional mods necessary there
4) In the Quick Reply Box.
Templates / General / Viewtopic_body.
Locate this code: {QUICK_REPLY_FORM}
and in the line ABOVE it, insert this code:
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Now, save & publish it.
You can now see it in the Quick reply
Now, that is the end of all the modifications for the character counter in PunBB.
Sit back, and check 'em out
Forum Version: PHPBB2
Have I said that PHPBB2 templates are really annoying yet?
1) In the signature
General > Template / Profile > Profile_edit_signature.
Locate the line: {SIGNATURE_EDIT}
and in the line ABOVE it, add this script
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 1000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(1000- tet.length);
});
});</script>
Save & publish the template.
2) Extended reply box
Templates > Post & Private messages > Posting Body
Locate the code: <!-- BEGIN switch_quote_limit -->
In the line ABOVE it, add the script:
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Save & publish.
3) Now were in the same room, but the template posting_body_wysiwyg .
Locate the code: <!-- BEGIN switch_quote_limit -->
and in the line ABOVE it, add the script:
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Now, save & publish.
4) Same room again, but template privmsg_preview
Locate the line: <td class="row1" colspan="2" valign="top"><div class="postbody">{MESSAGE}</div></td>
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Save & publish.
5) In the Quick Reply Box.
Templates / General / Viewtopic_body.
Locate this code: {QUICK_REPLY_FORM}
and in the line ABOVE it, insert this code:
- Code:
<script>jQuery(document).ready(function() {
jQuery('#text_editor_textarea').before('Characters Used: - of 65,000; Number of characters left: -;').keyup(function() {
tet = jQuery('#text_editor_textarea').val();
jQuery('#sig_count').html(tet.length);
jQuery('#sig_recoursive').html(65000- tet.length);
});
});</script>
Now, save & publish it.
You can now see it in the Quick reply
I hope you now enjoy your new tool, and remember, if you have any problems, feel free to use the Support Section!
Thanks,
Darren.

Leeloo- Administrator

-

Posts: 4284
Language: French, English
Points: 4733
Join date: 2007-09-04
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Great, but why can't we edit phpbb3 templates? It seems somewhat unfair.
littlelaurence- Forumotion Member
- Posts: 4
Language: English
Points: 7
Join date: 2011-04-06
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
looks like you need to add the locate lines as i dont see any (i speak for PHPBB2)
also i added the quick reply counter but it seems to have one problem... it dont count lol
also i added the quick reply counter but it seems to have one problem... it dont count lol

Garland- Forumotion Member
-

Posts: 58
Age: 20
Language: Greek
Location: Greece
Points: 87
Join date: 2009-09-09
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
ok, possible dumb question, but what is a counter for? What does it count?
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
lisa1302 wrote:ok, possible dumb question, but what is a counter for? What does it count?
It counts the number of characters in a post. This allows you to see how many characters you've used up in a post.
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Is it possible to program it so that it counts words?
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Base wrote:lisa1302 wrote:ok, possible dumb question, but what is a counter for? What does it count?
It counts the number of characters in a post. This allows you to see how many characters you've used up in a post.
ohhhhh sounds fun
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Half of the locate this code are missing.

MrMario- Helper

-

Posts: 22294
Language: English
Location: United States of America
Points: 74049
Join date: 2008-06-10
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
I thought i was just being stupid.. XD
~ Tilum
~ Tilum

Tilum- Forumotion Member
-

Posts: 1754
Age: 21
Language: Rainbows are cool. Period.
Location: England.
Points: 4179
Join date: 2008-04-13
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
I don't see where to put the second two codes!
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Base wrote:lisa1302 wrote:ok, possible dumb question, but what is a counter for? What does it count?
It counts the number of characters in a post. This allows you to see how many characters you've used up in a post.
What is the purpose of counting the number of characters in the quick reply, extended reply, PM's & the signature ?
I do not remember any restrictions on number of characters
that can be used in these phpbb2 areas....
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
I believe that the restriction is 65000 characters. 


Tutorial Contributors - Are you a keen tutorial writer?
Useful Links
General Rules | Forumotion Team | Lost Founder Password | Frequently Asked Questions | Tricks and Tips | Announcements and Updates | Report a forum | Forum Utilities | No support via PM
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
It'd be no problem adding these scripts to the Invision & phpBB3 board versions.. I thought you knew that, Darren?

Saxaca- Forumotion Member
-

Posts: 539
Age: 100
Language: Markup.
Points: 2028
Join date: 2010-07-03
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Sorry about this guys, somehow it didn't copy/paste over.
I'm passing the corrections over to MrMario right now!
Garland, hit the a/A button, as I stated in the tut, it only works with the WYSIWYG Mode deactive
Sax, I couldn't get the script I wrote for IPB & PHPBB3 to work so I didn't do it.
Sorry guys
I'm passing the corrections over to MrMario right now!
Garland, hit the a/A button, as I stated in the tut, it only works with the WYSIWYG Mode deactive
Sax, I couldn't get the script I wrote for IPB & PHPBB3 to work so I didn't do it.
Sorry guys
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Thank You.
This Tutorial is very helpful ;D
This Tutorial is very helpful ;D
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
sorry to say it darren but at least the quick reply (as there are no codes to others) the counter wont count and yes the WYSIWYG is off

Garland- Forumotion Member
-

Posts: 58
Age: 20
Language: Greek
Location: Greece
Points: 87
Join date: 2009-09-09
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Darren1 wrote:Sorry about this guys, somehow it didn't copy/paste over.
I'm passing the corrections over to MrMario right now!
Where is MrMario and the correction?
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
I'm right here waiting for the corrections.

MrMario- Helper

-

Posts: 22294
Language: English
Location: United States of America
Points: 74049
Join date: 2008-06-10
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
MrMario wrote:I'm right here waiting for the corrections.

Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
[quote="bigugly11"]

Darren1 wrote:
I'm passing the corrections over to MrMario right now!

Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Its fixed. Thank Darren! 

MrMario- Helper

-

Posts: 22294
Language: English
Location: United States of America
Points: 74049
Join date: 2008-06-10
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
MrMario wrote:Its fixed. Thank Darren!
Darren!4) Same room again, but template privmsg_preview
Locate the line: <td class="row1" colspan="2" valign="top"><div class="postbody">{MESSAGE}</div></td>
Does …... “and in the line ABOVE it, add the script:”....belong in # 4..... like it is in #1, 2, 3, 5?
I hope so for that is were I put it?
What did I do wrong?
I get …....

in everyone except in signature..I get...

Thanks
bigugly11
Last edited by bigugly11 on April 19th 2011, 10:27 am; edited 2 times in total (Reason for editing : add question about #4 & what did I do wrong)
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Sorry about the delay guys, I had to change a JS Value, which lets just say, didn't agree with me 
The techs updated it after I sent the tut to Typlo
Bigugly, The difference is just the amount of charactures, correct?
It's like that for a reason, because 1000 is the limit, unlike in posts, which is 65000 now days.
Garland, the correction is now live, if you use the new codes I've provided, it should work & has worked for me
(And it did for me before, which I don't get?)
Thanks Mario for updating it
The techs updated it after I sent the tut to Typlo
Bigugly, The difference is just the amount of charactures, correct?
It's like that for a reason, because 1000 is the limit, unlike in posts, which is 65000 now days.
Garland, the correction is now live, if you use the new codes I've provided, it should work & has worked for me
Thanks Mario for updating it
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Nice tip.
Hehe I got this feature on my phpbb3 forum months ago.
Hehe I got this feature on my phpbb3 forum months ago.
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Darren1 wrote:Sorry about the delay guys, I had to change a JS Value, which lets just say, didn't agree with me
Bigugly, The difference is just the amount of charactures, correct?
It's like that for a reason, because 1000 is the limit, unlike in posts, which is 65000 now days.
Sorry for the confusion..
See the image for “Edit signature”....What I was trying to say is that I can get a – (dash) instead of a number. Should it not say... “Characters Used: 372 of 1000?
It shows “Number of characters left: -; Should it not say ...Number of characters left: 628.
How do I get it to show numbers instead if the “ - or -; ” ..... is what I am trying to ask?
Thanks,
bigugly11
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Bigugly, could you please hit the space bar in that text area.
The counter only reads once you have edited the text are unfortunately.
The counter only reads once you have edited the text are unfortunately.
Re: Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren
Darren1 wrote:Bigugly, could you please hit the space bar in that text area.
The counter only reads once you have edited the text are unfortunately.
Are you talking about placing the cursor in the text area and hitting the space bar? Like in the image below.....cursor is left side, near the bottom..

Is so, that did not work.
Sorry maybe I misunderstood!
Page 1 of 2 • 1, 2 
Page 1 of 2
Permissions in this forum:
You cannot reply to topics in this forum



by 







