There is also a small problem with the number of Downloads reported in a status panel when there are a high number of downloads. For example if there are say 26,143 it reports just 26. The (int) cast, which is used in the code, will terminate at the comma so 26,143 will be returned as 26. The intval() function gives the same problem.
See
http://www.jdownloads.com/forum/index.php?topic=8953.0 for example
File \com_jdownloads\admin\views\jdownloads\tmpl\default.php has code in lines 161 to 183 such as
<?php echo (int)$stats_data['files_public'];?>
This could be replaced with code such as
<?php $temp = str_replace( ',', '',$stats_data['files_public']);
echo (int)$temp;?>
If there is a possibility of multiple characters due to language differences then
<?php $temp = str_replace(array('.', ','), '',$stats_data['files_public']);
echo (int)$temp;?>
Each of the above could be combined into a one line statement.
I have not tested the above as I have insufficient downloads!!
Colin,
thanks for this info. Maybe could help also floatval(). I will check and fix it.
Arno
Just discovered a php function numfmt_parse which might also be worth checking out. See
http://man.hubwiz.com/docset/PHP.docset/Contents/Resources/Documents/php.net/manual/en/numberformatter.parse.html
Useage is to set up format using the language code and then it sorts it out.
Colin
PS there is also a currency based one numfmt_parse_currency
Hi Colin,
thanks for the link but i have this bug already fixed.
I have removed the compute parts in the default.php and also the (int). ;)