What condition can i use to make the default avatar display as CSS in memberlist_user_avatar template ?
Something like
<if $useravatar['image'] = images/default_avatar.png then>
<i class="fa fa-user-circle-o"></i>
<else>
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
</if>
Try with this:
<if $useravatar['image'] == "images/default_avatar.png" then>
<i class="fa fa-user-circle-o"></i>
<else>
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
</if>
or with this:
<if $useravatar['image'] == str_replace('{theme}', $theme['imgdir'], $mybb->settings['useravatar']) then>
<i class="fa fa-user-circle-o"></i>
<else>
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
</if>
(2017-08-13, 04:44 PM)chack1172 Wrote: [ -> ]Try with this:
<if $useravatar['image'] == "images/default_avatar.png" then>
<i class="fa fa-user-circle-o"></i>
<else>
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
</if>
Tried that already, does not work.
(2017-08-13, 04:56 PM)chack1172 Wrote: [ -> ]Try the second code
Still not. The CSS displays but the avatar does not display when a user has one set.
This should work:
<if $useravatar['image'] == $mybb->settings['bburl'].'/'.$mybb->settings['useravatar'] then>
default
<else>
<img src="{$useravatar['image']}" alt="" {$useravatar['width_height']} />
</if>