BuddyDev

Search

Replies

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Buddyblog Upload Image HTTP ERROR #3279

    Hi Vijay,

    Thank you for the detail. We are using normal WordPress editor/uploader and it depends upon async-upload.php and hide-my-wp-plugin seems to break the url of this file. We can not do much here, Please ask the plugin developer and see if they can filter it properly for the upload url too.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Buddyblog Upload Image HTTP ERROR #3275

    Hi Vijay,
    It seems you have either renamed wp-admin or using .htaccess to rewrite the url. That is causing issue here. The async-upload.php file is giving 404(Please check console) and that leads to the error.

    Can you please tell me if you have moved your wp-admin or something else ?

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Buddyblog Upload Image HTTP ERROR #3272

    Hi Vijay,

    Thank You for posting. I will acknowledge you on this issue at day end.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    Hi Dandy

    Thank You for reply. I am glad to help you.

    Thank You
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    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

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115

    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

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    This reply has been marked as private.
  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: "Gallery" position in user menu #3124

    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
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: How to add categories to Mediapress? #2959

    Hi 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
    Ravi

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on in reply to: Group Creation by BP Member Type #2870

    Hi 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