Adding User Avatars to lastpost Node

J2A

Member
Just having some difficulty tweaking this template and understanding how the User avatar system works

Code:
<xen:avatar user="$forum.lastPost"  img="true" />

I've noticed the size property is used here, but all the sizes are unsuitable for what i require and also with this code it links to the correct profile but the (just shows the default avatar) actual avatar of the user does not display?

Any suggestions how to get this work correctly? Heres what i want it to look like: http://dribbble.com/shots/166859-Forum

Any help would be appreciated! (This should be in the questions section)
 
James, I just realized if the user doesn't have an avatar set, It shows nothing at all. Not even the default user avatar. What would need to be added to amend this?
I have implemented it without the username in the img-tag (alt="...stPost.username}"). Now it shows no text (username) if there is no avatar set.
 
I'm not sure if I can check if the user has an avatar. The helpers don't work because not enough information is exposed (so it'll show the default avatar for everyone) :(
 
In EXTRA.css, put (for example):

Code:
.nodeLastPost img {
border: 1px solid #c4c4c4 !important;
border-radius: 3px !important;
padding: 2px;
float: left;
width: 30px;
height: 30px;
margin-right: 9px;
}

example.webp
 
Top Bottom