View Single Post
  #1  
Old 07-12-2020, 01:09 PM
Micolai's Avatar
Micolai Micolai is offline
Loving Mysidia!
 
Join Date: May 2020
Location: Tennessee
Posts: 130
Gender: Female
Credits: 26,872
Micolai is on a distinguished road
Arrow 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(""));

}
__________________
"You try you fail, you try you fail, but the only true failure is if you stop trying. So try again." - Haunted Mansion
Reply With Quote