WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
[resolved] How can i add more events (6 posts)

  1. minigamers
    Member
    Posted 1 year ago #

    Hi there.
    First i would like to share some grats with you for the fine work with this plugin, it's great and combined with buddypress it's even better.

    I would like to know how can i add more events in my admin panel.
    thx a lot.

    http://wordpress.org/extend/plugins/achievements/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Hi there; thanks!

    If you're a PHP developer, and understand how WordPress actions and filters work, I can give you some pointers how to get started.

  3. minigamers
    Member
    Posted 1 year ago #

    Well hit it :)
    I need this like ... air.
    Thx for being so quick :D

  4. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Achievement event types are basically WordPress actions. Specifically, identify a do_action() that occurs where you want an achievement event.

    Then, take a look in /includes/extensions/inviteanyone.php as an example. You'll need to duplicate this class, rename all the functions etc, and load it as a custom plugin like this:

    function mg_achievements_init() {
      require 'the_class.php';
    }
    add_action( 'dpa_init', 'mg_achievements_init' );

    In your class, in the constructor, you'll see an array of strings assigned to $this->actions. That's where you insert your custom action(s) that you found earlier.

    It should be as straightforward than that. If you want to capture post type-specific actions (i.e. draft_to_publish, or others like that), the wordpress.php is a good example.

  5. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

  6. minigamers
    Member
    Posted 1 year ago #

    thx, i'll get busy :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.