PDA

View Full Version : Code to get user profile image


Hedgen
03-05-2013, 07:45 PM
What is the code that grabs the avatar link from the database and displays it on the profile tabs? Or where would I find that? I tried doing
<img src='/{$mysidia->users_profile->avatar}' alt='Your Profile Image.' height='42' width='42'>and that didn't work. I'm trying to add the user's profile image to the left side of my site.

Still can't get this to work :( I first putting the image into $imgdata and then putting that into the src of the image tag, and that didnt work:
$imgdata and img tag

$imgdata = '/{$mysidia->users->profile->avatar}';
$sidebar = "
<b>Welcome {$mysidia->user->username}!</b><br />
<img src='".$imgdata."' alt='Your Profile Image.' height='42' width='42'>
<br />
{$mysidia->settings->cost}:{$mysidia->user->money}<br />
<a href='donate.php'>Donate Yukkuriens</a>
<a href='account.php'>My Account</a>
<a href='logout.php'>Log Out</a>";I have tried $imgdata with and without the / also.
https://dl.dropbox.com/u/70841426/Thedarkness2.png
is the image, and it loads fine on the profile page, but not on my sidefeed

Hedgen
03-10-2013, 12:09 AM
Whenever I try adding something that might work, it has a blank image or a broken image :(

Moontides
04-14-2013, 11:46 AM
I know this is really old, but I'm actually curious about this too...