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

    (@tw2113)

    The BenchPresser

    Doesn’t look like it out of the box, assuming you mean BuddyPress profiles. We have some lines that remove steps from the resulting list.

    Thread Starter blaagrrrl

    (@blaagrrrl)

    Could you maybe point me to an existing function that I could call to display the steps in the buddy press template?

    In case that didn’t exist, I did already some digging and saw that badgeos uses AJAX to attach the achievement data to the achievement page.

    I tried to alter the script for the AJAX function here…

    ajax-functions.php:
    function badgeos_ajax_get_achievements()

    I was able to include badges that were not-completed by changing the code on line 118:

    if ( $filter == 'completed' ) {
      //$args[ 'post__in' ] = array_merge( array( 0 ), $earned_ids );
      $args[ 'post__in' ] = array_merge( $hidden, $earned_ids );
    }

    But what I really want to do, is to find the code that includes the steps on completed ones.
    Can you point me to that code?

    Thanks,
    NBl

    Thread Starter blaagrrrl

    (@blaagrrrl)

    I made the steps appear by commenting out the following if statement in your Community-Add-On

    bp-members.php
    line 182
    if ( $slug && $can_bp_member_menu ) {

    Is there a setting that I overlooked to make this happen without having to alter the plugin code?

    For a while I was confused because I only could see one step, until I figured out that they are being split up into different sub menu tabs. I just wanted to mention it because the interface is not completely clear from the outset even though I am a trained web designer and developer.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    All of the step removal happens inside badgeos_bp_member_achievements_content() at the top of bp-members.php, and we don’t have any filters at the present moment to override that.

    I do have to wonder if it’s possible to remove our action at add_action( 'bp_template_content', 'badgeos_bp_member_achievements_content' ); and re-add your own version that doesn’t remove the steps.

    FWIW, I’m always taking mental notes of where needs more filters for customization.

    Thread Starter blaagrrrl

    (@blaagrrrl)

    I did find the badgeos_bp_member_achievements_content action and thought about overriding it in my theme’s function.php file. I will give it a try.

    Thanks,
    NBl

    Thread Starter blaagrrrl

    (@blaagrrrl)

    I was able to walk back all the code changes and used instead the solution as described in this BadgeOS Community Add On support post.

    After I activated the BuddyPress Activity stream, I could see all the checkboxes on the Achievement Types edit page. I was able to check the checkbox for “Display earned achievements of this type in the user profile “Achievements” section.” and all the steps show now up under the Profile Achievement tab. Unfortunately there is no visual distinction between the completed Achievements and the Steps, but for my immediate needs, this is enough.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    FWIW, frequently the biggest distinction is the achievement image used, at least as long as the site owner uses something besides the default thumbs up.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Step achievements are not shown on user profile Achievements page’ is closed to new replies.