Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbpress profile integrates with bp


  • ozpoker
    Participant

    @ozpoker

    Although bbpress is slightly integrated – is is possible to link bbpress member profiles to back to their bp memebr page?

    is there a plugin or something?

Viewing 4 replies - 26 through 29 (of 29 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    So in theory, if I write a function to filter into your oci_user_ function, say with an sql query to get the xprofile data I want to use in the forum, it will hit that function, run the query, add it to the bbGroups array, and that array gets saved to the user_meta for later access, correct? That way it isn’t always running my query everytime, but only if it doesn’t exist in bbGroups already… Am I on the right track?


    Burt Adsit
    Participant

    @burtadsit

    Yep. You got it exactly John.


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Looks like I should be able to use “bp_get_field_data” to get the job done, lets see if I can get this to play nice. :D


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Quick suggestion, although I bet many people won’t run into this issue…

    function oci_get_userdata($u){
    $u = (int) $u;
    $user = bb_get_user($u);
    if ($user->bbGroups) {
    return stripslashes_deep((array)$user->bbGroups);
    } else {
    return stripslashes_deep((array)$user);
    }
    }

    Then, I changed…

    function oci_user_name($u){
    $bp_user = oci_get_userdata($u);
    if ($bp_user['fullname']) {
    return $bp_user['fullname'];
    } else {
    return $bp_user['display_name'];
    }
    }

    Basically, I integrated my forums before installing BuddyPress, so there are users that haven’t updated their BuddyPress profiles that won’t have fullname’s yet… This way I have all of their normal info to manipulate later and still get their original wordpress display_name to fallback on…

    There is probably a much prettier way of doing this, but this is the solution my tired brain could come up with for now.

Viewing 4 replies - 26 through 29 (of 29 total)
  • The topic ‘bbpress profile integrates with bp’ is closed to new replies.
Skip to toolbar