Replies
- Brajesh Singh on January 8, 2019 at 11:15 pm in reply to: BuddyPress Member Types Pro question #20074
Hi Irene,
I have received the details. Will check on the site and update you by tomorrow with a reason(why it happened) and a solution.Thank you
Brajesh - Brajesh Singh on January 8, 2019 at 11:13 pm in reply to: Member Types Pro filter in URL for specific member type #20073
Hi,
Please make sure to enable the “Directory” for the specific member types. Then you can access the member types from http://yoursite.com/members/type/member-type-name/ (The plugin will list actual url on the member type list screen).Hope that helps.
Regards
Brajesh - Brajesh Singh on January 8, 2019 at 11:02 pm in reply to: [Resolved] Force user to complete buddypress profile #20072
Sure. Here you go
https://github.com/buddydev/bp-profile-completionPlease activate the plugin and visit Settings->BP Profile Completion for customizing the behaviour.
Regards
Brajesh Hi Karla,
Thank you for using the plugin. The plugin serves a different purpose. It activates and logs in user as soon as you register from front end registration page(which seems to be not used in your case).There is a solution but I need to know do you want to login user so that they are shown in the members directory?
If you do not ask user to confirm their account(at the time of registration in admin), their account get already activated.Please let me know and I will assist.
Regards
Brajesh- Brajesh Singh on January 8, 2019 at 7:04 pm in reply to: [Resolved] MediaPress user hogging site feed (moderation control?) #20065
Hi Richard,
Thank you.I am looking forward to your feedback tomorrow.
Regards
Brajesh - Brajesh Singh on January 8, 2019 at 6:53 pm in reply to: [Resolved] MediaPress user hogging site feed (moderation control?) #20063
Sure,
Here is an example using role.I have broken it into 2 functions for defining role based limit and then getting user specific limits.
After that, there are two functions attached to filters. All you need to modify is the first function that supplies role based limit.
/** * Get the applicable limit for the given role. * * @param string $role role name. * * @return array */ function buddydev_custom_get_role_based_activity_limit( $role ) { // duration- in minutes // limit - how many in that duration $limits = array( 'administrator' => array( 'duration' => 1440, 'limit' => 0, ), 'editor' => array( 'duration' => 60, 'limit' => 10, ), 'author' => array( 'duration' => 60, 'limit' => 5, ), 'contributor' => array( 'duration' => 1440, 'limit' => 20, ), 'subscriber' => array( 'duration' => 1440, 'limit' => 10, ), ); $default = array( 'duration' => get_option( 'bp_rate_limit_activity_throttle_duration', 5 ), 'limit' => get_option( 'bp_rate_limit_activity_count', 5 ), ); return isset( $limits[ $role ] ) ? $limits[ $role ] : $default; } /** * Get the limit/duration for the given user. * * @param int $user_id user id. * * @return array */ function buddydev_custom_get_user_activity_limits( $user_id ) { // since a user may have more than 1 role, which of the limit should we use? I will go with the highest allowed. $allowed = array( 'duration' => 0, 'limit' => - 1, ); $user = get_user_by( 'id', $user_id ); if ( ! $user ) { return $allowed; } foreach ( $user->roles as $role ) { $limit = buddydev_custom_get_role_based_activity_limit( $role ); if ( $limit['limit'] > $allowed['limit'] ) { $allowed = $limit; } } return $allowed; } /** * Filter activity count. * * @param int $limit limit applied for the specified duration. * @param int $user_id user id. * * @return mixed */ function buddydev_custom_filter_ra_activity_count( $limit, $user_id ) { $config = buddydev_custom_get_user_activity_limits( $user_id ); return isset( $config['limit'] ) ? $config['limit'] : $limit; } add_filter( 'bp_rate_limit_activity_count', 'buddydev_custom_filter_ra_activity_count', 10, 2 ); /** * Filter duration * * @param int $duration duration in minute * @param int $user_id user id. * * @return int */ function buddydev_custom_filter_ra_activity_throttle_duration( $duration, $user_id ) { $config = buddydev_custom_get_user_activity_limits( $user_id ); return isset( $config['duration'] ) ? $config['duration'] : $duration; } add_filter( 'bp_rate_limit_activity_throttle_duration', 'buddydev_custom_filter_ra_activity_throttle_duration', 10, 2 );Hope that helps.
Regards
Brajesh - Brajesh Singh on January 8, 2019 at 6:11 pm in reply to: Member Types Pro filter in URL for specific member type #20060
Hi,
I am sorry but I am unable to understand the question. Please help me understand it a bit better and I will assist.Thank you
Brajesh - Brajesh Singh on January 8, 2019 at 6:10 pm in reply to: [Resolved] Force user to complete buddypress profile #20059
Hi Daniel,
Thank you for asking. The plugin was completed but we did not release it. If you can use it from github, I can push it there(It’s on our bitbucket private repo for now).I will find some time this week to create a blog post and documentation for this plugin and publish it.
Regards
Brajesh - Brajesh Singh on January 8, 2019 at 6:03 pm in reply to: [Resolved] MediaPress user hogging site feed (moderation control?) #20058
Hi Richard,
Please do not use above snippet. It won’t work.Will it be good enough If I can put an example using roles or member types(please let me know which one you will prefer)?
Regards
BRajesh - Brajesh Singh on January 8, 2019 at 11:27 am in reply to: [Resolved] Assist with lightbox display for guests #20051
Hi Richard,
Thank you for the details.
I am glad it is resolved. Always happy to assist 🙂Regards
Brajesh