inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 24, 2017 1:18:10 GMT -8
Ben Goodman , I'm not familiar with this regexr site you keep plugin so can't really vouch for its accuracy or which platform of regular expression it implements (the PHP implementation for example is a totally different beast from the beast described in ECMA). What I would suggest is you find the code block or blocks which correspond to the characters you are trying to include and add them as described above. If you are sure you've added the correct code blocks and it still is not working then link me to a post where the characters exists so I can see the codepoints in use and how the constructed regex from the plugin settings is interpreting it.
|
|
inherit
229600
0
Sept 7, 2022 11:09:51 GMT -8
Ben Goodman
96
February 2016
benhun
|
Post by Ben Goodman on Aug 24, 2017 1:38:35 GMT -8
Chris , I tried this site to determine which section my letter belongs to. Turns out it actually is latin extended A...
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Aug 24, 2017 21:45:43 GMT -8
Ben Goodman , it just dawned on me that the word boundaries are not unicode compatible and would only consider a word to be a word if and only if it started and ended with a traditional alphanumeric character, if the word started or ended with é for example it would be skipped since it doesn't conform to a traditional boundary. Javascript's regular expression implementation although it does support lookahead assertions unfortunately has no corresponding lookbehind assertion in order to construct a custom boundary to include our special characters so the next best thing is to just drop the boundaries with the understanding that it would still be implied with the absence or existence of one of the characters in our prepared set: /[\w\-',\u00c1-\u0171]+/gThat range of `\u00c1-\u0171` appears to be an appropriate subset range of Latin 1 supplemental and Latin Extended A which would include the desired characters. Edit:
As I mentioned previously you could also include just the codepoints for only the characters you want to use instead of a range which may include undesired characters /[\w\-',\u00e1\u00e9\u00ed\u00f3\u00f6\u0151\u00fa\u00fc\u0171\u00c1\u00c9\u00cd\u00d3\u00d6\u0150\u00da\u00dc\u0170]+/g
|
|
inherit
229600
0
Sept 7, 2022 11:09:51 GMT -8
Ben Goodman
96
February 2016
benhun
|
Post by Ben Goodman on Aug 24, 2017 23:42:55 GMT -8
Many thanks man!
It is working like a charm now!
|
|
inherit
244931
0
Oct 10, 2017 10:32:18 GMT -8
jennileigh31
2
May 2017
jennileigh31
|
Post by jennileigh31 on Oct 3, 2017 11:28:55 GMT -8
Hello. I have been sifting through pages for days between this thread and the Monetary System thread that Peter has up. We are trying to understand and please forgive me if you get this question a lot, but I am unsure whom to go to in regards to the issues we are having. It seems that even with bonus's allowed in the Monetary System 0.9.6 and the Word Counter 1.0.0 that they aren't not adding the allotted funds to the bank or wallet at least not together.
The Monetary system overwrites any bonuses we have listed for the Word Counter based on the number of words in a post.
We have been trying for over a week to fix this on our RP site and made a testing place to try and work the coding and or bugs out to see where we have gone wrong in setting this up.
If anyone could offer some insight that would be great.
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Oct 9, 2017 2:45:20 GMT -8
Hello. I have been sifting through pages for days between this thread and the Monetary System thread that Peter has up. We are trying to understand and please forgive me if you get this question a lot, but I am unsure whom to go to in regards to the issues we are having. It seems that even with bonus's allowed in the Monetary System 0.9.6 and the Word Counter 1.0.0 that they aren't not adding the allotted funds to the bank or wallet at least not together. The Monetary system overwrites any bonuses we have listed for the Word Counter based on the number of words in a post. We have been trying for over a week to fix this on our RP site and made a testing place to try and work the coding and or bugs out to see where we have gone wrong in setting this up. If anyone could offer some insight that would be great. Latest version is 1.0.5. I would suggest updating as first means of fixing this problem.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 24, 2017 7:13:56 GMT -8
jennileigh31, if you still haven't resolved this after updating to the latest version then a forum url where the behaviour you describe can be observed would be critical for diagnosis
|
|
inherit
219538
0
May 16, 2023 10:23:34 GMT -8
Midgardo
149
March 2015
midgardo
|
Post by Midgardo on Jan 11, 2018 10:50:03 GMT -8
Hi Chris
When you use word counter whit a quick bbcode button, It doesn't recognize the words or characters until you write something, for example:
I have a BBcode buttom of reward, Its function is to post 300 number of words and the user receives points for those 300 words, but the word counter fdoes'nt recognize that until the user write something else.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 11, 2018 16:54:46 GMT -8
The plugin is triggered via typing or pasting in the typing area Midgardo and it is specifically written to not count bbcode so bbcode buttons would not really trigger a recount.
|
|
inherit
219538
0
May 16, 2023 10:23:34 GMT -8
Midgardo
149
March 2015
midgardo
|
Post by Midgardo on Jan 11, 2018 22:25:20 GMT -8
The plugin is triggered via typing or pasting in the typing area Midgardo and it is specifically written to not count bbcode so bbcode buttons would not really trigger a recount. I see, is there a way that this can recognize bbcode to trigger it?
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 12, 2018 20:51:34 GMT -8
The plugin is triggered via typing or pasting in the typing area Midgardo and it is specifically written to not count bbcode so bbcode buttons would not really trigger a recount. I see, is there a way that this can recognize bbcode to trigger it? Try this in your global header: <script> ( function (){ /* Hook bbbcode insertion to trigger wordcount recount */ var builder = $.ui.wysiwyg.prototype._buildControls; $.ui.wysiwyg.prototype._buildControls = function(){ var wysiwyg = this; var hooks = {}; hookEditors(); function hookEditors(){ $.each(wysiwyg.editors, function (i,e){ hooks[i+"_surroundSelection"] = e.surroundSelection; e.surroundSelection = function(){ hooks[i+"_surroundSelection"].apply(this, arguments); $(wysiwyg.editors[i].bindable).triggerHandler('keyup.wordcount') } }) } return builder.apply(this, arguments); } })() </script>
|
|
inherit
219538
0
May 16, 2023 10:23:34 GMT -8
Midgardo
149
March 2015
midgardo
|
Post by Midgardo on Jan 13, 2018 11:29:01 GMT -8
I see, is there a way that this can recognize bbcode to trigger it? Try this in your global header: <script> ( function (){ /* Hook bbbcode insertion to trigger wordcount recount */ var builder = $.ui.wysiwyg.prototype._buildControls; $.ui.wysiwyg.prototype._buildControls = function(){ var wysiwyg = this; var hooks = {}; hookEditors(); function hookEditors(){ $.each(wysiwyg.editors, function (i,e){ hooks[i+"_surroundSelection"] = e.surroundSelection; e.surroundSelection = function(){ hooks[i+"_surroundSelection"].apply(this, arguments); $(wysiwyg.editors[i].bindable).triggerHandler('keyup.wordcount') } }) } return builder.apply(this, arguments); } })() </script> Worked, thanks very much!
|
|
inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Jan 16, 2020 12:11:37 GMT -8
Hey, Chris. So, this plugin has always worked fine for me, I've never experienced a problem on any site of mine, until recently. I'm not sure what the heck happened, but it doesn't work anymore. You can still see a dropdown where it used to let you switch between words and characters, but it no longer shows the actual numbers. The site is meta-rpg.boards.net if you make an account I'll give you plugin access to check it out. I've known you for years, I'm quite comfortable with you having plugin permissions haha you do on my other site already. I can't honestly make a guess as to what happened. I moved the plugin to the top of the plugin list to see if that'd help, but it didn't. On a far less important, secondary note -- is it possible to remove the dropdown for characters/words and just have it be the word counter alone? I wanted to style it like this: sta.sh/016dt3s4zqpm
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Jan 19, 2020 23:31:48 GMT -8
Hey, Chris . So, this plugin has always worked fine for me, I've never experienced a problem on any site of mine, until recently. I'm not sure what the heck happened, but it doesn't work anymore. You can still see a dropdown where it used to let you switch between words and characters, but it no longer shows the actual numbers. The site is meta-rpg.boards.net if you make an account I'll give you plugin access to check it out. I've known you for years, I'm quite comfortable with you having plugin permissions haha you do on my other site already. I can't honestly make a guess as to what happened. I moved the plugin to the top of the plugin list to see if that'd help, but it didn't. On a far less important, secondary note -- is it possible to remove the dropdown for characters/words and just have it be the word counter alone? I wanted to style it like this: sta.sh/016dt3s4zqpm It seems whoever setup the plugin on that site opted to have the word count appear at an alternate location instead of the in the default location. The plugin was configured with an alternate ID of "wordcount" but no such ID exists on the page (the default ID of the part of the menu that takes the count is "word-count"). As for getting rid of the menu, you can use display:none; to target .button.word-count which will hide the menu. You will of course then need to provide your own ID to place the count.
|
|
inherit
223470
0
Feb 27, 2019 17:05:53 GMT -8
₪» ⅀ ƪ Ƒ «₪
Original registration date: 2007. DeviantART: http://deviantart.com/ruanly. Discord: Ruanly#7946.
1,281
July 2015
fajita
|
Post by ₪» ⅀ ƪ Ƒ «₪ on Jan 20, 2020 8:40:03 GMT -8
ChrisThank you! That fixed that issue. Working a charm! =D Another issue persists I'd hoped would be fixed by solving this -- I have it so the word count is inserted into the post itself, at the top, via the Thread > Post List layout template. It is inserted like: <span>word count: <span id="wordcount"></span></span> This used to work, but nowadays it simply says 0 no matter what. Any clue why it stopped working? (the alternate target ID in the plugin is still set to wordcount so it should match)
|
|