donmik
Forum Replies Created
-
You can use “bxcft_show_field_value” filter to change the way the value of fields are displayed if you want.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Age echoes inside a paragraphHi,
It’s a buddypress thing, the value of fields are wrapped inside a p tag. If you don’t want it, you can apply a filter and remove it, or use strip_tags php function.
Sorry, i’m wrong, the two fields will return the value so you need to get hidden fields first.
I don’t know why in your case xprofile is not showing the same thing. In my case, it’s working… This is not really related to my plugin, maybe in buddypress forums you can find more help.
Hi,
I don’t know exactly what you are trying to do, but I can say:
– xprofile_get_field_data(‘field_name’) will return nothing inside members loop because of the same reason I’ve said before about bp_xprofile_get_hidden_fields_for_user. You need to pass the user_id you want the data. Something like:
xprofile_get_field_data(‘field_name’, bp_get_member_user_id());– If you want to display some fields, you don’t need at all to check agains bp_xprofile_get_hidden_fields_for_user(). xprofile_get_field_data only return value when current user (logged in or not) can see it depending on visibility settings so I believe your code is redundant.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Change the LabelThis is possible for registration form and edit profile form.
You can only use this filter for the fields which are using a field type provided by my plugin. If it’s a field with a type from buddypress defaults, you cannot use this filter.
To know the id of a field, you can try to edit a profile field and in the url you can see something like this:
page=bp-profile-setup&group_id=1&field_id=31&mode=edit_field31 is the id of this field.
But I believe 1 is the id of the default and required field of buddypress “Name” so you cannot change this with the filter provided by my plugin. You can use buddypress filter “bp_get_the_profile_field_name” to do this.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Change the LabelHi,
Try this:
add_filter('bxcft_field_label', 'my_field_label', 10, 2); function my_field_label($label, $field_id) { if ($field_id == 1){ $label_to_return = "Color"; return $label_to_return; } return $label; }But this will only change the label in the form, not when viewing profile. When you view profile you will need to change the template.
Hi,
You cannot use this functions in members loop without sending the user_id. By default buddypress will search the hidden fields for the displayed user, but in members loop you are not displaying a single user data, so buddypress function bp_displayed_user_id() will not return any id. This is why your functions is returning an empty array.
If you want to use this function in members loop you must use like this:
bp_xprofile_get_hidden_fields_for_user(bp_get_member_user_id())
This will return an array of the ids of hidden fields for the member displayed in the loop and the current user logged in.I’ve already checked my plugin with the beta version of buddypress 2.0 and it is working as expected. So I will not to rewrite it for now…
Update now to 1.5.8.7, I think it’s solved in registration form too.
Update the plugin, the last version 1.5.8.6 has the fix.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Image link gets brokenI don’t know why but it seems you have some conflict maybe between plugins or a filter that is causing the image is not displayed. You can write your own filter to try to solve it, in the faq you can see a sample of filter.
Hi,
You’re right, I’ve added a script to remove the description in case it’s a checkbox acceptance field.
This should work now.
Hi, it’s because the template of buddymobile is not complete. You can talk with the creator of buddymobile and try to ask him to copy all the hooks of buddypress default theme for edit profile. The file is in buddymobile/themes/mobile/iphone/buddypress/members/single/profile/edit.php.
The missing hook is “bp_custom_profile_edit_fields_pre_visibility”. This is the hook I am using to render custom profile fields. You can add it by yourself maybe creating a theme child, but I think the creator of buddymobile has to change this…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Image link gets brokenHi,
Your link is not working. When I click on link I see
RATES
THIS CONTENT IS RESTRICTED TO YOUR TYPE OF MEMBERSHIP
Please click HERE to get back to the home page
Check if the image is uploaded to see if there is an error when uploading the photo or when it is displayed.
Make it sortable will be more complicated, you probably have to use filters to modify query…