Skip to:
Content
Pages
Categories
Search
Top
Bottom

Replace BuddyPress profile with custom profile


  • Eugene
    Participant

    @euge_g

    I’m almost done with a custom implementation of WordPress 3.5.1. It’s a closed community and I have a pretty complex profile page and member directory. I can’t use BuddyPress completely because of specific requirements. For example, some profile attributes are not editable by members, but are required. These fields are populated during member signup, which is also a custom implementation of mine.

    However, eventually I would like to use BuddyPress for most of it’s other community features, such as the activity stream, messaging, forums, etc.

    Any ideas on how I can replace/integrate my profile implementation with BuddyPress? Here are some initial ideas:

    • Override BP profile page with a child theme to use my custom php template to only display the profile not edit it. Is this possible? Then users would use my custom profile form which is in wp-admin.
    • In addition to the above I could hook my profile page to save it’s data in BP’s xprofile tables instead of my custom table.
    • Continue to use my custom implementation but only put the default name field in BP’s xprofile table to “connect” the two profiles together.

    In addition to this, I played around with BP and my implementation and I couldn’t figure out how to filter 2 essential items: links to profile page and avatars.

    1. I have a filter on get_avatar to display the member’s profile headshot, but I couldn’t get BP to display it when I filtered on bp_core_fetch_avatar or bp_core_fetch_avatar_filter.
    2. My member profile page is at /profile/member using a custom specialized page template. Can I filter BP’s profile links to link to this instead of it’s profile page?

    Thanks in advance for any input

Viewing 4 replies - 1 through 4 (of 4 total)

  • modemlooper
    Moderator

    @modemlooper

    You can hide fields from being edited easy. in members/single/edit.php you can exclude fields by ID. Use comma separated list.

    if ( bp_has_profile( 'profile_group_id=' . bp_get_current_profile_group_id() . '&exclude_fields=2,3,4' ) ) :

    full code example https://gist.github.com/modemlooper/5816548


    Eugene
    Participant

    @euge_g

    If I were to make changes to the edit.php file, would they potentially get overwritten when upgrading?

    No they wouldn’t as you are working in a child theme.. aren’t you! if not you should be.

    I’m not sure but scanning your post possibly suggests smething amiss in your understanding of BP, as modemlooper points out hiding fields is easy and along with the privacy controls on BP profile fields you can ensure that they are set to both required and only editable by admins so not sure why you need your custom form, but may have overlooked the reason.


    Eugene
    Participant

    @euge_g

    I’ll certainly look into this solution more.

    When I started I was new to WordPress. Now I’m new to BuddyPress so am looking at the feasibility of integrating or replacing what I’ve written. I have a lot of specifc business rules in the profile I’ve written so I would prefer to use what I have, not to mention not to throw away all my work. The hidden but required fields is just an example of one of the many business rules I’ve written in my plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replace BuddyPress profile with custom profile’ is closed to new replies.
Skip to toolbar