donmik
Forum Replies Created
-
I believe the easier way is to edit template of edit profile form and hide the fields you don’t want users can change…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] How to set Default Value?I don’t understand. What type of field are you using? My types don’t have any default value…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] conditional fieldsHi,
Sorry, I don’t understand what you need to do… Give me more details or maybe a url to see it…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Duplicate fieldIf you have buddypress updated, this is not happening I think. Maybe it’s a theme issue.
Hi, this code has nothing to do with what you want to achieve…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Large image in view profileYou can write it in style.css in your theme, but you need to create it. The lines you need don’t exist, you need to create them…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Large image in view profileBecause this code is only for edit profile… it’s not responsible of the profile template…only the profile form.
With the css, I can’t help you if you don’t send me a link to see it. I need to know what classes or ids to use…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Large image in view profileYou can do it with a filter or with css…
In the FAQ, I explain how to use the filter to change the way the field value is displayed. In your functions.php, you can write the filter and instead displaying a simple img tag with alt attibute, you can add width and height attributes.
With css it’s even easier…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Birthday and age profile labelIf yo need, you can modify buddypress template to show Age instead of Birthdate too.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Limit uploaded file size and scaleI think it will be better to open a new thread and give some screenshots or url, then I can help you. This thread is too old, and maybe the solution here is not good for you…
Hi,
I believe the only way to do this is rewrite the function responsible of create buddypress links, you need to use the following code and delete the previous:
/** * This is the custom filter to create links */ function my_xprofile_filter_link_profile_data( $field_value, $field_type = 'textbox' ) { // Access the field you are going to display value. global $field; // In this array you write the ids of the fields you want to hide the link. $excluded_field_ids = array(2,6,7); // If the id of this $field is in the array, we return the value only and not the link. if (in_array($field->id, $excluded_field_ids)) return $field_value; if ( 'datebox' == $field_type ) return $field_value; if ( !strpos( $field_value, ',' ) && ( count( explode( ' ', $field_value ) ) > 5 ) ) return $field_value; $values = explode( ',', $field_value ); if ( !empty( $values ) ) { foreach ( (array) $values as $value ) { $value = trim( $value ); // If the value is a URL, skip it and just make it clickable. if ( preg_match( '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $value ) ) { $new_values[] = make_clickable( $value ); // Is not clickable } else { // More than 5 spaces if ( count( explode( ' ', $value ) ) > 5 ) { $new_values[] = $value; // Less than 5 spaces } else { $search_url = add_query_arg( array( 's' => urlencode( $value ) ), bp_get_members_directory_permalink() ); $new_values[] = '<a href="' . $search_url . '" rel="nofollow">' . $value . '</a>'; } } } $values = implode( ', ', $new_values ); } return $values; } /** * We remove the buddypress filter and add our custom filter. */ function remove_xprofile_links() { // Remove the old filter. remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 ); // Add your custom filter. add_filter( 'bp_get_the_profile_field_value', 'my_xprofile_filter_link_profile_data', 9, 2); } add_action('bp_setup_globals', 'remove_xprofile_links');Try it and get in touch if this does not work.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] show numbers as valutaHi, you need to do something like this:
$ids = array(2, 18, 19); if (in_array($field->id, $ids)) {You can add all the ids to the array.
instead of
if ($field->id == '18') {Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Duplicate website fieldWhat theme are you using? What versions of wordpress, buddypress and my plugin?
Try 1.5.9.6.
Hi,
i don’t know, you need to check what value is saved in the database to see if the error happens when displaying the field value or when saving. If it’s when you are displaying it only, maybe you can use a custom filter to use strip_tags function of php and create the link by yourself.