WordPress.org

Forums

BP Profile Search
[resolved] I added birth date field but it says There is no date field in your prof (11 posts)

  1. markspivak
    Member
    Posted 3 years ago #

    I added birth date field but it says There is no date field in your profile,
    any help?

    http://wordpress.org/extend/plugins/bp-profile-search/

  2. Andrea Tarantini
    Member
    Plugin Author

    Posted 3 years ago #

    Did you add that field with type 'datebox'?

  3. markspivak
    Member
    Posted 3 years ago #

    thanks:) works.
    For some reason this doesnt work specificly for birth day field.

    <?php function add_member_custom_extended_profile() {

    $data_birth = bp_get_member_profile_data( 'field=birth date' );

    echo "Birth Day: ";echo '<font color=000000>'.$data_birth .'
    </font>';
    } ?>

  4. wbajzek
    Member
    Posted 3 years ago #

    I am having a similar problem; my extended profile datebox data is not being returned by bp_get_member_profile_data(). Inside xprofile_format_profile_field() the value is being "formatted" by bp_format_time() and the output is empty.

  5. wbajzek
    Member
    Posted 3 years ago #

    BuddyPress stores the output of the datebox as a string like "2012-07-19 00:00:00". bp_get_member_profile_data() retrieves that from the database and then passes it to xprofile_format_profile_field(), which passes it to bp_format_time(), which returns false because the value fails the is_numeric() check.

  6. wbajzek
    Member
    Posted 3 years ago #

    I filed a bug on it. In the meantime, markspivak, you can get to your field by using:

    <?php global $members_template;
    $data_birth = $members_template->member->profile_data['birth date']['field_data']; ?>
  7. markspivak
    Member
    Posted 3 years ago #

    thanks!
    but how do I remove the: "00:00:00" ?

    1992-04-11 00:00:00

    :D

  8. wbajzek
    Member
    Posted 3 years ago #

    $data_birth = substr($data_birth,0,10);

  9. markspivak
    Member
    Posted 3 years ago #

    thanks alot!

  10. buddhatunes
    Member
    Posted 2 years ago #

    I am having the same issue with no birth date field showing, even though I used datebox, etc...

    Site is http://buddha.fm

  11. Andrea Tarantini
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Sorry for the late reply. Could you please try the latest plugin version and let me know if you have better luck?

    Please open a new thread if necessary, I'm going to close this one because it already contains two solved questions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BP Profile Search
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.