BuddyDev

Search

[Resolved] BuddyPress xprofile fields

  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #21252

    Hi i am using Buddypress 4.1.0 and it has extended profile fields built in. I am also reading on various forums about xprofile plugin (which has apparently not been updated for a while), so I jsut wanted to confirm that now BP has got these xprofile fields in, so that plugin is redundant?

    I have the Member Types Pro plugin and somewhere i read that Member Type is also a BP field (how would that be different from say my creating an Xprofile field and calling it Member Type)?

    The MTP plugin i understand allows additional functionality to manage diff member types eg landing page, groups, etc., which is on top of the BP member types field.

    Can you please confirm my understanding or correct me if i am wrong?

    thanks,
    Vivek

  • Keymaster
    (BuddyDev Team)
    Posts: 24222
    Brajesh Singh on #21254

    Hi Vivek,

    1. The Xprofile custom field types plugin adds extra field types. You should only install it if you need it. We created a fork of the abandoned plugin and rewrote it completely to make it better for future.
    You can find it here.
    https://wordpress.org/plugins/bp-xprofile-custom-field-types/

    You should only use if it if you need fields offered by it.

    2. For member type field(all the member type field plugins are provided by BuddyDev only), You don’t need the extra plugin.

    You are using our BuddyPress Member Types Pro and it comes with a more powerful field type(single/multiple and a lot more customizations)

    You are correct about the member types plugin, It does allows controlling all those features and is a lot more than the member type field.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #21284

    Thanks Brajesh. I noted that you have emphasized that the xprofile Custom Field Types plugin, must be used ONLY if needed. Of course that caveat would apply to any plugin, but is there any known performance/security overhead with this plugin which prompted the caveat?

    I just need to give users the ability to upload .doc/.pdf/.jpf files, and to store this in their profiles, and hence am considering this plugin. If there is another, better way to achieve this, your suggestion would be much appreciated.

    thanks,
    Vivek

  • Keymaster
    (BuddyDev Team)
    Posts: 24222
    Brajesh Singh on #21285

    Hi Vivek,
    Thank you for asking.
    No, There is no performance issue. It’s a minor plugin and most of the time you won’t even notice the difference.

    The following types are allowed:
    File:- ‘doc’,’docx’,’pdf’,
    Image:- jpg,jpeg,gif,png

    There are filters to allow modify this list. The default allowed limit is 8MB per file(It may be lower depending on how much upload size your server allows).

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #21357

    Thanks, Brajesh.

    As i need to use a single field to upload ID which may be uploaded as doc, pdf, or jpg in the same field and not a separate image field, so i understand it should be possible to add jpg type to file field- can you pls share how this can be done?

    thanks,
    Vivek

  • Keymaster
    (BuddyDev Team)
    Posts: 24222
    Brajesh Singh on #21382

    Hi Vivek,
    Please add this to your bp-custom.php.

    I have allowed all image types.

    
    
    /**
     * Add images types to allowed file extension.
     *
     * @param array $extensions all extension.
     *
     * @return mixed
     */
    function buddydev_custom_profile_field_type_file_extensions( $extensions ) {
    
    	$extensions['file'] = array_merge(
    		$extensions['file'],
    		array(
    			'jpg',
    			'jpeg',
    			'gif',
    			'png',
    		)
    	);
    
    	return $extensions;
    }
    
    add_filter( 'bpxcftr_allowed_extensions', 'buddydev_custom_profile_field_type_file_extensions' );
    
    

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #21395

    Further to the above query, I also noticed your comment “You are using our BuddyPress Member Types Pro and it comes with a more powerful field type(single/multiple and a lot more customizations)”
    – so does the MTP plugin have an option to upload file type fields also?
    thanks, Vivek

  • Keymaster
    (BuddyDev Team)
    Posts: 24222
    Brajesh Singh on #21396

    Hi Vivek,
    No,
    The answer was in context to “member type field”.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 72
    Vivek Mathur on #21429

    Ok- thanks very much for the code snippet.

  • Keymaster
    (BuddyDev Team)
    Posts: 24222
    Brajesh Singh on #21443

    You are welcome.

The topic ‘ [Resolved] BuddyPress xprofile fields’ is closed to new replies.

This topic is: resolved