The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Comma in Post Counts Causing trouble
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"; } Thanks in advance if somebody can help me. |
#2
|
|||
|
|||
You can just use:
PHP Code:
|
#3
|
||||
|
||||
Quote:
So I would take out what I added to get the commas in, but where would I add the code that your talking about? |
#4
|
|||
|
|||
number_format adds commas; I thought that was your question (but then again I'm really tired ).
|
#5
|
||||
|
||||
Quote:
So how would I go about getting commas in the post count in user profiles? |
#6
|
|||
|
|||
As Filburt pointed out, it's a one line fix. Throw away your code and use his one line.
|
#7
|
||||
|
||||
Quote:
Unfortunantly it's not. I have that one line and I have many places where postcounts are as 56687 without a comma anywhere insight. :ermm: |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|