Skip to:
Content
Pages
Categories
Search
Top
Bottom

Profile Comments

  • Avatar of joelpittet
    joelpittet
    Participant

    @joelpittet

    Would it be possible to add the wp comments to profiles?

    Also, what is the easiest way to get xprofile field data?

    I ended up doing something messy like this:

    switch ($_SERVER['SERVER_NAME']) {

    case ‘localdomain.lh’:

    $field_id = ’1432′;

    break;

    default:

    $field_id = ’1678′;

    break;

    }

    $field = new BP_XProfile_Field( $field_id, $user_id );

    echo ($field->data->value);

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of Paul Gibbs
    Paul Gibbs
    Keymaster

    @djpaul

    Look in (drumroll!) bp-xprofile.php, namely the xprofile_get_field_data() function which I think is what you need. Is that the kind of thing you were after?

    Avatar of joelpittet
    joelpittet
    Participant

    @joelpittet

    Thanks DJPaul, I was really tired starying at that bp-xprofile.php and didn’t spot any of those handy functions. Thanks for pointing me back to that file. I ended using

    xprofile_get_field_data() to save myself a step.

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

You must be logged in to reply to this topic.