Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   I'm numbah 1! (ID Option?) (http://www.mysidiaadoptables.com/forum/showthread.php?t=2020)

Rozel 03-18-2011 12:39 PM

I'm numbah 1! (ID Option?)
 
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;

PHP Code:

$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:

PHP Code:

$uid=@mysql_result($result,$i,"uid"); 

And where it has something like this:

PHP Code:

$article_content "<b><u>".$lang_basic_info."".$usersname.":</u></b><br><br> 

Change it to:

PHP Code:

$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.


All times are GMT -5. The time now is 03:37 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.