Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Creating a character for your user (http://www.mysidiaadoptables.com/forum/showthread.php?t=5661)

Micolai 07-12-2020 01:09 PM

Creating a character for your user
 
So, I don't really know php, but I did find a way you could add a character to a user's profile page that you manually set and create for your users while I wait to get something better lol. Basically, I will have a horse silhouette that is displayed on the new user's profile and after they give me the information I need I can create their character manually then update their profile in the database to have the new image.

So if you think this will work for you, then below is how I did it.
_____________

- Go to your PHPMyAdmin then to the adopts_users_profile
- You're going to make a new table called userimage

To set the table up you want to set it to type: VARCHAR 500 Collation: latin1_swedish_ci Null: Yes Default: This you set to be the image you want everyone to have upon registering
Then just hit "Go"

So, to change the image for your user you would just go to you the users and edit their table with the correct new image you want to set and update it and it'll change that person's image only.

Now, you'll want to go to your class_usersprofile to setup the image to show up from the database. Down in the same area as this:

Quote:

$document->add(new Image($this->avatar, "avatar", 150));
you'll want to add your code to call your database image which is this:

Quote:

$document->add(new Image($this->userimage, "userimage"));
and that's it! :] This is what my code looks like in that little bit area:

Quote:

$document->add($title);
$document->add(new Image($this->avatar, "avatar", 150));
$document->add(new Comment(""));
$document->add(new Comment(""));
$document->add(new Image($this->userimage, "userimage"));
$document->add(new Comment($basicinfo));
$document->add(new Comment(""));

}

Pen 07-13-2020 01:21 PM

Thanks for this tutorial! I'll have to give it a go! :)

Micolai 10-24-2020 12:16 AM

You're very welcome!


All times are GMT -5. The time now is 09:00 PM.

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