donmik
Forum Replies Created
-
In the faq, I explain how to create filter to change the way the value of fields are displayed.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] suggestion and link : Add rich textI will take a look when I have more time… Thanks!
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Add Checkbox acceptance suggestionYou can add the links to field description if you use html.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Adding social media "Follow" iconsI believe your best chance is to use filters…
I’m not aware of the details with buddypress 2.0 and for now I don’t have time for this, so I have no plans of rewrite this plugin for now…
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Hide search resultsI had not thought about this when I created Nobody visibility… You’re right, but I believe I can’t solve it.
I’ve been searching in buddypress code where they do the search and there is no filter to modify the query… So the only way I think will be modify buddypress plugin…
If you want to modify it inside buddypress, the file is:buddypress/bp-core/bp-core-classes.php. Line 364.
/** Search Terms ******************************************************/ // 'search_terms' searches the xprofile fields // To avoid global joins, do a separate query // @todo remove need for bp_is_active() check if ( false !== $search_terms && bp_is_active( 'xprofile' ) ) { $search_terms_clean = mysql_real_escape_string( mysql_real_escape_string( $search_terms ) ); $search_terms_clean = like_escape( $search_terms_clean ); $found_user_ids_query = "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE '%" . $search_terms_clean . "%'"; $found_user_ids = $wpdb->get_col( $found_user_ids_query ); if ( ! empty( $found_user_ids ) ) { $sql['where'][] = "u.{$this->uid_name} IN (" . implode( ',', wp_parse_id_list( $found_user_ids ) ) . ")"; } else { $sql['where'][] = $this->no_results['where']; } }You need to change the query to avoid searching in the fields with nobody visibility.
Hi,
You can use a filter to create the url if you want.
You don’t understand. I have not built it. The website html5 input is a web standard from W3C. It’s impossible to change… It’s how the field type “url” works… The “http://” is required for this type of field.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Hide search resultsSorry, I don’t understand your question. Can you give me more details?
It’s the way it works… If you select “Website” in Field’s type, you are using an HTML5 input with url type. This input requires a valid website url and this require “http://”.
If you don’t want to require http://, you have to use a “Text box”.
Have you tried the FAQ
Can I modify how the fields value are showned?
Yes, you can, since version 1.5.4, I have added a filter called “bxcft_show_field_value”. You can use it and modify the value of your fields. For example, if you need to show only the day or month of the birthdate you need to add this code below in the functions.php of your theme:add_filter( 'bxcft_show_field_value', 'my_show_field', 15, 4); function my_show_field($value_to_return, $type, $id, $value) { $value_to_return = $value; if ($value_to_return == '') return $value_to_return; $value_to_return = $value; if ($type == 'birthdate') { $value = str_replace("<p>", "", $value); $value = str_replace("</p>", "", $value); $field = new BP_XProfile_Field($id); // Get children. $childs = $field->get_children(); $show_age = false; if (isset($childs) && $childs && count($childs) > 0) { // Get the name of custom post type. if ($childs[0]->name == 'show_age') $show_age = true; } if ($show_age) { return '<p>'.floor((time() - strtotime($value))/31556926).'</p>'; } return '<p>'.date_i18n( 'F j' , strtotime($value) ).'</p>'; } return $value_to_return; }Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Fields not showing in BP V1.8You are probably using a custom theme so you don’t have all the buddypress hooks. Check the buddypress default theme the same file, and you will see the hooks you need. Copy them in your theme if you want this plugin works.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Multi select box & OtherHi,
I think the only way to do this will be using javascript, so I’m afraid there is no easy way for now.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] No image profile field shownCheck the FAQ
Why my fields are not showing ?
If you are using Buddypress 1.7, you need to check if you have the new hook “bp_custom_profile_edit_fields_pre_visibility”. Check in your edit.php (/your-theme/members/single/profile/edit.php, if this page is not in your theme, check in buddypress plugin in bp-themes/bp-default folder) and register page (/your-theme/registration/register.php, if this page is not in your theme, check bp-default theme of buddypress plugin) if this line of code: <?php do_action ( ‘bp_custom_profile_edit_fields_pre_visibility’ ); ?>. If you don’t see it, you must add it just before the code of visibility settings.Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] Address field?I think the same that is said in the ticket. It would be very complicated to create this. I believe it will be better to manually create all fields and put them in a new group of fields.
Forum: Plugins
In reply to: [Buddypress Xprofile Custom Fields Type] translate fields valueHi,
I found this thread, so I believe this is not possible with WPML at this moment…