• Resolved qpsychics

    (@qpsychics)


    “This add-on to BadgeOS also includes the ability to display badges and achievements on user profiles and activity feeds.”

    Badges are not showing up. This site in in development with a couple of test users. The users do have earned badges. The option for adding community triggers is showing up, so it’s at least somewhat functional. Any idea what might be stopping them from showing? Thanks!

    https://www.ads-software.com/plugins/badgeos-community-add-on/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hello.

    I believe we’ve only done the profile integration for BuddyPress, and not both BuddyPress and bbPress. The addon is primarily targeted at the BuddyPress-powered websites, but does offer a couple integrations with bbPress.

    That said, I’ve just looked over the bbPress menu for user profiles, and there’s no good place that we could for sure hook into to add some output, so it’s hard to do anything that would work across the board. I wager most of the bbPress user profile areas are based on override-able template files as well.

    If you want some help, I can point you to what you’d need to use to display user achievements in a bbPress profile, that you could then implement in your own custom template files.

    Thread Starter qpsychics

    (@qpsychics)

    That would be excellent, please point the way! ??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I won’t be able to help much with regards to where to put the code used, but I recommend utilizing the BuddyPress example found at https://trexthepirate.com/badgeos/2014/12/show-off-users-achievements-part-one/. It’s my own site, so feel free to ask if you need some explanation on parts.

    The only real difference will be using bbp_get_displayed_user_id() instead of bp_displayed_user_id(). The rest would be similar to the first example which is where I discussed the actual output of the results. Examples 2-3 just gave different examples of how to fetch some results.

    Thread Starter qpsychics

    (@qpsychics)

    Thank you! I ended up using the following to just post the badges and no title/earned on information, listed horizontally instead of vertically. I’m wondering if there is there a way to have the badges display in the reverse order as they were earned (showing the highest ranking badges first, which a user has to work up in points to earn). I tried to do this by editing the order through the badge achievement pages individually, but it didn’t take. Thoughts?

    if ( is_user_logged_in() ) {
    $achievements = badgeos_get_user_achievements();

    if ( !empty( $achievements ) ) {
    foreach ( $achievements as $achievement ) {
    echo ‘<span class=”achievement achievement-‘ . $achievement->ID . ‘ achievement-‘ . $achievement->post_type . ‘”> ‘;
    echo get_the_post_thumbnail( $achievement->ID, ‘thumbnail’ );
    echo ‘</span>’;
    }
    } else {
    _e( ‘No achievements to display’, ‘text-domain’ );
    }

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    You would need to do some array ordering on the $achievements variable you’re getting back. That’ll be at the PHP level and within your snippet above.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Badges not showing on bbpress profiles’ is closed to new replies.