Blogs Directory need to control the avatar size

Okay... so I have a multi-site with blogs directory and your avatars plugin. I'm having an issue with controlling the display size of the avatar in the list that blog directories plugin creates.

The issue is that the blogs directory plug seems to make a table and inside of the first column, there a site avatar. BUT... and this is the problem part... instead of the image being wrapped in a unique class or something, it has inline styling that forcing it to be 32x32 making any CSS styling I do pointless as the inline overrides it.

So, what I'm asking here is that you update the blogs directory plugin to change the coding of this and/or give backend options to change the display size as it is pretty useless style wise as it stands.

Thanks.

  • Tyler Postle
    • CGO

    Hey Micha,

    Hope you're doing well today!

    Moving this over to our feature request section, hopefully some other members will chime in as well :slight_smile:

    In the meantime, you can try this CSS:

    .blogs_directory_table img.avatar {
      width: 100px;
    }

    If that doesn't work, then try this:

    .blogs_directory_table img.avatar {
      width: 100px !important;
    }

    We don't normally want to use the !important declaration; however, sometimes it can be a necessary evil.

    Let us know if you have any further questions!

    Cheers,
    Tyler

  • Micha
    • Recruit

    Hey Tyler. Thanks for the code. So the CSS works and style it (thanks for that), but it still doesn't work.

    I think this part may be due to the avatar plugin. I know that when you upload a site avatar, it forces a crop. That crop seems to be set at 32x32 and there's simply no setting to change it.

    I think this plug could use an update to allow for this.

    In the meantime, is there a hook that I can use to override these settings without having to re-write code in the plugin?

    Thanks.

  • Hoang Ngo
    • Code Slayer

    Hi there,

    I tried to find a way for update the image size without change the plugin code, however, it seem we don't have any filter or hook for that :slight_frown:.

    So to update this, a change to plugin code is required. Please note that, after you update the plugin, you need to bring back the change.
    In the file blogs-directory/blogs-directory.php, line 43, you will see a code like this
    $content .= '<td style="background-color:' . $bg_color . '; padding-top:10px;" valign="top" width="10%"><center><a style="text-decoration:none;" href="http://' . $blog['domain'] . $blog['path'] . '">' . get_blog_avatar($blog['blog_id'], 32, $avatar_default) . '</a></center></td>';
    From here, you can see the 32 number, which is the size. You can change that to 64 or 128, or larger.

    If you have any additional issues, please let us know and we'll be happy to help.

    Best regards,
    Hoang

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.