Quote:
Originally Posted by ndahiya
if you use avatars, then this is not for you. my site uses profile pics and not avatars.
|
hmmm sorry to hear that... may be we can do condiotion?
IF user has avatar -> show avatar
ELSE -> IF user has profilepicture -> show profilepicture
So here it is my fix.
1. change in plugin Profile Pic in Postbit (AdminCP => Plugin Manager => Profile Pic in Postbit => Edit):
Code:
$template_hook['postbit_userinfo_right_after_posts'] .= '<dd> <img src=' . $post[profileurl] . ' ></dd>';
to
Code:
$template_hook['postbit_userinfo_avatar'] .= '<dd> <center><img src=' . $post[profileurl] . ' style="max-width:150px;"></center></dd>';
2. in template Postbit_Legacy (or Postbit if you do not use legacy layout) change:
Code:
<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>
to:
Code:
<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:else />
{vb:raw template_hook.postbit_userinfo_avatar}
</vb:if>
Done