Skip to:
Content
Pages
Categories
Search
Top
Bottom

Individual users’ achievements…

  • Avatar of ElbowRobo
    ElbowRobo
    Participant

    @elbowrobo

    Hey, Love this – it kinda ruins my attempt at a plugin which I made a year ago (Awards). It was pretty much like this but a lot less clean and to be honest not as nice. It ran on short-codes which might be an idea for you?

    Anyway, I was wondering how to display a members’ achievements anywhere. I want to execute a php function and it will output just their achieved achievements.

    Is this possible? Eliott

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks! It sure is possible. You’ll need to create your own dpa_has_achievements() template loop (look in templates/achievments/achievements-loop.php for an example), i.e.

    `dpa_has_achievements( array( ‘user_id’ => $some_integer, ‘type’ => ‘unlocked’ ) ) …`

    Avatar of ElbowRobo
    ElbowRobo
    Participant

    @elbowrobo

    Thanks for the reply, however I am still wondering how to get this to work.

    I have a page with a members’ details on and where I have defined $userid as that users’ id I use this within the page:

    `echo dpa_has_achievements(array( ‘user_id’ => $userid, ‘type’ => ‘unlocked’));`

    All I get is the number 1 or true. This isn’t showing the awards but simply checking if they have some?

    I have php-exec installed and fully functioning. Thanks again. Eliott

    As I said, use achievements-loop.php as a template. You’ll also need the while () loop. This isn’t dissimilar from WordPress’ template loop.

    Avatar of ElbowRobo
    ElbowRobo
    Participant

    @elbowrobo

    Ahh, I see now – thankyou.

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

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