Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: davidhs on July 01, 2013, 09:48:11 AM

Title: Characters remaining of post
Post by: davidhs on July 01, 2013, 09:48:11 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3722)

Characters remaining of post

ABOUT...

Characters remaining of post, 1.0.4
© 2013-2015 by davidhs

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.creativecommons.org%2Fl%2Fby%2F3.0%2F88x31.png&hash=48e8922470841681801d5cd455167597) (http://creativecommons.org/licenses/by/3.0/)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/).

DESCRIPTION

Shows the maximum number of characters and remaining while writing a post, as in the user signature.

This is shown in:

(https://lh3.googleusercontent.com/P5nL13juuFhjnsPOA2IpNXSwHSK7Zu1pyB1PzF86JdAyxf9ywNwmrPnYglmzVb51jw-ZrCcGzwJBoOhVaGC0jHPFBzPHqUNRUQd-vKckgqw8kp9XMF1fxfIsdCnHSFnVc0MCPExlGKJWE9ro94pAUSDNpN7-Xrz1i2cIGfvTfCDMSz2RlO8y2TTf-CLkxTLUCZRJjmruECbg7IzAIo-lu2SK7KQrvaLecnpwa56j4VGyH0AXf0YFrI2BItjaDnHpG2X-Du_6Ab-bp2ha64GKV3_reQzATwcte1ySpNDNJ1kUMY968He8ixqgquBOrLnLVTJMtIAZ3XqHS7v9FVyDxGunFDbGOBWEW9cjHZaWBs5O3tm--9SbGnm-yM3eKVre-SKEPWVRTyiUsbugzgCYDla-ZYIp50mNiWQbIBEE6_xabgwc4kvmp-u5UGTbooTc3okbZl3rR9spnmz2naZIZe62BQnfe-OsWXTpAB3gogdK6Uc1pDUp8nNZZ1wRN5Bw_W1ygegRq7rohLckWiGsoEHldWVPD37OSERBiFISFBNIYkyZrrTH4F0K3uc7vv491u0VJYFoJEd2SQe_XamE2EBUUFL9iIrwDbY-nsqKnsLr5YaVLB5C=w880-h535-no)

SMF COMPATIBILITY


DOWNLOAD

Link to MOD (http://custom.simplemachines.org/mods/index.php?mod=3722)

MANUAL INSTALLATION

See http://wiki.simplemachines.org/smf/Manual_installation_of_mods

SUPPORT AND COMMENTS

In English: http://www.simplemachines.org/community/index.php?topic=506862.0
In Spanish: http://www.simplemachines.org/community/index.php?topic=504643.0

CHANGE LOG

Code: [Select]
Legend:   ! Fixed   + Added   - Removed   * Changed   @ Note

1.0.4   2014-01-25
------------------
+ SMF compatibility: 2.0.7.

1.0.3   2013-10-24
------------------
+ SMF compatibility: 1.1.19 and 2.0.6.

1.0.2   2013-08-19
------------------
+ SMF compatibility: 2.0.5.

1.0.1   2013-07-07
------------------
! Typo in source code.

1.0     2013-07-01
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/
+ Maximum number of characters and remaining of post.
@ Only works in not WYSIWYG mode.
@ Does not shown the initial remaining number in quick modification of post.
+ SMF compatibility: 1.1 to 1.1.18.
+ SMF compatibility: 2.0 to 2.0.4.
Title: Re: Characters remaining of post, 1.0 (SMF 1.1-1.1.18, 2.0-2.0.4)
Post by: Alpay on July 06, 2013, 04:52:10 AM
Good Job ;) very essential thing
Title: Re: Characters remaining of post, 1.0 (SMF 1.1-1.1.18, 2.0-2.0.4)
Post by: Hristo on July 06, 2013, 01:27:30 PM
Nice mod. Thank you!

I believe there is a small typo. On row 72 in modification-2.0.xml (the 1.0 has it too) there is "<spam class="smalltext">"

For those who use WYSIWYG Quick Reply mod the changes of Display.template.php seems are not needed (?), so you can delete them before installing the mod. It works well for me without them.
Title: Re: Characters remaining of post, 1.0.1 (SMF 1.1-1.1.18, 2.0-2.0.4)
Post by: davidhs on July 08, 2013, 07:38:33 AM
I believe there is a small typo. On row 72 in modification-2.0.xml (the 1.0 has it too) there is "<spam class="smalltext">"
Yes, is a typo :( I fix this.

For those who use WYSIWYG Quick Reply mod the changes of Display.template.php seems are not needed (?), so you can delete them before installing the mod. It works well for me without them.
True, in the fields WYSIWIG the MOD does nothing. You can delete or not the code, it is all one.
Title: Re: Characters remaining of post, 1.0.1 (SMF 1.1-1.1.18, 2.0-2.0.4)
Post by: davidhs on July 08, 2013, 07:40:12 AM
New version:
Code: [Select]
1.0.1   2013-07-07
------------------
! Typo in source code.
Title: Re: Characters remaining of post, 1.0.2 (SMF 1.1-1.1.18, 2.0-2.0.5)
Post by: davidhs on August 20, 2013, 07:59:23 AM
New version:
Code: [Select]
1.0.2   2013-08-19
------------------
+ SMF compatibility: 2.0.5.
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: davidhs on October 24, 2013, 12:06:10 PM
New version:
Code: [Select]
1.0.3   2013-10-24
------------------
+ SMF compatibility: 1.1.19 and 2.0.6.
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Jade Elizabeth on November 15, 2013, 12:15:26 AM
Hey :D

I'm having trouble getting it to work on my quick reply (http://www.creativeburrow.org/feedback/new-design-release-karma-log/). Can you help me at all?
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: davidhs on November 15, 2013, 05:18:44 AM
Hey :D

I'm having trouble getting it to work on my quick reply (http://www.creativeburrow.org/feedback/new-design-release-karma-log/). Can you help me at all?
Sorry, I visited your forum but I do not see quick reply button.
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Jade Elizabeth on November 15, 2013, 07:53:18 AM
How about this link?
http://www.creativeburrow.org/poetry/maybe-this-time/

You should see the quick reply on bottom :).
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: davidhs on November 15, 2013, 08:13:09 AM
Sorry but... I do not see. (See attach image) ???

(I am a guest on your forum)
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Jade Elizabeth on November 15, 2013, 06:34:16 PM
I'll send you a login, sorry!
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: davidhs on November 16, 2013, 06:09:31 AM
I am login on your forum, I see quick reply button and count of characters works.  ???

See attach image.
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Jade Elizabeth on November 18, 2013, 01:47:32 AM
It's not working on Chrome :/.
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: davidhs on November 18, 2013, 06:57:14 AM
It's not working on Chrome :/.
This may be a javascript problem with Chrome, I do not know. I use Firefox.
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Jade Elizabeth on November 19, 2013, 03:36:51 AM
Are you able to look into it? I don't really know your mod so I'm not sure where to begin....maybe test your site on Chrome or something?
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: davidhs on November 19, 2013, 07:59:18 AM
Are you able to look into it? I don't really know your mod so I'm not sure where to begin....maybe test your site on Chrome or something?
I installed Chrome and works (my local test site and your forum). I do not know because it does not work with you.

Have you test on other browsers?
Works on other areas? i.e create a PM or post.
Have you text with your browser but login with other account?
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Shambles on November 19, 2013, 08:17:43 AM
Quote from: Jade Elizabeth
It's not working on Chrome :/.

I'm not a Chrome user, but just looking into the settings, check:

Settings > Advanced > Privacy > Content Settings > Javascript
Title: Re: Characters remaining of post, 1.0.3 (SMF 1.1-1.1.19, 2.0-2.0.6)
Post by: Jade Elizabeth on November 19, 2013, 06:07:58 PM
Are you able to look into it? I don't really know your mod so I'm not sure where to begin....maybe test your site on Chrome or something?
I installed Chrome and works (my local test site and your forum). I do not know because it does not work with you.

Have you test on other browsers?
Works on other areas? i.e create a PM or post.
Have you text with your browser but login with other account?

Hmm. It's working on the post pages, etc. I dunno why it wont on quick reply :(.



Quote from: Jade Elizabeth
It's not working on Chrome :/.

I'm not a Chrome user, but just looking into the settings, check:

Settings > Advanced > Privacy > Content Settings > Javascript

Of course I have JS on, my site uses it everywhere lol.
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: davidhs on January 25, 2014, 11:46:35 AM
New version:
Code: [Select]
1.0.4   2014-01-25
------------------
+ SMF compatibility: 2.0.7.
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: Westwegoman on February 08, 2014, 09:38:23 AM
Everything seems to upload fine but I have been getting this error in the error log when I add a picture to my gallery.


Code: [Select]
http://www.bayoustatefishing.com/community/index.php?action=gallery;sa=add
8: Undefined index: max_sig_characters
File: /community/Themes/default/GenericControls.template.php
Line: 34


Line 34 in that file appears to have been modified by this mod.
Code: [Select]
<div class="smalltext">', sprintf($txt['max_sig_characters'], $modSettings['max_messageLength']), ' <span id="editorLeft">', $modSettings['max_messageLength'], '</span></div>';
I've tried setting that to "0" to see if it changed anything but it didn't.

Any suggestions?
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: davidhs on February 16, 2014, 07:37:02 AM
I have not this error in logs of my test forum and my online forum.

What MOD do you use for gallery?
Can you see message Max characters: NNN; characters remaining: MMM bellow of textbox?
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: Westwegoman on February 16, 2014, 10:47:10 AM
I'm useing SMF Gallery Lite. I never noticed that it doesn't show below the text box. I've attached screen shot.
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: davidhs on February 16, 2014, 12:31:56 PM
My MOD (Characters remaining of post) does not work on SMF Gallery Lite.

"Characters remaining of post" adds
- a message below text box and
- code for count characters in all pages where this text box is used.

"SMF Gallery Lite" use this text box but, of course, no add code for count characters. And "SMF Gallery Lite" use this text box in many pages (that is, to count character would have to change many things in "SMF Gallery Lite").

It is easiest remove the message when the text box is used by "SMF Gallery Lite".
You can replace (on Themes/default/GenericControls.template.php, line 32)
Code: [Select]
if (!$editor_context['rich_active'] && !empty($modSettings['max_messageLength']))by
Code: [Select]
if (!$editor_context['rich_active'] && !empty($modSettings['max_messageLength']) && isset($txt['max_sig_characters']))(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fmedia.simplemachinesweb.com%2Fsmf%2Fdefault%2Fimages%2Fpost%2Fexclamation.gif&hash=e4014c511a94367a72ce803d6005b764) But, if you want uninstall "Characters remaining of post" you must restore this line.



Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: Westwegoman on February 16, 2014, 02:26:25 PM
That took care of it.

Thanks. :)
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: Jade Elizabeth on February 22, 2014, 05:37:25 AM
I'm getting that error too, but on this block of code:
Code: [Select]
<!-- BEGIN MOD CharsRemainingOfPost -->
' . (!empty($modSettings['max_messageLength']) ? ('<span class="smalltext">' . sprintf($txt['max_sig_characters'], $modSettings['max_messageLength']) . ' <span id="editorLeft2">...</span></span><br />') : '') . '
<!-- END MOD CharsRemainingOfPost -->
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: davidhs on February 22, 2014, 06:50:24 AM
I'm getting that error too, but on this block of code:
Code: [Select]
<!-- BEGIN MOD CharsRemainingOfPost -->
' . (!empty($modSettings['max_messageLength']) ? ('<span class="smalltext">' . sprintf($txt['max_sig_characters'], $modSettings['max_messageLength']) . ' <span id="editorLeft2">...</span></span><br />') : '') . '
<!-- END MOD CharsRemainingOfPost -->
This code is in Display.template.php. Perhaps another mod uses this template?

You try this and tell me if it solves. Replace
Code: [Select]
' . (!empty($modSettings['max_messageLength']) ? ('<span class="smalltext">' . sprintf($txt['max_sig_characters'], $modSettings['max_messageLength']) . ' <span id="editorLeft2">...</span></span><br />') : '') . '
by
Code: [Select]
' . (!empty($modSettings['max_messageLength'] && isset($txt['max_sig_characters'])) ? ('<span class="smalltext">' . sprintf($txt['max_sig_characters'], $modSettings['max_messageLength']) . ' <span id="editorLeft2">...</span></span><br />') : '') . '
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: Jade Elizabeth on February 22, 2014, 07:04:13 AM
There's a syntax error...I can't find it myself :(.
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: davidhs on February 22, 2014, 07:24:00 AM
There's a syntax error...I can't find it myself :(.
:-[ I am sorry.

...by
Code: [Select]
' . (!empty($modSettings['max_messageLength']) && isset($txt['max_sig_characters']) ? ('<span class="smalltext">' . sprintf($txt['max_sig_characters'], $modSettings['max_messageLength']) . ' <span id="editorLeft2">...</span></span><br />') : '') . '
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.7)
Post by: Jade Elizabeth on February 22, 2014, 08:24:07 AM
Ha ha no worries, it happens to me all the time. Hell I couldn't even fix it there - there is a lot going on, so please don't feel embarrassed! <3

Thanks heaps for the help :D. :-*
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.19, 2.0-2.0.8)
Post by: davidhs on June 25, 2014, 08:22:32 AM
Compatible with SMF 2.0.8.
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.20, 2.0-2.0.9)
Post by: davidhs on October 07, 2014, 07:47:54 AM
Compatible with SMF 1.1.20 and 2.0.9.
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.20, 2.0-2.0.9)
Post by: petejoh222 on April 04, 2015, 01:52:31 PM
Thank you for this mod. Just installed it on my new 2.0.9 forum. Love knowing how many characters I have left, and I think most people do too! :)
Title: Re: Characters remaining of post, 1.0.4 (SMF 1.1-1.1.20, 2.0-2.0.9)
Post by: davidhs on May 23, 2015, 12:29:54 PM
To moderators: Text to move to first post
Quote
Subject:
Quote
Characters remaining of post, 1.0.4 (SMF 1.1-1.1.21, 2.0-2.0.10)
Body:
Quote
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3722)



