View Full Version : I'm numbah 1! (ID Option?)
Rozel
03-18-2011, 12:39 PM
I'm sure you just edit something in the database or something, but I'm a nub with PHP and such. I just know how to edit premade scripts, not really make stuff x3;
So anyways. I would like to know how to, for every new member, they get an ID number next to their name. So for example, I could be; Bob (#1). Next person who registers will be shown as Bobita (#2), etc.
Thank yah~ :3
Inf3rnal
03-18-2011, 03:29 PM
All users already get an ID.
It's stored in the MySQL database in:
adopt_users and it's the first row labeled "uid".
It automatically increase the uid by 1 when someone joins.
AlexC
03-18-2011, 03:32 PM
I think Rozel's wondering if it's possible to display that. xD
Hall of Famer
03-18-2011, 03:56 PM
Well just use concatenation operator to display both the variable username and uid on user profile.
Rozel
03-18-2011, 08:34 PM
<.< I feel terribly dumb not knowing what that means, but I have a small idea of it's definition. I'll look it up xD
The Codfin Keeper
03-19-2011, 08:54 AM
It means to go to profile.php and where it has this;
$usersname=@mysql_result($result,$i,"username");
$usersgroup=@mysql_result($result,$i,"usergroup");
$website=@mysql_result($result,$i,"website");
$aim=@mysql_result($result,$i,"aim");
$yahoo=@mysql_result($result,$i,"yahoo");
$msn=@mysql_result($result,$i,"msn");
$membersince=@mysql_result($result,$i,"membersince");
$avatar=@mysql_result($result,$i,"avatar");
Add this:
$uid=@mysql_result($result,$i,"uid");
And where it has something like this:
$article_content = "<b><u>".$lang_basic_info."".$usersname.":</u></b><br><br>
Change it to:
$article_content = "<b><u>".$lang_basic_info."".$usersname."(#".$uid.") :</u></b><br><br>
And it should display the user number. :pleased:
Rozel
03-19-2011, 09:50 AM
Yay! You made it so much simpler for me. x3~ I thank you dearly.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.