View Single Post
  #5  
Old 03-22-2015, 03:32 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 91,199
Kyttias is on a distinguished road
Default

Ah, here's another one, this will display a user's avatar using {$avatar} in the template:

PHP Code:
       $profile $mysidia->db->select("users_profile", array("uid""avatar"), "username = '{$mysidia->user->username}'")->fetchObject();
        
$img "<img src='../../".$profile->avatar."' class='avatar'>";
        
$this->assign("avatar",$img); 
I have it creating an image with a class of 'avatar' which you can set into your css stylesheet to have set dimensions of your choosing. ^^
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote