Characters counter

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Characters counter

Post by thevisionisdivine » Tue Apr 03, 2018 3:37 pm

Hi.

For a community, it would be great (since it's a game) to have something which counts post characters.
I know there's a "word count" but, while nice, it's useless for me...
Has anybody an idea?

Thanks
* * * All To Be The Master Of The Wind * * *

User avatar
GanstaZ
Registered User
Posts: 362
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: Characters counter

Post by GanstaZ » Tue Apr 03, 2018 9:06 pm

You are the one who is requesting an extension). We don't know what do you want to do & what would be the purpose?!)
"When answer lies in the question,.. question becomes redundant!"

User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Re: Characters counter

Post by thevisionisdivine » Wed Apr 04, 2018 3:46 pm

GanstaZ wrote:
Tue Apr 03, 2018 9:06 pm
You are the one who is requesting an extension). We don't know what do you want to do & what would be the purpose?!)
I am sure I wrote it: counting characters in a message.
Before a quest starts (it's a sci-fi RPG) we will say something like: "Ok players: for this quest, the minimum post length is 600 chars".
Following this, the quest will start and players will post a message, according to the players rotation set.
At the end, the post should show the post character count, which will we'll use to compute the points earned (using something similar to NCAA passer rating formula).

Is it enough?
* * * All To Be The Master Of The Wind * * *

User avatar
GanstaZ
Registered User
Posts: 362
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: Characters counter

Post by GanstaZ » Wed Apr 04, 2018 4:43 pm

Yes.. this is much better. Counting chars isn't complicated, but the main point here is: Is it for one go or for masses.?
"When answer lies in the question,.. question becomes redundant!"

User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Re: Characters counter

Post by thevisionisdivine » Wed Apr 04, 2018 6:25 pm

GanstaZ wrote:
Wed Apr 04, 2018 4:43 pm
Is it for one go or for masses.?
What do you mean?
* * * All To Be The Master Of The Wind * * *

User avatar
GanstaZ
Registered User
Posts: 362
Joined: Wed Oct 11, 2017 10:29 pm
Location: Zverse

Re: Characters counter

Post by GanstaZ » Wed Apr 04, 2018 9:13 pm

I mean, is it only for one person (the one who requested) or for many (are there more people who want something like this for their board).
"When answer lies in the question,.. question becomes redundant!"

User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Re: Characters counter

Post by thevisionisdivine » Wed Apr 04, 2018 11:41 pm

It's for my board. How I know if somebody else's board needs it?
* * * All To Be The Master Of The Wind * * *

User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Re: Characters counter

Post by thevisionisdivine » Wed Apr 04, 2018 11:42 pm

It's for my board. But, if it works, we will try it, first of all, on another board I take part in...
* * * All To Be The Master Of The Wind * * *


User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Re: Characters counter

Post by thevisionisdivine » Thu Apr 05, 2018 8:55 pm

I know that. But it's not an extension and I'm not going to study german...
* * * All To Be The Master Of The Wind * * *

User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Re: Characters counter

Post by thevisionisdivine » Wed Apr 11, 2018 12:24 pm

???
* * * All To Be The Master Of The Wind * * *

User avatar
ViolaF
Registered User
Posts: 1411
Joined: Tue Aug 14, 2012 11:52 pm

Re: Characters counter

Post by ViolaF » Wed Apr 11, 2018 7:07 pm

thevisionisdivine wrote:
Thu Apr 05, 2018 8:55 pm
and I'm not going to study german...
of course not :D

http://php.net/manual/en/function.strlen.php

User avatar
3Di
Registered User
Posts: 12694
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Characters counter

Post by 3Di » Wed Apr 11, 2018 7:12 pm

strlen() returns the number of bytes rather than the number of characters in a string.
Say you have multiple Emojis (4-bytes) or similar issues, you are not really done.

See instead http://php.net/manual/en/function.iconv-strlen.php and follow.

Also http://php.net/manual/en/function.mb-strlen.php could come in handy.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
ViolaF
Registered User
Posts: 1411
Joined: Tue Aug 14, 2012 11:52 pm

Re: Characters counter

Post by ViolaF » Wed Apr 11, 2018 7:32 pm

of course mb ;)

User avatar
3Di
Registered User
Posts: 12694
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Characters counter

Post by 3Di » Wed Apr 11, 2018 7:35 pm

ViolaF wrote:
Wed Apr 11, 2018 7:32 pm
of course mb ;)
That's slower/intensive than the others, you should really find a compromise, maybe coding a sort of function instead.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

Post Reply

Return to “Extension Requests”

Who is online

Users browsing this forum: No registered users and 14 guests