Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 690

Fix Broken Default Avatars for MyBB Last Post Avatar Plugin

$
0
0
Preview 

[Image: Screenshot-87.png]

How to fix:
  • Log in to your MyBB Admin Panel.
  • Go to Home > Template Sets > Your Theme Templates > forumdisplay_thread.
  • Copy and paste this code into the forumdisplay_thread template:
<!-- Default Broken Avatar Fix - Author: Xferno - Website: exfum.team --><script>
$(document).ready(function() {
    $('.avatarep_bg.avatarep_forumdisplay_img').each(function() {
        if (!$(this).attr('src')) {
            $(this).attr('src', '/images/default_avatar.png');
        }
    });
});
</script>


In the Last Post Avatar Plugin settings:
Locate and set "Shows white or broken avatars as default" to 'Yes'.

Viewing all articles
Browse latest Browse all 690

Trending Articles