Characters remaining of post

ABOUT...

Characters remaining of post, 1.0.4
© 2013-2015 by davidhs

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi.creativecommons.org%2Fl%2Fby%2F3.0%2F88x31.png&hash=48e8922470841681801d5cd455167597) (http://creativecommons.org/licenses/by/3.0/)
This work is licensed under a Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/).

DESCRIPTION

Shows the maximum number of characters and remaining while writing a post, as in the user signature.

This is shown in:
  • Create/modify post (not WYSIWYG mode only).
  • Create/modify PM (not WYSIWYG mode only).
  • Quick reply.
  • Quick modification of post (does not shown the initial remaining number).

(https://googledrive.com/host/0B7M1e_-FeoeEYU95Xy1wUDkwdDA/chars_remaining_of_post.png)

SMF COMPATIBILITY

  • SMF 1.1 to 1.1.21.
  • SMF 2.0 to 2.0.10.

DOWNLOAD

Link to MOD (http://custom.simplemachines.org/mods/index.php?mod=3722)

MANUAL INSTALLATION

See http://wiki.simplemachines.org/smf/Manual_installation_of_mods

SUPPORT AND COMMENTS

In English: http://www.simplemachines.org/community/index.php?topic=506862.0
In Spanish: http://www.simplemachines.org/community/index.php?topic=504643.0

CHANGE LOG

Code: [Select]
Legend:   ! Fixed   + Added   - Removed   * Changed   @ Note

1.0.4   2014-01-25
------------------
+ SMF compatibility: 2.0.7.

1.0.3   2013-10-24
------------------
+ SMF compatibility: 1.1.19 and 2.0.6.

1.0.2   2013-08-19
------------------
+ SMF compatibility: 2.0.5.

1.0.1   2013-07-07
------------------
! Typo in source code.

1.0     2013-07-01
------------------
@ This work is licensed under a Creative Commons Attribution 3.0 Unported License http://creativecommons.org/licenses/by/3.0/
+ Maximum number of characters and remaining of post.
@ Only works in not WYSIWYG mode.
@ Does not shown the initial remaining number in quick modification of post.
+ SMF compatibility: 1.1 to 1.1.18.
+ SMF compatibility: 2.0 to 2.0.4.



Compatible with SMF 1.1.21 and 2.0.10.
Title: Re: Characters remaining of post
Post by: davidhs on October 01, 2015, 04:45:34 PM
Compatible with SMF 2.0.11.
Title: Re: Characters remaining of post
Post by: davidhs on October 12, 2016, 10:25:25 AM
Compatible with SMF 2.0.12.
Title: Re: Characters remaining of post
Post by: davidhs on January 12, 2017, 04:26:18 PM
Compatible with SMF 2.0.13.
Title: Re: Characters remaining of post
Post by: davidhs on November 25, 2017, 01:02:38 PM
Compatible with SMF 2.0.14 and 2.0.15.