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)
Scam Warning
User avatar
thevisionisdivine
Registered User
Posts: 141
Joined: Tue Mar 10, 2015 3:36 pm
Name: Bruno Bianco

Characters counter

Post by thevisionisdivine »

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: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Characters counter

Post by GanstaZ »

You are the one who is requesting an extension). We don't know what do you want to do & what would be the purpose?!)
Usus est magister optimus! phpBB pre-Triton & latest php environment.
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 »

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: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Characters counter

Post by GanstaZ »

Yes.. this is much better. Counting chars isn't complicated, but the main point here is: Is it for one go or for masses.?
Usus est magister optimus! phpBB pre-Triton & latest php environment.
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 »

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: 1187
Joined: Wed Oct 11, 2017 10:29 pm
Location: GZOverse

Re: Characters counter

Post by GanstaZ »

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).
Usus est magister optimus! phpBB pre-Triton & latest php environment.
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 »

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 »

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 »

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 »

???
* * * All To Be The Master Of The Wind * * *
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: Characters counter

Post by ViolaF »

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

http://php.net/manual/en/function.strlen.php
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Characters counter

Post by 3Di »

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.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
ViolaF
I've Been Banned!
Posts: 1609
Joined: Tue Aug 14, 2012 11:52 pm

Re: Characters counter

Post by ViolaF »

of course mb ;)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Characters counter

Post by 3Di »

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.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
Post Reply

Return to “Extension Requests”