BuddyDev

Search

[Resolved] BuddyPress Xprofile Custom Field Types, : Image.

  • Participant
    Level: Enlightened
    Posts: 60
    tangpage on #22880

    display error image icon when it’s empty….

    there’s fix for this?

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #22888

    Hi,
    Please provide the steps to produce the error.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 60
    tangpage on #22905

    for example:

    if i have profile field (id: 99) , used image type:

    $image = xprofile_get_field_data(99, bp_displayed_user_id());

    i want to show this at some other place, use some codes like

    if($image){
    echo ‘blah, blah, blah’;
    echo $image;
    }

    when this field is actually empty,
    it will still show an error icon of image… instead of nothing…

    or,

    i tried…

    if(!empty($image)){
    do something here…
    }

    but when the field is actually empty, still showing “do something here…” instead of nothing….

    .; (

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #22908

    Will assist tomorrow.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 60
    tangpage on #22970

    : )

    it’s same to the phone profile field,

    for example, i have profile field signed to phone type.

    $phone = xprofile_get_field_data(66, bp_displayed_user_id() );

    then,

    when i do some code like this:

    if($phone){

    echo ‘<i class=”icon-phone”></i>’ . $phone ;

    }

    on the front, when phone field is actually empty, it will still show <i class=”icon-phone”></i>.
    when it’s not empty, it will show $phone ahead of <i class=”icon-phone”></i>…

    weird, right.

    If i changed field type to just text field, it shows normal.

    when it’s empty, nothing showing, when it’s not empty, show content normally by order.

  • Participant
    Level: Enlightened
    Posts: 60
    tangpage on #22971

    plus, i am looking forward to your woocommerce plugin to become a big thing!!!!!!

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #22972

    Hi,
    I will test it today/tomorrow and get back to you.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 60
    tangpage on #23085

    hi… just curious… ; )

    if you have found the problem as i did…

    the profile field showed on the front, event when it’s blank, still showing a checkbox of : Check this to delete this file..

    and error image icon.

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #23088

    Hi,
    One of our team members teated it and we did not find any issue.

    You will need to use the actual user id as second parameter. Display user id is only available on user profiles.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 60
    tangpage on #23093

    … i just found another thing…

    It shows normal if i login as a regular as instead of super admin…

    as super admin, on profile editing page, even showing the checkbox for deleting on empty field…

    But it looks normal to regular users.

The topic ‘ [Resolved] BuddyPress Xprofile Custom Field Types, : Image.’ is closed to new replies.

This topic is: resolved