Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25348

    You are welcome.

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: BP Poke – Some comments #27735

    Hi Carsten,
    thank you for the feedback.

    Please create a new topic to share your ideas or questions. Existing old topics should be left as they are.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: Webp file image support #27734

    Hi Jan,
    I had a look.

    In order to allow webp uploads work you will need to install a plugin like this

    https://wordpress.org/plugins/wp-enable-webp/

    once it is done, the upload works. I still see that MediaPress does not show the uploaded image on upload screen(shows in gallery/single pages).

    I will need some time to investigate and fix it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: Webp file image support #27733

    Hi Jan,
    I haven’t tried uploading webp yet. Will try and then get back to you in couple of hours.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: Webp file image support #27731

    Hi Jan,
    Thank you for the question.

    Please visit Dashboard->MediaPress->settings->General and add ‘webp’ in the supported file type for photo. that should allow uploading it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348

    Hi Simon,
    You may use the ‘bsfep_validate_post’ filter to add validation errors. Here is an example(I am assuming that we are looking for a input name ‘test’

    
    add_filter( 'bsfep_validate_post', function ( $err, $post_data ) {
    
    	$input_name = 'test';
    	if ( isset( $post_data[ $input_name ] ) ) {
    		// validate
    		// let us say, it did not validate, we override the $err
    		$err = array( 'message' => 'test field failed validation', 'error' => true );
    	}
    
    	return $err;
    }, 10, 2 );
    
    

    Please do know that the validation strategy is bad(It would have been much better if we had used WP_Error to allow adding multiple errors) but it is from our old days and the validation filter was included without much thought.

    I look forward to rewrite it in near future.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: image meta data instead of image on mobile. #27720

    Hi Carsten,
    It seems the “View” for photo gallery is set to list. Please check the view setting for the components and photo gallery and make sure it is not set to the list. That will fix it.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: Activity Plus Reloaded for BuddyPress #27719

    Hi,
    Welcome to BuddyDev and thank you for the suggestions.

    1. Limiting the number of files in one activity:- Please allow me to check it. We can most probaly have it easily.

    2. Adding the option for the link/graphic:- This will need a ui change. I do not think we will be able to have it currently. I believe BuddyPress Links did something similar in the past.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348
    Brajesh Singh on in reply to: Add fields to gallery #27718

    Hi Christophe,
    I am sorry for the delayed reply.

    Her is an addon that shows how to add custom field on the gallery create screen

    https://github.com/mediapress/mpp-gallery-categories/blob/master/mpp-gallery-categories.php

    Hope that helps.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25348

    Hi Moose
    Thank you for the question.

    To answer your question.

    1. The front template for member type works, but it is not what you are expecting. The front template is used to show the contents inside the content area(below the member header where you see activity etc)

    2. If your goal is to completely control the profile page layout by member type, we can easily do it by forcing bp to load our own template if exists.

    
    add_filter( 'bp_template_hierarchy_members_single_item', function ( $templates ) {
    
    	$member_types = bp_get_member_type( bp_displayed_user_id(), false );
    	foreach ( $member_types as $member_type ) {
    		array_unshift( $templates, "members/single/index-type-{$member_type}.php" );
    	}
    
    	return $templates;
    } );
    
    

    Now, you can create buddypress/members/single/index-type-somemembertype.php and that will be the one used for whole page(You will need to include headers/footers etc manually here).

    Regards
    Brajesh