Skip to:
Content
Pages
Categories
Search
Top
Bottom

Different avatars being set……?


  • lookingahead
    Participant

    @lookingahead

    Hi!

    I’m looking to have a default avatar for different member types. So, upon registration, a user would be assigned, by default to the ‘Participant’ level. Or, another level.

    Thing is, if they register and are given a different level upon registration, such as ‘Moderator’ I do not want them to have the same default BuddyPress avatar as a ‘Participant.’ Because I want it to be clear in conversation threads what the level of each member is — who is ‘running things’ so to speak.

    I want Moderators to have a different avatar in conversation than a Participant. To make it obvious. And nooooo, looking at the top of the Group’s page is not sufficient to indicate this, as it would be easy to overlook if all avatars were the same; people are not going to easily see the ‘Moderator’ status under an avatar if they’re on mobile, or in a rush, or don’t care to view the person’s information/avatar past a glance. I want it to be incredibly obvious what level each person is in each discussion.

    And I want it to be automated. By default — that when a user signs up and is assigned a member type that they get the correct ‘member level’ avatar for their status.

    Note: I do not need this to be editable past their member type…because to be honest that is a hassle. I want it to be done based on their membership type, without me having to upload a new avatar each time…I want a member type to use the same avatar over and over again.

    And if that user’s level changes in the future, either to a higher level or a lower one, I want their avatar to be the new one — automatically — that is associated with their new member type that everyone else has, that has the same member type level as they now do.

    NOTE: I have ‘extended profiles’ shut off, and there is no reason to put them back on. I’ve tried that recently in my quest for ‘how the hell do I make avatars look different’…. 🙂 BUT turning on extended profiles messed up my site. Also, I tried turning on the feature ‘allow members to upload avatars’ and that messed up my site as well.

    I currently am using ‘BuddyPress First Letter Avatars’ with GREAT success; it is FAB. And the fact that it works to affect the appearance of BuddyPress avatars WITHOUT my having to enable extended profiles or turn on the ability for users to upload their own avatars…proves to me that I can edit avatars with code independent of those features being turned on.

    Remember — I can’t just have pretty avatars there. I need certain avatars based on member type. So using ‘BuddyPress First Letter Avatar’ as the plugin for my site is not a long-term solution. Currently my site is in development, so nobody else sees anything but me…when the site goes live though, I need to have the avatars populate based on member level. That plugin is not what I need…it does demonstrate that the idea I have behind getting this done is perhaps possible, though, as it does affect avatar appearance without breaking my site. I’d LOVE to reverse engineer it, and modify it for my purposes, but to be honest that’s a little past my paygrade. 🙂

    ONE OTHER thing to keep in mind: I do NOT want gravatars to be used on my site. Not ever.

    So I’ve shut those off. They repeatedly call back to the WordPress servers….something I don’t want. So I’ve used code that is listed in the BuddyPress codex to shut gravatars off. And am using a plugin to shut off gravatars within WordPress itself, outside of BuddyPress.

    Ideally, I’d love to accomplish setting avatars based on member levels, automatically, with a plugin. But currently no plugin exists to do this on Code Canyon, or the WordPress plugin repository, or elsewhere that I can find. I did find some code on BuddyDev that said we could use a couple plugins plus some PHP filters and etc….but I followed those directions and my site broke (500 errors)….which is what happened to someone else too (as mentioned in the comments), as recently as October of 2018.

    I am running WordPress 4.9.8 and the latest version of BuddyPress as well as bbPress.

    Thoughts?

    Thanks in advance for any and all assistance. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

  • lookingahead
    Participant

    @lookingahead

    OH guess what…? 😀 Figured it out.

    I have a solution that so, sooo…..SSOOOOOOO many other people have been looking for, and I’m elated to say I’ve found it.

    Been cruising Stack Exchange, various WordPress plugin support threads, installing plugin after plugin, reading blogposts made by developers, comments made by disillusioned masses….I mean, it’s endless.

    But THANK GOD I found a solution!

    So it turns out that the code that BuddyDev mentioned was not to blame for the 500 error I mentioned in my intro. It was actually due to one of the two plugins that is recommended in BuddyDev’s tutorial (and they are now fixing that bug). 🙂

    I figured this out as I tried to reproduce the error while activating plugins in a different sequence.

    The first time I did this, I’d had BuddyPress disabled when I’d installed both plugins. I’d also already put the code mentioned in their tutorial into my bp-custom file. I then activated BuddyPress, and the site failed.

    This time, I had BuddyPress already activated, then installed and activated one of the two plugins BuddyDev recommended to use in the tutorial…and all was well. THEN…I installed the second plugin. And upon clicking ‘Activate’ the site failed again. NOTE: on the second attempt to reproduce the 500 error, I hadn’t put the code from the tutorial into my bp-custom file….

    And according to BuddyDev, even before I tried to reproduce the error, the bp-custom code I was using was sound.

    So when the site failed upon my attempt to reproduce the error, I knew: that plugin was to blame.

    Then, I found out more about that plugin…it is designed to be used for users to have extra fields to fill out upon signup, fields that would show in their Member Profile. And I have Member Profiles disabled. Wa-la!

    I then asked BuddyDev if I needed the plugin that failed…and THANKFULLY they said, ‘no — not needed for what you want to do.’

    WHEW!! 😀

    So, a summary:
    – Use custom code in bp-custom (pasted below)
    – Use one plugin in particular from BuddyDev
    – Do not use another plugin recommended by BuddyDev

    The plugin to DEFINITELY use, that was listed in their tutorial: ‘BuddyPress Member Type Generator’…that affects the ability for Webmasters to set custom member types AND an avatar specific to every custom type created! 😀

    The other plugin that was recommended in that tutorial, that is NOT needed to change user avatars for custom member types…not ever, as it has nothing to do with avatars — it was merely recommended in their tutorial so people could manage user profiles: ‘BP XProfile Member Type Field’

    SO. If you want to have a different default avatar for different member types, then you will need to use the ‘BuddyPress Member Type Generator’ plugin. Not the other one.

    Steps to take:
    1.] Download the ‘BuddyPress Member Type Generator’ plugin from BudyDev

    2.] Read their tutorial (I’ll paste a link below in follow-up comments to this comment)…do everything EXCEPT install the ‘BP XProfile Member Type Field’ plugin — it’s not needed for assigning an avatar via custom member type; it just is recommended in their tutorial to use so you can manage user fields 🙂

    3.] Use the code I’ll also paste below (in the follow-up comments) — modify it to your site’s name but insert your site name where I typed ‘sitenameprivate’…etc.

    4.] For creating more avatars with custom member types in the future, you’ll always have to update that same code in the bp-custom file…via FTP/SFTP; tbh that process is easy as pie once you realize how to do it

    5.] For making your life easier with switching out avatar images for member types without having to re-do the bp-custom file: just save over the image in your media library that is used for that particular member type…so the path is the same and your code won’t need to be changed

    Simple, yet difficult to find.

    Thank GOD FOR BUDDYDEV!!! <3


    lookingahead
    Participant

    @lookingahead

    OH FFS, BuddyPress keeps telling me I ‘move too fast’…then I go to post the response and it says I’ve ‘already said that’…DEAR GOD, lol…..

    That means I have to wait, idk, HOW LONG to post again?

    And why is it that even when I’m not ‘moving too fast’ that BuddyPress HATES me posting a solution that contains code — even when I format it correctly?

    Dear God.


    lookingahead
    Participant

    @lookingahead

    Screw it. I tried to post the code in various ways, but I don’t have time to spend trying to post A SIMPLE COMMENT FFS.

    Go to this link and use the code specified in the file.

    I hope it’s still available years later when someone stumbles across this comment thread.

    BuddyPress forums need some sort of fix for this crap. What an incredible waste of time and energy, just to post a helpful comment that contained code. I’m not a freaking spammer. I mean, if your forum software is needing to be THAT sensitive to fight spam, make us do captchas or some crap to verify we’re ‘human.’

    Ya know, I get why spam filters exist, but when they make a site UNUSABLE FOR ACTUAL USERS then your technology is worthless.

    Anyhow…lol, end of rant. Here is the link:

    I hope this solution helps others as much as it’s helped me. <3


    lookingahead
    Participant

    @lookingahead

    OMG…THE LINK DID NOT POST LOOOOOL…..

    Because I’m like a ‘spammer’ or something right? Hahaa…

    DEAR GOD.

    MAN I HOPE THIS ONE WORKS LOOOOOL:

    https://buddydev.com/using-different-default-avatar-buddypress-users-based-profile-fields-member-type/

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar