Kunena 6.2.6 released

The Kunena team has announce the arrival of Kunena 6.2.6 [K 6.2.6] which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question [Merged topic] When the number of views or replies is greater than 9999 ...

More
13 years 5 months ago - 13 years 5 months ago #1 by Mikote
Hi.


On the home page of my forum (Kunena 1.6 stable), when it comes to the 9999 responses shows 10.00k replies.

It is more logical to display 10000 replies?

Any idea?


Miguel
Madrid (Spain)
Attachments:
Last edit: 13 years 5 months ago by sozzled. Reason: Merged topic: Changed subject to improve search relevance

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #2 by fxstein
Replied by fxstein on topic More 9999 replies
Hi this a space thing for larger forums.

10,000 or 50,000 or 100,000 or 500,000 or 1,000,000 wont fit into the same space as 4 digits would.

Therefore Kunena 1.6 has a formatting engine that always reduces to 4 significant digits.

The output becomes 10.00k, 50.00k, 100.0k, 500.0k, 1.000m, 10.00m, 100.0m (k and m being part of the translation file for thousand and million).

This makes sure the template does not break, just because these numbers get too big.

Hope this helps!

We love stars on the Joomla Extension Directory . :-)

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #3 by Mikote
Replied by Mikote on topic More 9999 replies
Thanks for the reply fxstein, I understand the reasons.

Greetings.

Miguel
Madrid (Spain)

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #4 by ComposerRyan
Is there anyway to fix this so it displays the entire number on the category listing page? Right now, it lists the number of replies in the category as "10.48k replies"

I want it to display as "10,480 replies" Is there a way to fix this? Thanks!

Ryan

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #5 by sozzled
The following user(s) said Thank You: ComposerRyan

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #6 by ComposerRyan
Thanks Sozzled. That does make sense..but I have to ask: do you give the option to display it as 10,000?

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #7 by sozzled
Replied by sozzled on topic Re: More 9999 replies
What option were you looking to find? Kunena, as you already know, can be changed. Somewhere in the source code there will be a conditional statement that says, if the number of replies is greater than 9999 divide that number by 1000 and put a K after it. But I haven't dug into at the source code to find where that statement is. That's something you can do. ;)
The following user(s) said Thank You: ComposerRyan

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #8 by ComposerRyan
Replied by ComposerRyan on topic Re: More 9999 replies
Okay, I have no idea where to find that in the source code unfortunately. :( I will try to look at it but Kunena has hundreds of files to look through...

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #9 by sozzled
Replied by sozzled on topic Re: More 9999 replies
You will find the coding that changes the number forum in ../component/com_kunena/class.kunena.php - from around line 656, look for the function formatLargeNumber($number, $precision = 4)

Each time you upgrade Kunena you will have to remember to change this file.
The following user(s) said Thank You: ComposerRyan

Please Log in or Create an account to join the conversation.

More
13 years 5 months ago #10 by ComposerRyan
Replied by ComposerRyan on topic Re: More 9999 replies
Thanks again Sozzled! Here is what I changed:

open components/com_kunena/class.kunena.php


1) Next find this code:

} elseif ($number >= 1000000) {
$output = $number / 1000000 . JText::_('COM_KUNENA_MILLION');
} else {
$output = $number / 1000 . JText::_('COM_KUNENA_THOUSAND');
}




2) Next, replace it with this:

} elseif ($number >= 1000000) {
$output = $number;
} else {
$output = $number;
}

The following user(s) said Thank You: gjhvs

Please Log in or Create an account to join the conversation.

Time to create page: 0.975 seconds