|
|
| Topic: Numbers separated by comma |
|
|
|
|
| Dreamwalker |
Is it possible to write a script that make numbers (such as the numbers in the posts column on the forum's front page) separated by a comma after 1000?
Like this: 1234 -> 1,234.
I know this isn't an important thing, but I think it would look cool. :D
Is it possible to do that? |
|
|
| Orpheas |
The number is retrieved server end, it would have to be done there I believe. |
|
|
| Catchow |
Peter has been made aware of this request and will be responding soon I believe. |
|
|
| SivoxII |
Quote: Orpheas wrote:
The number is retrieved server end, it would have to be done there I believe.
|
Yup! ... i would think you're right Orpheas, as i would imagine being a live update field from the server, it would need any coding/field format implemented on that end.
(that's probably not written in true "techie" accuracy, but sure you get the idea) |
|
|
| Peter |
That's the way the numbers looks in the database. The numbers could possibly be formatted with a javascript. |
|
|
| Dreamwalker |
Thank you for the response. :)
Still, I'm not really sure what you all mean, though... Is is possible to do it with a javascript? Is that script available somewhere? |
|
|
| Catchow |
Dreamwalker
My answer is "I don't know" You might ask sdn though. I wouldn't begin to know how to write a script for this. |
|
|
| sdn |
It would make much more sense to do this with PHP before the number is printed: number_format(1234). It would be impractical to do it with Javascript, and I'm not sure if it would work in Firefox. |
|
|
| Catchow |
That's kinda what I thought sdn. Maybe in a future update it will take place. |
|
|
| Koyana Nuva |
Where do you guys learn how to do this stuff manually? School, Google, or Messing around? |
|
|
| sdn |
Books, Google, http://php.net . |
|
|
| Sage |
as sdn said,
books, google, php.net
I also looked at pixel2life.com in the php section :) |
|
|