Replies
- Ravi on March 15, 2019 at 12:28 pm in reply to: [Resolved] How to set BuddyPress Profile Completion plugin redirect priority to last #21553
Glad that code works….
Yes, we will and we plan to discontinue Force profile photo plugin in favour of Profile completion.
It will be available form our list in next 3-4 weeks(It is available form wp.org) for now.Thank You
Ravi- This reply was modified 6 years, 4 months ago by
Ravi.
- This reply was modified 6 years, 4 months ago by
- Ravi on March 14, 2019 at 8:25 pm in reply to: [Resolved] How to set BuddyPress Profile Completion plugin redirect priority to last #21540
Hello Tosin,
Please use the following code. It will work
function buddydev_custom_skip_check( $skip ) { if ( is_page( 'create-public-post' ) ) { $skip = false; } elseif ( ! is_buddypress() || bp_is_members_directory() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_custom_skip_check' ); function buddydev_custom_redirect() { if ( ! is_user_logged_in() || is_super_admin() || ! function_exists( 'bp_follow_total_follow_counts' ) ) { return; } // Return if we are on welcome page if ( is_page( 'welcome' ) ) { return; } $count = bp_follow_total_follow_counts( array( 'user_id' => get_current_user_id() ) ); if ( $count['following'] < 7 && ! bp_is_members_directory() ) { bp_core_add_message( __( 'Please follow atleast 7 members to continue.', 'buddypress' ) ); $location = bp_get_members_directory_permalink(); header( 'location:' . $location ); exit; } } add_action( 'bp_template_redirect', 'buddydev_custom_redirect' );
Hello Medievil,
Thank you for posting. Please let me know what is the type of this field is. Because if it is a checkbox
field and user has not selected any of its options then it will give empty string. Also make sure $bpmember is not empty. You can use php function “var_dump” to check what result function is returnsThank You
Ravi- Ravi on March 14, 2019 at 1:24 am in reply to: [Resolved] How to set BuddyPress Profile Completion plugin redirect priority to last #21530
Hello Tosin,
Please try the following code and let me know if it works or not.
function buddydev_custom_skip_check( $skip ) { if ( is_page( 'create-public-post' ) ) { $skip = false; } elseif ( ! is_buddypress() || bp_is_members_directory() ) { $skip = true; } return $skip; } add_filter( 'bp_force_profile_completion_skip_check', 'buddydev_custom_skip_check' ); function buddydev_custom_redirect() { if ( ! is_user_logged_in() || is_super_admin() || ! function_exists( 'bp_follow_total_follow_counts' ) ) { return; } $count = bp_follow_total_follow_counts( array( 'user_id' => get_current_user_id() ) ); if ( $count['following'] < 7 && ! bp_is_members_directory() ) { bp_core_add_message( __( 'Please follow atleast 7 members to continue.', 'buddypress' ) ); $location = bp_get_members_directory_permalink(); header( 'location:' . $location ); exit; } } add_action( 'bp_template_redirect', 'buddydev_custom_redirect' );
Thank you
Ravi Hello Maksim,
I have test opr Activity autoloader plugin with BuddyPress activity shortcode and it is working fine with both the template packs. Please give it a try and let me know if it works or not.
please make sure you have passed shorcode parameter “load_more” to 1 with in the shortcode.
Regards
RaviHello Matt,
Please try the following code in your “bp-custom.php” file.
If you are using nouveau template pack
function buddydev_reorder_member_directory_filters( $filters, $context ) { if ( 'group' !== $context ) { $filters = array(); if ( bp_is_active( 'xprofile' ) ) { $filters['alphabetical'] = __( 'Alphabetical', 'buddypress' ); } $filters['active'] = __( 'Last Active', 'buddypress' ); $filters['newest'] = __( 'Newest Registered', 'buddypress' ); } return $filters; } add_filter( 'bp_nouveau_get_members_filters', 'buddydev_reorder_member_directory_filters', 10, 2 );
and for legacy template pack. You need to override the template file. Please copy ‘buddypress/members/index.php’ and paste it to your theme folder and modify the options order on line no. 93
Please let me know if it works or not.
Thank You
Ravi- Ravi on January 31, 2019 at 1:13 am in reply to: [Resolved] I want to execute the action only the first time #20594
Hello,
Please try the following code and let me know if it works or not.
/** * Create post on activation * * @param int $user_id User id. */ function buddydev_create_post_on_activation( $user_id ) { $user = get_user_by( 'ID', $user_id ); $user_nicename = $user->user_nicename; // create slug $new_slug = 'first-topic-' . $user_nicename; // create topic $post_value = array( 'post_name' => $new_slug, 'post_type' => 'topic', 'post_author' => $user_id, 'post_title' => 'first topic', 'post_content' => 'This topic was created when you registered.', 'post_category' => array( 1, 5 ), 'tags_input' => array( 'tag1', 'tag2' ), 'post_status' => 'publish', ); wp_insert_post( $post_value ); } add_action( 'bp_core_activated_user', 'buddydev_create_post_on_activation', 10 );
Thank You
Ravi Hello Abdullah,
This shortcode is not the part of plugin. It’s a part of our premium theme named “Community Builder”.
Thank You
Ravi- Ravi on January 25, 2019 at 2:56 pm in reply to: [Resolved] [ACTIVITY SHORTCODE] Hide admin activity on activity stream #20504
Hello AJ,
You are doing wrong exclude=role=”administrator” here. Please try following shortcode and mention all the user role you want to display except administrator for admin. It will display activities of other users except admin
[activity-stream role=editor,author,contributor,subscriber per_page=10 allow_posting=1]
You can use the above mentioned shortcode. Please let me know if it works or not
Thank You
Ravi - Ravi on January 22, 2019 at 5:22 pm in reply to: [Resolved] Posting photo to group's activity feed #20433
Hello Carolynn,
Sorry for the inconvenience. I have tested this on my local server and it is working fine I am able to post an image without text in a group activity page.
Is layout still breaks in default theme with no other plugin active except BuddyPress and MediaPress?. Please let me know.
Regards
Ravi