[3.3][DEV] Comma stats

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
Anișor
Translator
Posts: 330
Joined: Tue Jan 08, 2013 9:36 pm
Location: Arbroath, Angus, Scotland

[3.3][DEV] Comma stats

Post by Anișor »

Extension Name: Comma statistics
Author: Anișor

Extension Description: Converts forum's statistics to human-readable numbers.
Extension Version: 1.0.0

Requirements: phpBB >=3.3.0,<4.0.0@dev

Features:
Refactoring numbers for the following:
  • Board index
  • Forum list (topics, posts, redirects)
  • Viewforum (topics, replies, views)
  • Viewtopic (poster posts)
  • Search (topic views, replies)
  • Members profile


:!: Example:
Total posts 4353741 • Total topics 708920 • Total members 408987
:arrow: Will become:
Total posts 4,353,741 • Total topics 708,920 • Total members 408,987

Screenshots:

Demo URL:
Demo Username:
Demo Password:

Extension Download: https://github.com/criminus/commastats/tree/main
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26825
Joined: Fri Aug 29, 2008 9:49 am

Re: [3.3][DEV] Comma stats

Post by Mick »

Nice, that’s something that bugs me from time to time, spot on👍🏼
  • "The more connected we get the more alone we become” - Kyle Broflovski© 🇬🇧
User avatar
Anișor
Translator
Posts: 330
Joined: Tue Jan 08, 2013 9:36 pm
Location: Arbroath, Angus, Scotland

Re: [3.3][DEV] Comma stats

Post by Anișor »

Mick wrote: Sun Sep 22, 2024 8:04 am Nice, that’s something that bugs me from time to time, spot on👍🏼
Aye, same for me. I have troubles with reading the numbers sometimes.
It was done previously by Christian (PlanetStyles) for phpbb 3.0 about 12 years ago I thought it might be useful. It is for me at least.
User avatar
HiFiKabin
Community Team Member
Community Team Member
Posts: 6767
Joined: Wed May 14, 2014 9:10 am
Location: Swearing at the PC, UK
Name: James

Re: [3.3][DEV] Comma stats

Post by HiFiKabin »

Mick wrote: Sun Sep 22, 2024 8:04 am Nice, that’s something that bugs me from time to time, spot on👍🏼
Likewise, great job
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28851
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier

Re: [3.3][DEV] Comma stats

Post by Paul »

Don't forget this is only a human readable format in English speaking languages.
User avatar
Anișor
Translator
Posts: 330
Joined: Tue Jan 08, 2013 9:36 pm
Location: Arbroath, Angus, Scotland

Re: [3.3][DEV] Comma stats

Post by Anișor »

Looks like there's a bug caused by $pagination->generate_template_pagination($topic_row['U_VIEW_TOPIC'], 'topicrow.pagination', 'start', (int) $topic_row['REPLIES'] + 1, $config['posts_per_page'], 1, true, true); there is no pagination for topics with > 1000 replies where number_format() kicks in. Unlike search.php, $topic_raw['REPLIES'] is used instead of $replies.
Thanks to HiFiKabin for testing it out I wasn't aware of this bug. I will update the code (if I'll figure it out).

EDIT:
For anyone using the first version, please check the repository again and apply the fixes / reinstall the extension.
It should work as intended now.
fixed.png
You do not have the required permissions to view the files attached to this post.
deninho32
Registered User
Posts: 238
Joined: Tue May 21, 2019 8:57 am

Re: [3.3][DEV] Comma stats

Post by deninho32 »

Paul wrote: Sun Sep 22, 2024 11:17 am Don't forget this is only a human readable format in English speaking languages.
Yes indeed, a dot (.) instead of a comma would be nice!
phpBB 3.3.7 | PHP Version 7.4.33 | Milk Theme
rxu
Extensions Development Team
Posts: 3900
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation

Re: [3.3][DEV] Comma stats

Post by rxu »

Currently number_format() uses default decimal and thouthands separators in the extension. it'd probably make sense to let a user choose those options somewhere in UCP -> Board preferences.
User avatar
Anișor
Translator
Posts: 330
Joined: Tue Jan 08, 2013 9:36 pm
Location: Arbroath, Angus, Scotland

Re: [3.3][DEV] Comma stats

Post by Anișor »

rxu wrote: Wed Sep 25, 2024 6:05 am Currently number_format() uses default decimal and thouthands separators in the extension. it'd probably make sense to let a user choose those options somewhere in UCP -> Board preferences.
Makes sense. But sometimes the administration will want to force this setting. I can do an update later and by default to be a comma. Thanks.

Return to “Extensions in Development”