Replies
- Brajesh Singh on April 17, 2019 at 3:06 pm in reply to: [Resolved] Activity Sitewide stream filter posts by category #22368
Hi Plamen,
Thank you for the kind words.The above code is a sample and you can modify it. For example, I am making a change to allow recording comment from ‘community’ category.
function buddydev_disable_activity_blog_comment_recording_conditionally( $enabled, $blog_id, $post_id, $user_id, $comment_id ) { // use $post_id to decide. // set $enabled= false; to stop recording comment. if ( ! in_category( 'community', $post_id ) ) { $enabled = false; } return $enabled; } add_filter( 'bp_activity_post_pre_comment', 'buddydev_disable_activity_blog_comment_recording_conditionally', 20, 5 );If you can tell me which categories to allow or disallow, I can post the updated code too.
Regards
Brajesh Thank you. Will update here.
- Brajesh Singh on April 17, 2019 at 2:53 pm in reply to: [Resolved] Pics not showing when setting Public View in Settings #22364
Hi Daniel,
Thank you for the update. I am glad you were able to get it work.Best regards
Brajesh - Brajesh Singh on April 17, 2019 at 2:51 pm in reply to: [Resolved] Activity Sitewide stream filter posts by category #22363
Hi Pamen,
I am sorry for the delayed reply.After reding through the codes, I am assuming our goal here to to stop recording comments in certain cases?
If that is the case, BuddyPress provides us with another filterbp_activity_{$post_type}_pre_commentwhere for normal posts the $post_type is ‘post’.
So we can attach to ‘bp_activity_post_pre_comment’.Here is an example code
function buddydev_disable_activity_blog_comment_recording_conditionally( $enabled, $blog_id, $post_id, $user_id, $comment_id ) { // use $post_id to decide. // set $enabled= false; to stop recording comment. return $enabled; } add_filter( 'bp_activity_post_pre_comment', 'buddydev_disable_activity_blog_comment_recording_conditionally', 20, 5 );You may adapt it from there.
Hope it helps.
Regards
Brajesh - Brajesh Singh on April 17, 2019 at 10:20 am in reply to: Simple QUESTION – WordPress / buddypress after suscribe #22356This reply has been marked as private.
- Brajesh Singh on April 17, 2019 at 10:17 am in reply to: [Resolved] Multiple sites/domains, same userbase, & simultaneous updates #22355
Hi,
The answer to all the questions is “yes”.Since you already posted a relevant plugin for login sharing, I will suggest using it and see if that fits you need or not?
The other way around is using a backup plugin and then keep syncing from 1 to another(db+files both) as you need it both way.
Regards
Brajesh - Brajesh Singh on April 17, 2019 at 10:12 am in reply to: Possible bug exposed via BP Member Types Pro & BP Registrations Options plugin #22354
Hi Sam,
I do agree that there should be a simple way for developres to mark a field as non required(in html attributes).It is still doable but too complex at the moment. Please do report it.
Regards
Brajesh - Brajesh Singh on April 17, 2019 at 10:11 am in reply to: Hide BuddyPress members directory from non logged users redirect to login page #22353
Please change
bp_get_signup_page()
towp_login_url()Regards
Brajesh Hi Simon,
Thank you for sharing. It can certainly be done using transient. Please allow me 2-3 days to audit all our count queries.Thank you
Brajesh- Brajesh Singh on April 16, 2019 at 6:05 pm in reply to: Possible bug exposed via BP Member Types Pro & BP Registrations Options plugin #22342
Hi Sam,
Thank you for sharing.The problem is related to Member Types Pro. We have the conditional field option in Member Types pro. It hides a field if it is not needed by a member type.
Since the field is present on page and BuddyPress adds html “required” attribute to the page, It browsers do not allow submitting.
You can either disable conditional registration field(as shown below) or mark the fields from the Primary field as non required.
https://i.imgur.com/bDsr4WR.pngAny field which might be invisible due to condition should not be marked as required.
Please see my hilighted note in point 4 here. We were expecting this issue
https://buddydev.com/docs/buddypress-member-types-pro/conditional-buddypress-registration-fields-based-on-buddypress-member-types/Sorry for the inconvenience.
If you have suggestions on how can we make the docs on this better, Please help me make it better and avoid such issue for others in future.Thank you
Brajesh