WordPress.org

Ready to get started?Download WordPress

Forums

BP Profile Search
Age Range Search Not Working (5 posts)

  1. hughshields
    Member
    Posted 7 months ago #

    In the Installation section for this plugin it says that "currently the date box fields are not supported". I am using Gravity Forms Registration add on to create a custom registration page that uses the three drop down date selector to enter a birthdate. The date displays in the new user profile but the age search does not work for new users. Not until a new user goes back to their activated profile and resaves their birthdate does the age search work.
    Any guidance on configuring the settings to make this work would be appreciated. Do I need to generate an Age field using Buddypress Costom Field Types or another plugin to make the age search work?

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

  2. hughshields
    Member
    Posted 7 months ago #

    I noticed that on the "Profile Search Setup" page I am unable to check the "Birthday" field in the "Selected Profile Fields" list. Perhaps this is why this field is not working?

  3. Andrea Tarantini
    Member
    Plugin Author

    Posted 7 months ago #

    I don't know how Gravity Forms Registration works, so I can only guess it stores the date in the timestamp format.

    BuddyPress can read both the timestamp and the text format, but it saves the date in the text format.

    BP Profile Search supports the text format only, and this could explain the issue you are experiencing but, as I said, that's just my guess.

    Please let me know if you have more information.

  4. hughshields
    Member
    Posted 7 months ago #

    Thank you for your reply. I think you are correct. Gravity forms is saving in the timestamp format which looks like this: 480297600. As you say, Buddypress reads both formats so it is able to display the birthdate correctly in the member profile as March 22 1985. However BP Profile Search must not be able to read this format. The entries in the database that BP Profile Search is able to process look like: 2012-02-23 06:12:45 which I believe is the MySQL date format or as you call it the text format.
    Unfortunately Gravity Forms does not support compatibility with other plugins, and because their format works with Buddypress their support cannot help.
    So to fix this I either need to convert the Gravity Forms database entry to the MySQL date format or figure out if their is a hook in BP Profile Search to convert the timestamp to MySQL date format.
    Any thoughts?

  5. Andrea Tarantini
    Member
    Plugin Author

    Posted 7 months ago #

    I would prefer your first solution, that is store the date in the proper format in Gravity Forms.

    Your second solution, modify BP Profile Search, would always require two database queries, one to search dates in the timestamp format and the second to search dates in the MySQL format, with an obvious performance penalty.

    If you are interested in this second solution anyway, I suggest you have a look at BP Profile Search version 2.7, where the timestamp format was supported (BuddyPress changed the date format in BP 1.5, and BP Profile Search changed accordingly in version 2.8).

Reply

You must log in to post.

About this Plugin

About this Topic