Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter iamonlythird

    (@iamonlythird)

    Also, the “For” drop-down list is empty, probably a result of that warning…?

    Plugin Author myCred

    (@designbymerovingi)

    Thanks for reporting this.

    The issue is the with the new reference list.

    If you open the mycred-functions.php file which is located in plugins/mycred/includes/ and online 2236 change it from:

    // Addons

    to:

    // Addons
    $addons = array();

    it will get resolved. I have also updated the current version.

    Thread Starter iamonlythird

    (@iamonlythird)

    Thank you. I have two quick questions:

    1. What is “Manual Adjustment by Admin”?

    2. We have a few custom hooks that award users based on other achievements than the ones that comes with the core myCred install, like getting points for having content featured etc

    Is there any way to easily integrate those custom hooks into badges so that, for example, if the user gets 5 posts featured, they will get a badge?

    What is the best way to approach this?

    Plugin Author myCred

    (@designbymerovingi)

    1. Manual adjustments are instances where you or anyone who can edit points, are giving or taking points from a user in the admin area. If you visit the Users page in your admin area and hover your mouse over a users point balance, you will see two options:

    – History. This one will take you to the myCRED log where you will only see that particular users points history.

    – Adjust. If you click on this, a popup window will slide down where you can manually adjust a users balance. Maybe you want to give someone some extra points? Or deduct points for an error? This is where you do it.

    Alternatively, since 1.5, you can also edit a user in your admin area and under each point type, manually adjust that users balance.

    2. Yes, you can. You can use the mycred_all_references filter to add your own references. Your custom hook when it pays out or deducts points from a user does so under a reference. You probably have your own custom reference for each hook and you will need to add this to add support for Badges.

    Here is an example where a hook adds points under the reference “birthday” (i.e. Points for birthday hook).

    add_filter( 'mycred_all_references', 'mycred_pro_add_custom_references' );
    function mycred_pro_add_custom_references( $references ) {
    
    	// My custom hooks reference
    	$references['birthday'] = 'Birthday';
    
    	return $references;
    }

    You can add as many references to this list as you want, just make sure you always end with return $references or you will break myCRED.

    The above code snippet as always goes into your themes functions.php file or in the appropriate file if you use a custom plugin of your own.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning message for the Badge plugin’ is closed to new replies.