The forum of the forums
Welcome on the Forumotion Support Forum.

To take full advantage of everything offered by our forum, please log in if you are already a member or join our community if you're not yet....



Create a free forum like this one.
Users Tuesday Tips : Add a counter to the quick reply, extended reply, PM's & the signature. By Darren 5 5 1

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

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

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

Post by Leeloo on April 12th 2011, 3:25 am


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 Very Happy
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 Very Happy

Note: After that last modification, the counter is now in the private messages.
There's no additional mods necessary there Wink
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 Very Happy





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.

Exclamation In PHPBB2 we need to add a script for the private messages, we will do that now.

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! Smile


Thanks,
Darren.

Leeloo
Administrator
Administrator

Female
Posts: 4284
Language: French, English
Points: 4733
Join date: 2007-09-04

Back to top Go down

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

Post by littlelaurence on April 12th 2011, 3:41 am

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

Back to top Go down

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

Post by hicheel on April 12th 2011, 3:43 am

goood tip

hicheel
Forumotion Member

Male
Posts: 118
Age: 21
Language: mongolian
Location: Mongolia
Points: 235
Join date: 2009-01-15

http://hicheel.forumotion.com

Back to top Go down

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

Post by Garland on April 12th 2011, 10:44 am

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

Garland
Forumotion Member

Male
Posts: 58
Age: 20
Language: Greek
Location: Greece
Points: 87
Join date: 2009-09-09

Back to top Go down

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

Post by lisa1302 on April 12th 2011, 11:16 am

ok, possible dumb question, but what is a counter for? What does it count?

lisa1302
Forumotion Member

Female
Posts: 301
Age: 32
Language: Enlish
Location: UK
Points: 631
Join date: 2010-08-16

http://www.babiesandall.com

Back to top Go down

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

Post by Base on April 12th 2011, 11:17 am

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. Wink

Base
Manager
Manager

Male
Posts: 6590
Language: English and French
Location: Essex, England
Points: 14279
Join date: 2008-12-15

http://forumotionhub.com

Back to top Go down

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

Post by Kiekeboe on April 12th 2011, 11:35 am

Is it possible to program it so that it counts words?

Kiekeboe
Forumotion Member

Female
Posts: 225
Age: 16
Language: Dutch, english, german and a little bit french, guitar chords, html, a bit CSS
Location: Maastricht (Holland)
Points: 839
Join date: 2009-08-04

http://www.dreamhorses.biz/forum

Back to top Go down

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

Post by lisa1302 on April 12th 2011, 11:41 am

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. Wink


ohhhhh sounds fun Laughing

lisa1302
Forumotion Member

Female
Posts: 301
Age: 32
Language: Enlish
Location: UK
Points: 631
Join date: 2010-08-16

http://www.babiesandall.com

Back to top Go down

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

Post by MrMario on April 12th 2011, 2:34 pm

Half of the locate this code are missing. fufufu

MrMario
Helper
Helper

Male
Posts: 22294
Language: English
Location: United States of America
Points: 74049
Join date: 2008-06-10

Back to top Go down

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

Post by Tilum on April 12th 2011, 3:14 pm

I thought i was just being stupid.. XD

~ Tilum

Tilum
Forumotion Member

Male
Posts: 1754
Age: 21
Language: Rainbows are cool. Period.
Location: England.
Points: 4179
Join date: 2008-04-13

Back to top Go down

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

Post by hoodedwarbler12 on April 12th 2011, 6:20 pm

I don't see where to put the second two codes!

hoodedwarbler12
Forumotion Member

Male
Posts: 521
Age: 14
Language: English, Latin, HTML, JavaScript
Location: Tennessee, USA
Points: 1296
Join date: 2010-06-26

http://www.webkinznation.com

Back to top Go down

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

Post by bigugly11 on April 13th 2011, 8:45 am

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. Wink


What is the purpose of counting the number of characters in the quick reply, extended reply, PM's & the signature ? scratch

I do not remember any restrictions on number of characters
that can be used in these phpbb2 areas.... Embarassed

bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

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

Post by Base on April 13th 2011, 9:07 am

I believe that the restriction is 65000 characters. Wink

Base
Manager
Manager

Male
Posts: 6590
Language: English and French
Location: Essex, England
Points: 14279
Join date: 2008-12-15

http://forumotionhub.com

Back to top Go down

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

Post by Saxaca on April 13th 2011, 10:21 am

It'd be no problem adding these scripts to the Invision & phpBB3 board versions.. I thought you knew that, Darren?

Saxaca
Forumotion Member

Male
Posts: 539
Age: 100
Language: Markup.
Points: 2028
Join date: 2010-07-03

Back to top Go down

Partly broken

Post by sign da tits on April 13th 2011, 12:06 pm

