Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author donmik

    (@atallos)

    Hi,

    echo xprofile_get_field_data($field_id, $user_id);

    Try this. Replace $field_id with the id of your field and $user_id with the id of your user.

    Thread Starter CraftyMc

    (@craftymc)

    That’s no good as it should be id of the bd profile which is being viewed, it’s basically a profile card of the use when you hover over their avatar. so using $user_id would set a fixed standard for all profiles and not the age of the profile which you’re viewing. =(

    Thanks

    haven’t install this great plugin yet, anyways, a profile card eh? interesting..
    not sure if this will suit your needs..

    try….

    <?php
    $bp_user = bp_displayed_user_id();
    echo xprofile_get_field_data($field_id, $bp_user);
    ?>

    wherein $bp_user is the profile you’re currently viewing..

    #just a passing bystander

    Plugin Author donmik

    (@atallos)

    Like ghascabra said, bp_displayed_user_id() is the method you need.

    Thread Starter CraftyMc

    (@craftymc)

    Tried it, didn’t work ??

    Plugin Author donmik

    (@atallos)

    What the method is returning ? Are you seing any error? What returns bp_displayed_user_id()? If you don’t give more details about what you have, I can’t help…

    lighterdayz

    (@lighterdayzyahoocom)

    Hi, I have a similar question. I am trying to input this
    <?php echo bp_member_profile_data( ‘field=Age’ ); ?> to show age on the Member Directory. As CraftyMC said, it shows the string: 00/00/0000 00:00:00 instead of the age.

    Any fix to this?

    Thanks!

    Plugin Author donmik

    (@atallos)

    bp_get_profile_field_data( array('field' => ID_OF_YOUR_FIELD, 'user_id' => ID_OF_THE_USER ) )

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show field data elsewhere?’ is closed to new replies.