PDA

View Full Version : How to check if user has avatar and display it in header


vexxy
09-17-2011, 08:43 PM
Hey,

I want to display an user's avatar, near the Welcome, %user message in the header. For this, I need a condition that checks if that user has an avatar and if it has, display it there..if not, display something else or nothing.

i tried using this:

<vb:if condition="$show['avatar']">
<a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
</a>
</vb:if>

but no luck

Tnx in advance

Bisha
02-20-2012, 02:56 PM
Hmm look nice!

Did you find any solution?

TombstoneWarrior
03-09-2012, 10:46 AM
There is a vb4x mod to do this for you now just search for it. :)