Current time: 05-24-2012, 01:28 PM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Changing UID format?
07-28-2010, 09:58 PM
Post: #1
Changing UID format?
How can I change MyBB UID's to four digits?

i.e. I want UID's such as 1, 54, 987 to become 0001, 0054, 0987

-Alan Shepperson
[Image: help.gif] Support Technician


Vote for MyBB as the Best Forum Software of 2012!
Find all posts by this user
Quote this message in a reply
07-29-2010, 12:36 AM
Post: #2
RE: Changing UID format?
If you're asking how to put zeroes in front of a number in PHP,

sprintf("%04d", 54) results in "0054"

It's not really possible to change the UIDs themselves. They're stored as integers in the database so leading zeroes will be removed as it goes into the database.

So all you could do is print them out with leading zeroes to the users, or in URLs.

I don't see how that would be useful or desireable though.

Google SEO | Gravatar | Hooks | HTMLPurifier | Overview | Patches | PluginLibrary
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | MyBB | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication