Skip to:
Content
Pages
Categories
Search
Top
Bottom

Show total achievements in Profile Header

  • Avatar of MeRuud
    MeRuud
    Participant

    @meruud

    If anybody is interested, currently at my site I show the total achievements a user has in the profile header.
    (I am at work right now so can’t upload an example image, but you can see it at dasdatabase.com if you create an account and login – site is in beta and buggy)

    To do this add the following code (replacing the “?>”) all the way on the bottom of “achievements/includes/achievements-core.php”: http://pastebin.com/4W2iQ7Nd

    Now it will hook itself in do_action( ‘bp_before_member_header_meta’ ); right before #item-meta.

    Everything should work fine, but just incase if it breaks anything I’m not responsible ;) use it at your own risk please.

    Thanks,

    Edit01: Code formatting here messed up the code so I uploaded it to pastebin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of craftcore
    craftcore
    Participant

    @craftcore

    Hi! I love the idea of this; I’ve been wanting to show a score for my members. I copy and pasted this code, but everyone’s score shows as “30,” no matter whose profile I look at.

    If you have any advice it would be awesome! Thanks! :D

    Avatar of craftcore
    craftcore
    Participant

    @craftcore

    Never mind that last question, I was able to integrate the same idea directly into my child theme’s member-header.php using

    `(Score: displayed_user->id ); ?>)`

    Thanks for the jump-off point! :D

    Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    Thanks

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

The forum ‘Achievements’ is closed to new topics and replies.