MyBB Community Forums
[For 1.8] Fix Broken Default Avatars for MyBB Last Post Avatar Plugin - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Resources (https://community.mybb.com/forum-8.html)
+--- Forum: Tutorials (https://community.mybb.com/forum-38.html)
+--- Thread: [For 1.8] Fix Broken Default Avatars for MyBB Last Post Avatar Plugin (/thread-239819.html)



Fix Broken Default Avatars for MyBB Last Post Avatar Plugin - Xferno - 2023-12-17

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'.


RE: Fix Broken Default Avatars for MyBB Last Post Avatar Plugin - lkop - 2023-12-22

can you fix this:

https://community.mybb.com/thread-109558-post-1390120.html#pid1390120


RE: Fix Broken Default Avatars for MyBB Last Post Avatar Plugin - Xferno - 2023-12-22

(2023-12-22, 12:40 PM)lkop Wrote: can you fix this:

https://community.mybb.com/thread-109558-post-1390120.html#pid1390120

as  Whiteneo said that is plugin default things.