Replies
Hi Vijay,
Thank You for posting. I will acknowledge you on this issue at day end.
Thank You
Ravi- Ravi on March 30, 2016 at 12:47 pm in reply to: [Resolved] Hide "Leave Group" button when user already joined the Group #3256
Hi Dandy
Thank You for reply. I am glad to help you.
Thank You
Ravi - Ravi on March 29, 2016 at 11:37 pm in reply to: [Resolved] Hide "Leave Group" button when user already joined the Group #3246
Hi Dandy
Please try this code in your bp-custom.php
function buddydev_remove_leave_group_button( $btn ) { if ( $btn['id'] == 'leave_group' ) { unset( $btn['id'] ); } return $btn; } add_filter( 'bp_get_group_join_button', 'buddydev_remove_leave_group_button' );Thank You
Ravi - Ravi on March 29, 2016 at 7:12 pm in reply to: [Resolved] Default galleries for every group or single mixed media gallery #3241
Hi Jaume,
Please check the following code in your bp-custom.php file.
function mpp_custom_create_gallery( $args ) { $user_id = get_current_user_id(); $default = array( 'creator_id' => $user_id, 'title' => '', 'description' => '', //add description if any 'status' => mpp_get_default_status(),//can use any of the status e.g. 'public' , 'private', 'loggedin', 'friends' etc 'component' => 'members',//for user 'component_id' => $user_id,//no need to change 'type' => 'photo', //can change to "audio", "video", "doc" ); $args = wp_parse_args( $args, $default ); $gallery_id = mpp_create_gallery( $args ); return $gallery_id; } //Automatic gallery creation for groups on group create function mpp_custom_create_default_group_galleries( $group_id, $group ) { //make sure that you have enabled all these types in your Admin MediaPress setiings for the groups component $types = array('photo' => 'Images', 'video' => 'Video', 'audio'=> 'Music', 'doc'=> 'Docs' ); foreach ( $types as $type => $label ) { if ( ! mpp_component_supports_type( 'groups', $type ) ) { continue;//component does not support this type } $gallery_id = mpp_get_wall_gallery_id( array( 'component' => 'groups', 'component_id' => $group_id, 'media_type' => $type ) ); if ( ! $gallery_id ) { //let us create one $gallery_id = mpp_custom_create_gallery( array( 'title' => $label, 'type' => $type, 'status'=> mpp_get_default_status(), 'component' => 'groups',//for user 'component_id' => $group_id, ) ); mpp_update_wall_gallery_id( array( 'component' => 'groups', 'component_id' => $group_id, 'gallery_id' => $gallery_id, 'media_type' => $type ) ); } } //and so on } add_action( 'groups_created_group', 'mpp_custom_create_default_group_galleries', 0, 2 ); function mpp_custom_disable_user_to_create_group_gallery( $can_do, $component, $component_id ) { if ( $component == 'groups' && ! is_super_admin() ){ $can_do = false; } return $can_do; } add_filter( 'mpp_user_can_create_gallery', 'mpp_custom_disable_user_to_create_group_gallery', 10, 3 );Thank You
Ravi - Ravi on March 28, 2016 at 6:28 pm in reply to: Show "Add Friend" button only for members in the same group of BuddyPress #3209This reply has been marked as private.
Hi Minoo
Thank you for posting. Please try this code with the action “wp_loaded”
add_action( "wp_loaded", "change_menu_position" ); function change_menu_position() { if( ! function_exists( 'buddypress' ) ) { return ; } $bp = buddypress(); $bp->bp_nav['mediapress']['position'] = 2; }Thank You
RaviHi Piotr,
You can use the following hooks list category on add, edit gallery form
add_action( 'mpp_after_edit_gallery_form_fields', 'add_mpp_gallery_category_taxonomy' ) add_action( 'mpp_before_create_gallery_form_submit_field', 'add_mpp_gallery_category_taxonomy' )Thank You
RaviHi Michael,
Member type is not a capability. It’s more like category used for classifying users. So, we can not have a minimum member type requirement. But we can make it such that a user with certain member type can only create groups.
If this is okay. Please let me know.
Thank you
Ravi- Ravi on March 3, 2016 at 6:59 pm in reply to: Profile Visibility Manager: Visual tag for Usernames #2869
Hi Michael,
Thank you for posting. Please use the following code in bp-custom.php file
function bp_visibility_add_member_visibility_css_class( $classes ) { if ( ! function_exists( 'bp_profile_visibility_get_settings' ) ) { return $classes; } $visibility = bp_profile_visibility_get_settings( bp_get_member_user_id(), 'bp_profile_visibility' ); $classes[] = 'visibility-' . $visibility; return $classes; } add_filter('bp_get_member_class','bp_visibility_add_member_visibility_css_class');It will add a new class based on their profile accessibility and you can then just style the list as you may please.
Thank You
Ravi - Ravi on February 26, 2016 at 7:06 am in reply to: [Resolved] BP Xprofile Member Type Field v 1.0.1 gives Strict standards warning #2740
Hi Ada
Thank You for posting and confirming that it was not a issue. I am glad that issue is fixed.
Thank You
Ravi