Skip to:
Content
Pages
Categories
Search
Top
Bottom

field visibility

  • Hi,

    trying to display profile fields. In the admin or user settings I can set the visibility to public, members or me only.
    When in the members-loop.php I can set certain fields to show up. However these fields will always show up, no matter how the visibility is set.
    Is there a way to do something like: if bp_field_visibility of field xyz is public then show else don’t. Or do I miss something?

    Thank you, have a nice day !
    Leendert

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    @shanebp Thanks. I used the code and put it in the members-loop. No result. I can see the fields in the admin section as well as in the profile. I can change visibility to one of the four possibilities. But none shows up in the members listing. I don’t get it.

    Avatar of Leendert van der Ree
    Leendert van der Ree
    Participant

    @lvdree

    @shanebp Had support from the developer of xprofile. He thinks has something to do with buddypress. I don’t know. What I do know is that if I have the following code in the members-loop file:
    <?php $hidden_fields = bp_xprofile_get_hidden_fields_for_user(bp_get_member_user_id()) ; ?>
    <?php if (xprofile_get_field_data(‘field_name’) && !in_array(xprofile_get_field_id_from_name(‘field_name’), $hidden_fields)) : ?>
    <?php echo xprofile_get_field_data (‘field_name’); ?>
    <?php endif; ?>

    <?php bp_member_profile_data( ‘field=Adres’ ); ?>

    The first code with $hidden_fields and xprofile doesn’t return anything.
    The second code does always return data, no matter how visibility is set.

    Any ideas?

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    I’m not sure what the problem is.

    You might be interested in our premium plugin that will handle everything for you.

    http://www.philopress.com/products/buddyprofiledata/

    Avatar of Leendert van der Ree
    Leendert van der Ree
    Participant

    @lvdree

    that does the trick. Thank you

    Avatar of aussiemike
    aussiemike
    Participant

    @aussiemike

    @shanebp would you premium plugin allow me to hide the BP name field?

    This is a problem for me as members do not change their name and then complain about privacy

    Regards
    Mike

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    @aussiemike

    I’m not sure what you mean, but if you mean the member names as shown in the loop on the members page, then no.

    If you’d like more info, please use:

    http://www.philopress.com/services/

    Avatar of aussiemike
    aussiemike
    Participant

    @aussiemike

    Thank you. I have sent a message through your contact form

    Mike

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

You must be logged in to reply to this topic.