they don't work, some of the "Locate this code:" are missing. Fix please!

sign da tits
Forumotion Member

Male
Posts: 236
Age: 17
Language: British English, AutoIt
Location: England!
Points: 703
Join date: 2011-03-02

http://www.devforumz.com/

Back to top Go down

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

Post by Darren1 on April 15th 2011, 8:29 pm

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 Wink

Sax, I couldn't get the script I wrote for IPB & PHPBB3 to work so I didn't do it.
Sorry guys

Darren1
Helper
Helper

Male
Posts: 11520
Age: 20
Language: Australian, English - UK
Location: Mass release of tutorials coming!
Points: 35863
Join date: 2008-07-09

http://testorial.forumotion.com

Back to top Go down

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

Post by YoshiGM on April 15th 2011, 8:30 pm

Thank You.

This Tutorial is very helpful ;D

YoshiGM
Forumotion Member

Male
Posts: 265
Age: 19
Language: CSS & HTML
Location: Mexico
Points: 395
Join date: 2010-07-13

http://help.forumotion.com

Back to top Go down

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

Post by Garland on April 17th 2011, 4:39 pm

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

Male
Posts: 58
Age: 20
Language: Greek
Location: Greece
Points: 87
Join date: 2009-09-09

Back to top Go down

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

Post by bigugly11 on April 18th 2011, 7:30 am

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?

bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

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

Post by MrMario on April 18th 2011, 7:32 am

I'm right here waiting for the corrections.

MrMario
Helper
Helper

Male
Posts: 22294
Language: English
Location: United States of America
Points: 74049
Join date: 2008-06-10

Back to top Go down

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

Post by bigugly11 on April 18th 2011, 7:57 am

MrMario wrote:I'm right here waiting for the corrections.



bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

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

Post by bigugly11 on April 19th 2011, 5:14 am

[quote="bigugly11"]
Darren1 wrote:
I'm passing the corrections over to MrMario right now!





bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

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

Post by MrMario on April 19th 2011, 8:37 am

Its fixed. Thank Darren! Smile

MrMario
Helper
Helper

Male
Posts: 22294
Language: English
Location: United States of America
Points: 74049
Join date: 2008-06-10

Back to top Go down

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

Post by bigugly11 on April 19th 2011, 9:23 am

MrMario wrote:Its fixed. Thank Darren! Smile


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? Embarassed

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)

bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

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

Post by Darren1 on April 19th 2011, 6:30 pm

Sorry about the delay guys, I had to change a JS Value, which lets just say, didn't agree with me Sad
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 Smile (And it did for me before, which I don't get?)

Thanks Mario for updating it Smile

Darren1
Helper
Helper

Male
Posts: 11520
Age: 20
Language: Australian, English - UK
Location: Mass release of tutorials coming!
Points: 35863
Join date: 2008-07-09

http://testorial.forumotion.com

Back to top Go down

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

Post by Doctor Inferno on April 20th 2011, 1:06 am

Nice tip.

Hehe I got this feature on my phpbb3 forum months ago. Razz

Doctor Inferno
Forumotion Member

Male
Posts: 1330
Language: GeekPolice
Location: Singapore
Points: 1396
Join date: 2008-03-03

http://www.GeekPolice.net

Back to top Go down

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

Post by Raizen on April 20th 2011, 2:13 am

Nice Job! Smile it is a good tip Smile

Raizen
Forumotion Member

Male
Posts: 1520
Language: English & Tagalog
Location: Philippines (PH)
Points: 1738
Join date: 2011-04-18

http://forumotionservice.forumotion.com/

Back to top Go down

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

Post by bigugly11 on April 20th 2011, 2:39 am

Darren1 wrote:Sorry about the delay guys, I had to change a JS Value, which lets just say, didn't agree with me Sad
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.. Embarassed
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

bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

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

Post by Darren1 on April 20th 2011, 4:42 am

Bigugly, could you please hit the space bar in that text area.
The counter only reads once you have edited the text are unfortunately.

Darren1
Helper
Helper

Male
Posts: 11520
Age: 20
Language: Australian, English - UK
Location: Mass release of tutorials coming!
Points: 35863
Join date: 2008-07-09

http://testorial.forumotion.com

Back to top Go down

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

Post by bigugly11 on April 20th 2011, 5:55 am

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! Embarassed

bigugly11
Forumotion Member

Male
Posts: 82
Language: english
Location: Half way up a mountain in the Tennessee National Forrest!
Points: 196
Join date: 2010-05-14

http://easttnforum.forumotion.com/

Back to top Go down

Page 1 of 2 1, 2  Next

View previous topic View next topic Back to top


Permissions in this forum:
You cannot reply to topics in this forum