BuddyDev

Introducing BuddyPress Members With Uploaded Avatars Widget

Ever wanted to encourage the members to upload their avatar/photo. Here is widget that may give them a reason to upload their avatars. The BuddyPress  Members with Avatars Widget allows you to showcase the list of members who have uploaded their avatar recently/changed their photos.

It is a very simple plugin and my special thanks to @Igor for the idea.

It works on two very basic principles

  • We record when a member uploads a new avatar
  • We remove the flag when the user deletes his/her avatar

The plugin allows you to filter member list by recently activity, randomness, popularity, alphabetically or by Joining date. You can further specify the no. of Users to be listed and their avatar size to be used. If you are using image below size 50px, I recommend choosing thumbnail in the type select box, else use full.

Here are a couple of Screenshots

And Here is the output for me on my local server.

Please do note that the plugin will only be able to track the photo changes after it is activated. It won't track that for the users who uploaded images before this plugin was activated.

Other than using the widget settings, you can customize the members entry in the list of members.

I have included a hook

 

Download & Installation:

Link:  https://buddydev.com/plugins/buddypress-members-with-uploaded-avatars-widget/

It is a free plugin and I hope some of you will like to use it on your social networks. Please do let me know in the comments if you are using this 🙂

32 Responses to Introducing BuddyPress Members With Uploaded Avatars Widget

  • Brajesh this is great. One question: Will it show Facebook-registered-users also? I'm using your Facebook login/register plugin and all people coming from facebook generally have an avatar, even though they have not performed the "upload avatar" action within the BP site 🙂

    Thanks for this! Congrats

    • Hi Junama,
      Thank you for the comment.
      Currently, It won't list the user registerd via Facebook(if thy are using Facebook image). I can certainly improve upon that. Please post a topic in the forum and I will post the code to do that 🙂

  • Fantastic, Brajesh, as always 🙂 I'll post then, cheers!

  • I'm using this new plugin (v1.0) with BP 1.6.1 and the Salutation theme – working perfect. Thanks. One question to CSS modification: the second row of avatars «hangs» directly under the first one. There is no CSS included in the plugin so I would have to customize the Salutation CSS what will have effect to the whole theme… Do you have a plan to include a CSS file in the plugin?

  • Hi, @schwarzaufweiss, It will depend on your current theme css file, if the avatars show in some manner or another. You can see it on my theme (still a work in progress http://www.soysurfista.com ) that they show with a margin, that I did by adding a css style at the bottom of the main theme's stylesheet:


    #bpmemberwithuploadedavatarwidget-2 a {
    float: left;
    margin: 3px;
    }

    If you don't want to touch the theme stylesheet you can add a style HTML tag in the same file of the plugin (bp-member-with-uploaded-avatar.php) around line 188, look for:


    echo '';

    …and leave it like this:


    echo '#bpmemberwithuploadedavatarwidget-2 a {float:left;margin:3px;}';

    There you can add any style you want, just keep a note about this change in order for the next time you upgrade the plugin to be able to add this change again (you would have to do the same thing if you tweaked the plugin stylesheet if it existed).

    Hope it helps! 🙂

  • Oh I almost forgot to tell you that you will check the id of the widget in your WordPRess/BuddyPress installation since widgets are kind-of-automatically named by WordPress. In my case the div tag that contained the avatars was called bpmemberwithuploadedavatarwidget-2 but you should check it in your install and reference YOUR current div id in your CSS selectors 😉

  • @juanmaguerrero Thanks a lot, Juanma. Working perfect:

    https://www.info.ch/mitglieder/

    Instead of using margin: 3px I've used padding-bottom: 14px in Salutation's Custom CSS field to fit the theme. Again, thanks a lot and have a nice weekend!

  • Nice weekend for you too, so glad it helped 🙂

  • Hello, anyone have the code to display on theme page? I like this to display on the home page instead of sidebar widget. Thank you.

  • Hello, anyone here????? I really need this!

  • Rob #

    I was going to ask the same question. Brajesh, is there a shortcode available to embed the uploaded avatars into a page?

    Thanks
    Rob.

    • Hi Rob,
      I am sorry but we don't have the shortcode at the moment.
      I forgot to reply to @shtravel

      Will put the shortcode by the weekend with all these options.
      Thanks
      Brajesh

  • Hi Brajesh, that would be awesome. Having the ability to embed Avatars in a page and being able to configure everything that the widget currently does in a shortcode would be really useful for me.

    Specifically, being able to select the size of the Avatar and being able to choose what Avatars to display, including members who haven't uploaded an Avatar.

    Looking forward to the weekend – Rob 🙂

  • Hi Brajesh, it's the Weekend 🙂 Will the shortcode be available later today?

    All the best
    Rob.

  • Hi Brajesh, do you manage to look at this over the weekend?

    Thanks
    Rob.

    • Hi Rob,
      sorry I could not work on weekend, but I am on it today. Hoping to release it by morning tomorrow.

  • Awesome! Is it available now, Brajesh?

    Thanks
    Rob.

    • Hi Brajesh, is the shortcode available yet please?

      Thanks
      Rob.

      • Hi Rob,
        I am really sorry for the delay. Please allow me 1-2 more days. Got worked up with a couple of things.

  • Hi Brajesh, any luck with the Shortcode yet please?

    Thanks
    Rob.

  • Hi again Brajesh, I'm sorry to keep chasing you on this, but is the Shortcode available yet please?

    Thanks
    Rob.

  • Brajesh, I know you're busy, but I really could do with the ShortCode please. Any idea when this will be available to download?

    Thanks
    Rob.

  • Brajesh, my original request for the ShortCode was made way back in Feb, and @shtravel requested this even earlier than that… You said on Mar 4th:

    "sorry I could not work on weekend, but I am on it today. Hoping to release it by morning tomorrow."

    We're now well into April and still nothing… Please, is this something that is ever going to be introduced?

    Thanks
    Rob.

  • @Brajesh Singh and news please?

    Rob

  • @Brajesh – any news please?

  • Hi Brajesh,

    The below message is from Debug.

    wp-content/plugins/bp-members-with-uploaded-avatar-widget/bp-member-with-uploaded-avatar.php:168 – BP_Core_User::get_users is deprecated since version 1.7! Use BP_User_Query instead.

    Any chance you can apply this patch to make this awesome plugin compatible with version 1.7 of BuddyPress?

    Cheers,
    Vernon

    • Hi Vernon,
      Thank you for the comment and reporting the issue.
      I have updated the plugin on github, can you please check and let me know if it works. I will upload the plugin here then 🙂

  • Thanks Brajesh. Version 1.0.2 works well with WordPress 3.5.2 and BuddyPress 1.7.2
    https://github.com/sbrajesh/bp-members-with-uploaded-avatar-widget

    Cheers,
    Vernon

  • @sbrajesh Is it working with 1.8?

  • Hi
    BuddyPress Members With Uploaded Avatars Widget can you make this so that it shows avatars by group?

    Thanks
    Danny

    • Hi Danny,
      I am sorry but I could not understand what you want. Can you please explain a little more ?