Caderial
Forum Replies Created
-
Is this support forum even used any more? many posts have not even been replied to? is there somewhere else I should be posting my support questions for this plugin?
cool, and this should be added to functions.php correct?
How about this:
add_filter( 'mycred_run_this', 'mycred_pro_payout_by_role' ); function mycred_pro_payout_by_role( $request ) { // Only applicable for recurring payouts if ( $request['ref'] != 'recurring_payout' ) return $request; // Get user role $user_id = absint( $request['user_id'] ); $user = get_userdata( $user_id ); // Set various roles recurring points payouts. // ADMIN get 0 points if ( in_array( 'administrator', $user->roles ) ) $request['amount'] = 0; // Subscriber Basic get 10 points elseif ( in_array( 'subscriber', $user->roles ) ) $request['amount'] = 10; // Subscriber LVL 1 get 100 points elseif ( in_array( 'subscriber-lvl-1', $user->roles ) ) $request['amount'] = 100; // Subscriber LVL 2 get 200 points elseif ( in_array( 'subscriber-lvl-2', $user->roles ) ) $request['amount'] = 200; // Subscriber LVL 3 get 500 points elseif ( in_array( 'subscriber-lvl-3', $user->roles ) ) $request['amount'] = 500; // Subscriber LVL 4 get 1000 points elseif ( in_array( 'subscriber-lvl-4', $user->roles ) ) $request['amount'] = 1000; // Everyone else gets the amount set in the service } else { return $request; }
Hmm in regards to your most recent post i think my first attempt is VERY wrong lol
I have HACKED my own code together, but i am NOT a programmer, so let me know if this is even close.
add_filter( 'mycred_run_this', 'mycred_pro_payout_by_role' ); function mycred_pro_payout_by_role( $request ) { // Only applicable for recurring payouts if ( $request['ref'] != 'recurring_payout' ) return $request; // Get user role $user_role = absint( $request['user_role'] ); // Set various roles recurring points payouts. // ADMIN get 0 points if ($user_role == 'administrator') { $request['amount'] = 0; // Lvl-1 get 100 points } elseif ($user_role == 'Subscriber-Slug-Lvl-1') { $request['amount'] = 100; // Lvl-2 get 200 points } elseif ($user_role == 'Subscriber-Slug-Lvl-2') { $request['amount'] = 200; // Lvl-3 get 500 points } elseif ($user_role == 'Subscriber-Slug-Lvl-3') { $request['amount'] = 500; // Lvl-4 get 1000 points } elseif ($user_role == 'Subscriber-Slug-Lvl-4') { $request['amount'] = 1000; // Everyone else gets the amount set in the service } else { return $request; }
Awesome, would i be putting this in my functions.php?
s2members just creates new roles with custom capabilities, however they seem to act and display just like regular wordpress roles.
Let me see if i understand your example.
if ( $request['ref'] != 'recurring_payout' ) return $request;
this checks to see if a recurring payout is to be made.$user_id = absint( $request['user_id'] );
this would retrieve the users ID (does this include their role?)// Administrators get 100 points if ( user_can( $user_id, 'edit_users' ) ) $request['amount'] = 100; // Editors get 50 points elseif ( user_can( $user_id, 'edit_others_posts' ) ) $request['amount'] = 50; // Everyone else gets the amount set in the service return $request;
these set what each level of subscriber/moderator would earn in myCRED points.
However I seek to set points payouts on roles, not specific User ID, or is the ID section pulling their membership level as well and then comparing?.
We have actually migrated now to s2members now I am told.
Just as an aside:
We want the functionality for Both access content based both on user Subscriber level and Above, as well as restricting content to SPECIFIC Subscriber levels ONLY instead of their level and above.We are facing the same issue on go2mobi.com On our FAQ page and Careers Page . I have had to go in and add the HTML formatting by hand after it broke. Any solution?
Forum: Plugins
In reply to: [WP Subdomains (Revisited)] subdomains redirect to wp-signup.phpSame issue here. been trying to set up catagories as subdomains for a few days to no avail they all redirect to sign up page.
Please support us!
Forum: Plugins
In reply to: [BuddyPress Group Dice] Group Dice Admin Panel emptyWordPress:3.6
Buddypress: 1.8.1
BP Group Dice: 1.2Still having Issues. The BP Admin panel still is not showing the enable check box for groups. Further more for some reason only admins can make dice rolls. Subscribers and below can seem attempt to make a dice roll, but when they submit the roll it brings them to the groups forum page with no posts, and upon refreshing the posts show but no dice roll was added to the feed.
Users at a subscriber level can post regular posts just fine.
Please help.
https://medievalchaos.ca
Testuser: [redacted]
Test user Password: [redacted][Never post logins on a public form. You just gave access to the entire world.]
Forum: Plugins
In reply to: [Commons In A Box] No Commons in a Box Theme is installed?never mind finally found the quick link to the theme.
Forum: Plugins
In reply to: [Commons In A Box] No Commons in a Box Theme is installed?Also i have uninstalled an re installed twice to get this to work, once form in wordpress, Once from uploading via FTP Still no theme installed witht he plugin. Making this kinda useless for me *grins*
Forum: Plugins
In reply to: [BuddyPress Group Dice] Group Dice Admin Panel emptyWordPress:3.6
Buddypress: 1.8.1
BP Group Dice: 1.2Alright after fiddling around, I get the admin menu in new groups with the check box to enable or disable. However old groups just the “Dave settings button shows up, no disable or enable check box for the dice.
Further more in new groupa dn old alike, when making a new post to a forum the dice roller just doesnt show up ( or load at all)
I have a HUGE following of hardcore rper’s who are sad … *grins*
Any help?
Forum: Themes and Templates
In reply to: CSS Issue with Positioning on Category pagesNo suggestions huh?