myCred
Forum Replies Created
-
Forum: Plugins
In reply to: [WPBruiser {no- Captcha anti-Spam}] Custom form support?Thank you for your reply, I have sent you a message.
Hi!
So your review of the myCRED plugin is a question?
You are more then welcome to post any questions you might have on the mycred.me website but please do not post questions here. This section is for reviews of the plugin, which I invite you to do.
You can change the review by visiting the plugins page and in the sidebar on the right hand side under “My Rating” click on the number of stars you want to give instead.
Forum: Plugins
In reply to: [BuddyPress Compliments] MyCred integrationDownload available at: https://mycred.me/supported_plugin/buddypress-compliments/
There is a showcase section on the mycred.me website you can have a look at:
https://mycred.me/showcase/Ok so what does your log say? Are users just getting one lump sum of points that is x 10 or do you have 10 log entries?
Hey.
Yes you can use the MYCRED_LOG_TABLE constant in your wp-config.php file to change the table to anything you want.
Example
define( 'MYCRED_LOG_TABLE', 'wp_my_own_logtable' );
Hey Agent.
Sorry for the long reply. While I am happy the issue is resolved, could you give me some information about the setup you were using so I can try and prevent this from happening?
Did you change the decimal setup at some point or adjusted the database table’s structure?
Hi.
Do you have any custom code added to your theme to adjust how myCRED works?
Are you giving points for viewing content?Hi.
The Notifications Plus add-on is a premium add-on! For support please post your issues / question in the myCRED support forum. No support is provided here!
Yes.
Looks good but you have missed the last closing bracket and since this is a filter, you must always return a result. Your code will only return a result if none of those roles are found which will break your site.
Here is how it should be: https://pastebin.com/KZGdH1B4
When you say “insert into a profile”, is this a BuddyPress profile or a default WordPress profile?
Hey.
The first part:
if ( $request['ref'] != 'recurring_payout' ) return $request;
makes sure that the code only is applied to recurring payouts and nothing else. Without this, your change will run for every single instance where users get points.
Next:
$user_id = absint( $request['user_id'] );
this just grabs the users ID. The ID in itself does not contain your users role. For that, you will need to grab the entire user object and then check the role of the user.
$user_id = absint( $request['user_id'] ); $user = get_userdata( $user_id );
Now you have a users roles accessable under $user->roles (which is an array).
So you could check for example:
if ( in_array( 'subscriber', $user->roles ) ) $request['amount'] = 100; elseif ( in_array( 'administrator', $user->roles ) ) $request['amount'] = 500;
Hi.
Sure. You could adjust this via some code snippet. By default myCRED will count private post publishing as “published”. But you can remove this.
add_filter( 'mycred_publish_hook_new', 'mycred_pro_adjust_publish_statuses' ); function mycred_pro_adjust_publish_statuses() { return array( 'publish' ); }
Place this in your child theme’s functions.php file and the hook should only award points when a post gets the “Published” status.