Replies
- Brajesh Singh on November 21, 2017 at 3:33 am in reply to: [Resolved] Quota no longer showing #11787
Hi Graham,
Checked it. We haven’t put the message for groups and that’s why it is not visible. I am adding an option to make it visible on groups and who can see the message(site admin, group admin, mod or members).
For now, if you want you can put it somewherempp_display_space_usage();And it will display the remaining space to all members.
Thank you
Brajesh - Brajesh Singh on November 21, 2017 at 3:28 am in reply to: [Resolved] BuddyPress Multi Network Not Showing users on Member Page #11786This reply has been marked as private.
Hi Naomi,
I am sorry for the delayed reply.1. Which file format the video is in? We are using the MediaElementjs player included with WordPress. So, It should play all videos supported by mejs/WordPress.
2. The Edit issue, Most probably the plugin you are using is checking the activity type before adding edit button. In our case, the activity is mpp_media_upload. I will suggest asking the plugin developers about it.
We are working on the Youtube and we will have it ready on/before the first weekend of December.
Thank you
Brajesh- Brajesh Singh on November 21, 2017 at 3:21 am in reply to: Double Notification On Nested Comments – Buddypress Activity Comment Notifier #11784
Hi Fariz,
We will have an update this week for sure. Sorry to keep you waiting.Regards
Brajesh - Brajesh Singh on November 21, 2017 at 2:31 am in reply to: Improve BuddyPress Limit Group membership Per User #11783
Hi Mwale,
Welcome to Buddydev.can you please explain what do you mean by upgrade? BUddyPress does not have any such subscription functionality for user level. Are you using a 3rd party plugin? If yes, which one?
Thank you
brajesh - Brajesh Singh on November 21, 2017 at 2:30 am in reply to: [Resolved] Option for setting the gender of profiles showing in BP plugins #11782
Please post the values for “Male” and the “Female” and also the field name/id( I need to fetch the value for logged in user).
We can make it work by using xprpofile_query. It won’t be as efficient as the member type though.
Thank you
Brajesh - Brajesh Singh on November 21, 2017 at 2:27 am in reply to: [Resolved] Set default visibility for new profile field programmatically #11781
Hi Matt,
Welcome to BuddyDev.
You are setting the visibility for the data using the ‘xprofile_set_field_visibility_level’. Please try setting it for field using the followingbp_xprofile_update_field_meta( $field_id, 'default_visibility', 'adminsonly' ); bp_xprofile_update_field_meta( $field_id, 'allow_custom_visibility', 'disabled' );After you get the field id. That should do it.
Regards
Brajesh Hi Andreas,
I am sorry for the delayed reply. We will have a fix this week.regards
Brajesh- Brajesh Singh on November 20, 2017 at 1:50 pm in reply to: [Resolved] Multiple blank comments after multiple image upload? #11774
Thank you.
I am sorry I could not reply earlier. It seems like a bug and looks bad. Please allow me to look at this and provide a fix.Thank you
brajesh - Brajesh Singh on November 20, 2017 at 1:42 pm in reply to: [Resolved] Profile tabs depending to user role or member type #11773
Hi Beuza,
Welcome to BuddyDev.I am sorry to hear that you were unable to find a solution. I will help as much as possible.
First, I assume you already have the member types registered. Still, here is the code that I am using for registering member type for this example.
/** * Register member types. */ function buddydev_register_member_types() { bp_register_member_type( 'player', array( 'labels' => array( 'name' => 'Players', 'singular_name' => 'Player', ), 'has_directory' => true, ) ); bp_register_member_type( 'agent', array( 'labels' => array( 'name' => 'Agents', 'singular_name' => 'Agent', ), 'has_directory' => true, ) ); bp_register_member_type( 'scout', array( 'labels' => array( 'name' => 'Scouts', 'singular_name' => 'Scout', ), 'has_directory' => true, ) ); } add_action( 'bp_register_member_types', 'buddydev_register_member_types' );That registers member types. The important things to note is “agent”, “player” and “scout” is the actual name of member type(unique identifier) in this case. rest of the code will use them.
Step 1:- Remove the groups form all user’s profile who don’t have the member type as ‘agent’
/** * Remove groups from user profile based on member type. */ function buddydev_remove_group_based_on_member_types() { if ( ! bp_is_user() ) { return; } $user_id = bp_displayed_user_id(); if ( ! bp_has_member_type( $user_id, 'agent' ) ) { bp_core_remove_nav_item( 'groups' ); } } add_action( 'bp_setup_nav', 'buddydev_remove_group_based_on_member_types', 1001 );And it will only show the “Groups” nav on the user who have agent member type.
We still have an issue. The adminbar for all users show “groups” and leads to page not found. let us fix that.
Step 2:-
/** * Remove groups from adminbar based on member type. * * @param array $nav nav items. * * @return array */ function buddydev_filter_show_hide_groups_in_adminbar( $nav ) { if ( ! is_user_logged_in() ) { return $nav; } if ( ! bp_has_member_type( bp_loggedin_user_id(), 'agent' ) ) { $nav = array(); } return $nav; } add_filter( 'bp_groups_admin_nav', 'buddydev_filter_show_hide_groups_in_adminbar' );That’s all.
Please put the code in your bp-custom.php and It will work.
Hope you have a great time working with BuddyPress 🙂
Regards
Brajesh- This reply was modified 8 years, 2 months ago by
Brajesh Singh. Reason: updating code
- This reply was modified 8 years, 2 months ago by