Being a very lazy person, I like to make my scripts as simple as possible. Usually I achieve this by messing around with the functions. Today I made an easy one that allows you to put the user's avatar wherever you want!
First, add this function to the page functions/functions_users.php:
PHP Code:
function usernametoavatar($name){
$row = $GLOBALS['adopts']->select("users_profile", array("username", "avatar"), "username='{$name}'")->fetchObject();
return $row->avatar;
}
Now, on whatever page you want to add their avatar to, paste this anywhere on the page before $article_title:
PHP Code:
$avatar = usernametoavatar($username);
Then, in your $article_content, place this wherever you want the avatar to show up:
PHP Code:
<img src='{$avatar}' />
Ta da! They will see their own avatar!