• Resolved X-Raym

    (@x-raym)


    Hi !

    Is there any way to have a “Last Activities” widget ?
    A widget which displays the last badges earned, with user dislay name and points ?

    The solution is probably in the API but i really don’t have the level for that.
    I wanted to share my idea, perhaps it can inspire some people ??

    Cheers !

    https://www.ads-software.com/plugins/badgeos/

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

    (@tw2113)

    The BenchPresser

    all of the data should be available in the ‘_badgeos_achievements’ user meta key.

    For every achievement earned, they’d have the following stored:
    Achievement ID
    Achievement type
    Points earned
    Date Earned(stored as UNIX timestamp).

    One would need to loop all of the achievements and do comparisons to get the newest one and return that overall value for display.

    Not sure if your reference to points above would be total user points or points from the individual achievement, so that would be variable in solution

    Thread Starter X-Raym

    (@x-raym)

    My reference to the point above is the total point of the user, but I have to admit that points earned by the badge is cool too, maybe the both can be great ??
    Date is a good idea too.

    Maybe something simple like :

    <div class="last-badge-earned"><div><a href="Badge Permalink" title"Achivement Name"><img src="Badge Image"/></a></div>
    <p><em>Display Name</em> just earned <em>X points</em><em> with <em>Achievement Name</p></div>

    I understand the principle, and good to know that it is possible ??
    but I don’t know really how to create this loop…
    (I just finished the course on PHP on codecademy but this is not enough ^^)

    If you have time and if you are interested by this, I am open to any other details ??

    Thanks again for your support, definitely VERY very nice!

    Thread Starter X-Raym

    (@x-raym)

    I have thought about that and I came to a conclusion :

    the clever way to do that will to create a plugin.
    This plugin will create shortcodes.

    This way we could, put the code in the order and in the way we want, we could choose the information displayed and even choose the location( widget, page etc…), and this could handle localization easily.

    we could imagine this shortcodes

    [badgeos_last_img/]
    [badgeos_last_user/]
    [badgeos_last_avatar/]
    [badgeos_last_points/]
    [badgeos_last_total/]
    [badgeos_last_date/]

    We could even go further and imagine and shortcode to display this infos for the X last users like that :

    [badgeos_last number="X"]Code to repeat for the last X users, and that can contains the previous shortcodes.[/badgeos_last]

    Specific position can be cool to :

    [badgeos_last position="X"]Code to repeat for the users in X position, and that can contains the previous shortcodes.[/badgeos_last]

    … but I think these two things are bit more complicated (and I don’t know it it would be really possible this way.

    We could also imagie a shortcode to display last activities of the current loggedin user ??

    [badgeos_last_current]Code wich can contains previous shortcodes[/badgeos_last_current]

    What do you think of that ?
    I think it can be a cool add-on for BadgeOS.

    Display this kind of community activity news could be very stimulating ??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure I have the time for that personally. I haven’t even released my own BadgeOS plugin yet, that got approved weeks ago. It still needs testing before I’m comfortable putting it up, as it deletes database content. However perhaps someone else coming along may be able to contribute something.

    Thread Starter X-Raym

    (@x-raym)

    I totally understand. ??
    Hopefully, it is not a top priority for me, but I still think it can be interesting.
    I will definitely digg into this when the other function of my website will be ready (as user list).

    Nice to hear that you have a plugin, I’m impatient to see what it does ! Good luck with that !

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    It’s a plugin intended for developers only who need to wipe out all of the BadgeOS data in their db, without resetting their WP install completely. It’s an all or nothing thing for BadgeOS data for the first intended release, though I’ll probably try to offer selective deletion in the future.

    It won’t be good for academic institutes at first unless they like re-setting up all their achievements too. They’ll be warned about it all ahead of time.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Last Activies Widget’ is closed to new replies.