MyBB Community Forums

Full Version: [F] Number don't have a comma sign when it's more than a thousand
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Many position in portal page such as Forum Statistics, Online Users and Latest Threads, don't show a comma sign when it's more than a thousand.

How to fix it?
Thank you.
chaime Wrote:Many position in portal page such as Forum Statistics, Online Users and Latest Threads, don't show a comma sign when it's more than a thousand.

How to fix it?
Thank you.

Can you take a look into your General Configuration Settings and see if Thousands Numeric Separator is filled in ?
Yes, I already setting it.
It's OK for index page (in stat field - bottom of page) but it not when view in portal page.
This is include this web too.
Look at http://community.mybboard.net/portal.php
chaime Wrote:Yes, I already setting it.
It's OK for index page (in stat field - bottom of page) but it not when view in portal page.
This is include this web too.
Look at http://community.mybboard.net/portal.php

Can't test it, my testforum hasn't got that many posts and stuff =P
But can you try this ::

Open portal.php

Find
	$threadsnum =  $stats['numthreads'];
	$postsnum =  $stats['numposts'];
	$membersnum = $stats['numusers'];

Just don't get why they've put each stat in a variable, they don't get used in the template =/ =P

Change into

	$stats['numthreads'] =  my_number_format($stats['numthreads']);
	$stats['numpost'] =  my_number_format($stats['numposts']);
	$stats['numusers'] =  my_number_format($stats['numusers']);
Lex- the functions.php file is included in the inc/init.php file so that edit is not needed.
CraKteR Wrote:Lex- the functions.php file is included in the inc/init.php file so that edit is not needed.

ok =P //Removing =P
Thank you very much, it's work!
I think this can be classified as a bug. All numbers should be passed through my_number_format before being outputted.
This bug has been fixed in the latest code.

Please note the latest code is not live on the site or for download. An update will be released which contains this fix.