-
Author
-
December 27, 2013 at 11:45 #8788frien337Participant
Hello Everyone,
I see a lot of mention about the following plugin in this forum:
http://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/
However, it doesn’t seem to work very well for me. I have tried using it on several fresh installs but I always get the same problem. The problem seems to be that the template no longer recognises the date of birth field when I use this plugin.
Going to “Sweet Date > BuddyPress > Age Field” i get a small message saying that there is no age field.Please do let me know how you got this plugin to work? I would like to use it so that the birthdate doesnt show on the profile page, but rather just the age in years.
Thanks,
RyanDecember 27, 2013 at 18:01 #8816AbeKeymasterHi, We did some changes to support the Birtdate field from this plugin. So please replace this files content until next update:
wp-content/themes/sweetdate/custom_buddypress/bp-functions.php with https://archived.seventhqueen.com/files/bp-functions.txtwp-content/themes/sweetdate/custom_buddypress/kleo-bp-search.php with https://archived.seventhqueen.com/files/kleo-bp-search.txt
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 28, 2013 at 00:48 #8825AbeKeymasterCool 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.December 28, 2013 at 12:08 #8830frien337ParticipantHey Abe – disaster 🙁 🙁 The fix works fine on the profile page and searching, however, it removes the Birthday selector from the registration page… any ideas?
December 28, 2013 at 12:24 #8831AbeKeymasterMy code doesn’t have anything to do with registration page 🙂
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 23, 2014 at 21:04 #10137frien337ParticipantHi Abe,
I found a new problem with this plugin, unfortunately it doesn’t allow users to edit their profile. The user can access the edit profile page, can save his changes, but then they don’t appear when his profiled is viewed.
Do you have more ideas on what to do? Or even how to get the standard birthday field to show the user’s age instead of the full birthdate (like the members directory does).Thanks,
RyanJanuary 27, 2014 at 13:51 #10285AbeKeymasterHello, I developed this function to show the age instead of the date. Add it to your functions.php file
COPY CODEadd_filter( 'bp_get_the_profile_field_value', 'kleo_get_field_value', 15, 3); function kleo_get_field_value($value, $type, $field_id) { $value_to_return = $value; $field = new BP_XProfile_Field($field_id); if ($type == 'datebox') { $value_to_return = floor((time() - strtotime($field->data->value))/31556926); } return $value_to_return; }
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The topic ‘Xprofile Fields Plugin Compatability with Sweet date’ is closed to new replies.