I'm hoping somebody can help me with a problem I'm having. In my forum I included a comma in post counts so that instead of saying a post count of 50000 it would show up as 50,000. The problem is, is that sometimes it will not show the last digit so a post count of 50,000 would show up as 50,00 Can somebody help me fix this probem? Here are the instructions I used to get the comma in the post counts:
Code:
In admin/functions.php:
Look for:
code:
//highlight words for search engine
Add the following directly above it:
code:
if($post[posts] >= 1000) {
$left = floor($post[posts] / 1000);
$right = $post[posts] % 1000;
$post[posts] = "$left".","."$right";
}
Can somebody tell me if the intructions are messed up or what I can do to fix this problem? I will remove the comma before I put up with this problem any longer, but I was hoping somebody might be able to help me get the commas to work correctly.
Thanks in advance if somebody can help me.