How to list all blogs with avatars?

0

It appears as though the List All plugin I’ve read about is no longer in the wpmudev project repository. I’m about to give the Listem plugin a try, but it does not appear to show avatars.

What are the chances of getting a solution for easily listing all blogs?

There is the Blogs Widget, but for those of us who wish to create a community page listing all blogs, something similar to the Recent Posts plugin would be just grand! Thanks for the consideration.

  • Andrew
    • Champion of Loops

    Hiya,

    You’ll have to add avatar support to that plugin. Since that is a freely available plugin and our avatars solution is not, we won’t be adding avatars into the list all plugin.

    It’s really simple though, all you need is the blog id. Ex:

    domain.tld/avatar/blog-BLOGID-SIZE.png

    Blog 1 with 32 px avatar:

    domain.tld/avatar/blog-1-32.png

    Thanks,

    Andrew

  • jcnjr
    • WP Core Meltdown

    It’s really simple though

    For some, apparently. Many thanks for the clarification.

    Understanding that this falls outside the realm of support offered in these forums, would anyone else care to shed some light on how to make this work?

  • Andrew
    • Champion of Loops

    For some, apparently. Many thanks for the clarification.

    Nah, it really is simple. All you had to do was add an image tag.

    I modified three lines to make this work on any site but if you were to have modified it just for your site you would only have had to modify one line.

    Take a look at lines 44 and 47 for the two modified lines with the image tag. The original lines are commented out just above the modified lines so you can see what was done for future reference.

    Thanks,

    Andrew

  • jcnjr
    • WP Core Meltdown

    Thank you so much for the continuing education. Everything is becoming clear as mud. :wink:

    All I need to do now is figure out how to get the local default avatars to display instead of identicons for those blogs with no custom avatar.

  • Andrew
    • Champion of Loops

    All I need to do now is figure out how to get the local default avatars to display instead of identicons for those blogs with no custom avatar.

    Just replace the image tag with the get_blog_avatar() function from the avatars plugin (avatars.php):

    get_blog_avatar( BLOG_ID, SIZE, ” )

    Ex:

    $echo ‘html’ . get_blog_avatar( $bid, 16, ” ) . ‘more html’;

    Hopefully that helps. All you have to do is replace the image tag I added with the above function call.

    Thanks,

    Andrew

  • jcnjr
    • WP Core Meltdown

    Have I told you lately how much I appreciate all your help? :wink:

    Alas, I must be doing something wrong. I replaced the entire image tag with that function call and …

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘,’ or ‘;’ in /home/tripawds/public_html/wp-content/mu-plugins/list-all.php on line 44

    I’m sure this is a simple syntax issue I’m not seeing, but I tried various attempts with the same results. Or… perhaps a silly question, but should that ‘html’ and ‘more html’ remain in the call as is or does it indicate actual html I need to add? Thanks again. I’d understand if you’re about ready to give up on me.

  • qwerty55
    • WPMU DEV Initiate

    I Have installed the avatar plugin, and now i tried the list-all plugin, which you edited in the latest comment. But it only shows 1 avatar when adding the avatar widget in the sidebar, how can i make it show all blog avatars ? I dont understand how this avatar plugin works, what instruction is needed for it to show a blogavatar, is it the blog url, or what , and where shall this instruction be put ?

  • veridical
    • New Recruit

    Hi there,

    I’m trying to get the list-all plugin to work correctly, but keep receiving the following error:

    Warning: Invalid argument supplied for foreach() in /wp-content/mu-plugins/list-all.php on line 23

    Can you provide any insight as to what may be causing this problem?

    Thanks for your help,

    -Rob