Support Forums / Tips & tricks / Archives / 12-20-2006 / Numbers separated by comma

Topic: Numbers separated by comma
June 9th, 2006 07:43 AM
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?
June 9th, 2006 03:40 PM
Orpheas The number is retrieved server end, it would have to be done there I believe.
June 9th, 2006 11:05 PM
Catchow Peter has been made aware of this request and will be responding soon I believe.
June 9th, 2006 11:50 PM
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)
June 10th, 2006 03:55 AM
Peter That's the way the numbers looks in the database. The numbers could possibly be formatted with a javascript.
June 10th, 2006 10:29 AM
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?
June 10th, 2006 01:20 PM
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.
June 10th, 2006 04:19 PM
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.
June 10th, 2006 05:57 PM
Catchow That's kinda what I thought sdn. Maybe in a future update it will take place.
June 10th, 2006 11:47 PM
Koyana Nuva Where do you guys learn how to do this stuff manually? School, Google, or Messing around?
June 11th, 2006 01:05 AM
sdn Books, Google, http://php.net .
June 11th, 2006 11:28 PM
Sage as sdn said,
books, google, php.net
I also looked at pixel2life.com in the php section :)