WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
[resolved] add badges with S2 Member (8 posts)

  1. donfenice
    Member
    Posted 1 year ago #

    Hi,

    I have a huge problem since some days.

    I think this problem is in relation with "S2 Members" plugin and status created for users with S2 members.

    All users with the status "S2 Members Level1" can't have new badges. Moreover, if I want to add manualy badges from the admin, I can't.

    To add new badges, have to change their status from "S2 Members Level1" to "admin".

    Another tips to solve this issue: As I said, I can't add new badges from the admin page but I can remove their badges.

    One last point: I have desactivated all plugins and I still have this issue.

    Can you please help me?

    NB: It worked very well few weeks ago.

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

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    It sounds like it could be a user role / capability issue.
    Do you know if S2 Member creates new Roles?

  3. donfenice
    Member
    Posted 1 year ago #

    Hi,

    Yes, S2 Member create new roles.

    "S2 Members Level1" is one example.

  4. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Those new roles won't have the appropriate capabilities. There were some fixes a few releases back around capabilities, so it probably worked originally but not after.

    I haven't time to figure out the exact code, but if you know PHP, take a look at includes/core/caps.php in the plugin -- specifically the dpa_get_caps_for_role() plugin. You'll want to use that filter to add appropriate capabilities to the new roles.

  5. Norm
    Member
    Posted 1 year ago #

    I've been looking at this as well. In includes/core/caps.php you can't simply add a new case to the dpa_get_caps_for_role( $role = '' ) around line 260.

    Do you need to register the s2Member roles in the dpa_add_caps() function on line 19?

    The s2Member role names are 's2member_level1', 's2member_level2', etc.

    I've been playing around with it hand haven't had success.

  6. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Roles & Caps in WordPress makes me extremely sad, because they're super-confusing.

    Long-term I am going to use some code that the bbPress plugin does which will prevent this.

  7. Norm
    Member
    Posted 10 months ago #

    Just checking did this get into the 3.4 update?

  8. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 10 months ago #

    The role/cap changes mentioned here? No, sorry.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic