Search Results for 'profile fields'
-
AuthorSearch Results
-
April 6, 2019 at 6:25 am #304444
In reply to: field excerpt to show in members page
Venutius
ModeratorIf you go to Users>>Profile Fields and hover your mouse above the edit button for the field you cna see the field id in the url. it sounds like the id is 2 but could you confirm?
April 6, 2019 at 6:04 am #304443In reply to: field excerpt to show in members page
joshreid
ParticipantOh sorry I thought I added the backticks.
Yes sorry for the changes Im just trying to work out the problem.
I will explain better what I am trying to do.
On my website when a member fills out there profile or edits it one of the fields is a description field.Then when someone goes to the members page, the members profiles show up with the profile pic (and you can scroll down the page getting a quick look at the profiles) but there is no except about the profile. I want that description field to show up individually for each members description.
No I can’t confirm the field id, I tried looking for it but can’t find it. If I do a page inspect I can see field_2 but alot of other text after it. But I am not sure I am right about that, I was just going of the field name.
April 2, 2019 at 4:46 pm #304244In reply to: Edit css /colors in BP Profile
Venutius
ModeratorBy the looks of things you are trying to change the colours of the profile fields, so something like:
.profile-fields { color: blue; }Should work
However something more specific is sometimes required, such as:
#buddypress table.profile-fields { color: blue; }March 26, 2019 at 5:01 pm #304016In reply to: user profile fields
Venutius
ModeratorIf you’ve removed them from the profile group then I’d check to see they have been removed from the database it’s the bp_xprolfile_fields db you are looking for.
March 25, 2019 at 3:05 pm #303976In reply to: user profile fields
Venutius
ModeratorIt’s not clear what you are asking here, rooms? Are you talking about profile fields? did you remove some from the Users>>Profile Fields page for the Base field group but they still show up in registration, or something else?
March 20, 2019 at 4:26 am #303735Topic: BP Profile Search issues
in forum How-to & Troubleshootingmspiggie
ParticipantHow to create professional looking profile search forms to search members directory. At the moment I use BP Profile search but it looks really horrible with the fields going everywhere and it doesn’t even return the correct search eg I ticked search females but it returns both males and females
March 19, 2019 at 12:01 am #303685In reply to: How to REMOVE “This field can be seen by:”
chris19731973
Participant{RESOLVED} : How to REMOVE “This field can be seen by:” ?
In the folder of the Theme, add the code below at the end of the file called style.css :
For me in Localhost : C:\xampp\htdocs\buddypressdivi2\wp-content\themes\Divi\Style.css.field-visibility-settings-toggle{display:none!important;}
In Users/Profile Fields of WP-Admin, set the fields like below :
Visibility = Everyone
and Allow members to overrideFor information, the visibility of “This field can be seen by: All Members/Everyone/…” will be removed in both the Registration page & Edit Profile page … except for the fields (Required) Name …
It’s my first time on this BP Forum, please how to add “RESOLVED” ?
Thank you …March 18, 2019 at 4:14 pm #303675In reply to: How to REMOVE “This field can be seen by:”
chris19731973
Participant` <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?><div<?php bp_field_css_class( ‘editfield’ ); ?>>
<fieldset><?php
$field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
$field_type->edit_field_html();/**
* Fires before the display of the visibility options for xprofile fields.
*
* @since 1.7.0
*/
do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ );<?php
/**
* Fires after the display of the visibility options for xprofile fields.
*
* @since 1.1.0
*/
do_action( ‘bp_custom_profile_edit_fields’ ); ?></fieldset>
</div><?php endwhile; ?>`
March 18, 2019 at 4:10 pm #303674In reply to: How to REMOVE “This field can be seen by:”
chris19731973
ParticipantNow, I can read the message below when visitors choose “Register” :
Create an Account
Parse error: syntax error, unexpected ‘<‘ in C:\xampp\htdocs\buddypressdivi2\wp-content\themes\Divi\buddypress\members\register.php on line 189I removed the “Visibility” codes and the new code of the register.php file is :
Line 183 : */
Line 184 : do_action( ‘bp_custom_profile_edit_fields_pre_visibility’ );
Line 185 :
Line 186 :
Line 187 :
Line 188 : <?php
Line 189 :
Line 190 :
Line 191 : /**March 18, 2019 at 3:40 pm #303673zoleest
ParticipantStill not worked, but I found out a not too elegant solution. As far as I understand there is an order how the hooks run. There is a hook in class-buddypress.php
add_action( 'bp_core_signup_user', array( $this, 'subscribe_from_form' ), 10, 4 );so I added to my hooks 11, 4 so this is my code now:function xprofile_sync_wp_profile2( $user_id = 0 ) { // Bail if profile syncing is disabled if ( bp_disable_profile_sync() ) { return true; } if ( empty( $user_id ) ) { $user_id = bp_loggedin_user_id(); } if ( empty( $user_id ) ) { return false; } global $wpdb; // Get name from x-fields $display_name = xprofile_get_field_data('Név',$user_id ); $wpdb->query( $wpdb->prepare( "UPDATE wphu_users SET display_name = '%s' WHERE ID = %d", $display_name, $user_id ) ); } add_action( 'xprofile_updated_profile', 'xprofile_sync_wp_profile2', 11, 4); add_action( 'bp_core_signup_user', 'xprofile_sync_wp_profile2', 11, 4); add_action( 'bp_core_activated_user', 'xprofile_sync_wp_profile2', 11, 4);And fortunately it works now 🙂 I don’t know if this is a correct way, but work, so I’m okay with it.
March 18, 2019 at 1:04 pm #303669In reply to: How to REMOVE “This field can be seen by:”
Venutius
ModeratorThen you can overload the
edit.phpand ‘register.php` files and remove that attribute.get ftp access to your site and location
wp-content/plugins/buddypress/bp-templates/bp-legacy/members/register.php
wp-content/plugins/buddypress/bp-templates/bp-legacy/members/single/profile/edit.phpin these files locate and remove:
<?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"><span id="<?php bp_the_profile_field_input_name(); ?>-2"> <?php printf( __( 'This field can be seen by: %s', 'buddypress' ), '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' ); ?> </span> <button type="button" class="visibility-toggle-link" aria-describedby="<?php bp_the_profile_field_input_name(); ?>-2" aria-expanded="false"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></button> </p> <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> <fieldset> <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> <?php bp_profile_visibility_radio_buttons() ?> </fieldset> <button type="button" class="field-visibility-settings-close"><?php _e( 'Close', 'buddypress' ) ?></button> </div> <?php else : ?> <div class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> <?php printf( __( 'This field can be seen by: %s', 'buddypress' ), '<span class="current-visibility-level">' . bp_get_the_profile_field_visibility_level_label() . '</span>' ); ?> </div> <?php endif ?>Then place these modified files in `wp-content/themes/your-child-theme/buddypress/members/register.php’ and
`wp-content/themes/your-child-theme/buddypress/members/single/profile/edit.php’March 14, 2019 at 3:29 pm #303549In reply to: Register page keep refreshing
airsid
ParticipantHello,
Please find attached my plugins/buddypress/bp-themes/bp-default/registration/register.php content<?php get_header( 'buddypress' ); ?> <div id="content"> <div class="padder"> <?php do_action( 'bp_before_register_page' ); ?> <div class="page" id="register-page"> <form action="" name="signup_form" id="signup_form" class="standard-form" method="post" enctype="multipart/form-data"> <?php if ( 'registration-disabled' == bp_get_current_signup_step() ) : ?> <?php do_action( 'template_notices' ); ?> <?php do_action( 'bp_before_registration_disabled' ); ?> <p><?php _e( 'User registration is currently not allowed.', 'buddypress' ); ?></p> <?php do_action( 'bp_after_registration_disabled' ); ?> <?php endif; // registration-disabled signup setp ?> <?php if ( 'request-details' == bp_get_current_signup_step() ) : ?> <h2><?php _e( 'Create an Account', 'buddypress' ); ?></h2> <?php do_action( 'template_notices' ); ?> <p><?php _e( 'Registering for this site is easy, just fill in the fields below and we\'ll get a new account set up for you in no time.', 'buddypress' ); ?></p> <?php do_action( 'bp_before_account_details_fields' ); ?> <div class="register-section" id="basic-details-section"> <?php /***** Basic Account Details ******/ ?> <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4> <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_username_errors' ); ?> <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" /> <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_email_errors' ); ?> <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" /> <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_password_errors' ); ?> <input type="password" name="signup_password" id="signup_password" value="" /> <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_password_confirm_errors' ); ?> <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" /> <?php do_action( 'bp_account_details_fields' ); ?> </div><!-- #basic-details-section --> <?php do_action( 'bp_after_account_details_fields' ); ?> <?php /***** Extra Profile Details ******/ ?> <?php if ( bp_is_active( 'xprofile' ) ) : ?> <?php do_action( 'bp_before_signup_profile_fields' ); ?> <div class="register-section" id="profile-details-section"> <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4> <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?> <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?> <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> <div class="editfield"> <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" /> <?php endif; ?> <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea> <?php endif; ?> <?php if ( 'selectbox' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"> <?php bp_the_profile_field_options(); ?> </select> <?php endif; ?> <?php if ( 'multiselectbox' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <select name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" multiple="multiple"> <?php bp_the_profile_field_options(); ?> </select> <?php endif; ?> <?php if ( 'radio' == bp_get_the_profile_field_type() ) : ?> <div class="radio"> <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <?php bp_the_profile_field_options(); ?> <?php if ( !bp_get_the_profile_field_is_required() ) : ?> <a class="clear-value" href="javascript:clear( '<?php bp_the_profile_field_input_name(); ?>' );"><?php _e( 'Clear', 'buddypress' ); ?></a> <?php endif; ?> </div> <?php endif; ?> <?php if ( 'checkbox' == bp_get_the_profile_field_type() ) : ?> <div class="checkbox"> <span class="label"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></span> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <?php bp_the_profile_field_options(); ?> </div> <?php endif; ?> <?php if ( 'datebox' == bp_get_the_profile_field_type() ) : ?> <div class="datebox"> <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <select name="<?php bp_the_profile_field_input_name(); ?>_day" id="<?php bp_the_profile_field_input_name(); ?>_day"> <?php bp_the_profile_field_options( 'type=day' ); ?> </select> <select name="<?php bp_the_profile_field_input_name(); ?>_month" id="<?php bp_the_profile_field_input_name(); ?>_month"> <?php bp_the_profile_field_options( 'type=month' ); ?> </select> <select name="<?php bp_the_profile_field_input_name(); ?>_year" id="<?php bp_the_profile_field_input_name(); ?>_year"> <?php bp_the_profile_field_options( 'type=year' ); ?> </select> </div> <?php endif; ?> <?php if ( 'url' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> <input type="text" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" <?php if ( bp_get_the_profile_field_is_required() ) : ?>aria-required="true"<?php endif; ?>/> <?php endif; ?> <?php do_action( 'bp_custom_profile_edit_fields_pre_visibility' ); ?> <?php if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?> <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a> </p> <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>"> <fieldset> <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend> <?php bp_profile_visibility_radio_buttons() ?> </fieldset> <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a> </div> <?php else : ?> <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>"> <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> </p> <?php endif ?> <?php do_action( 'bp_custom_profile_edit_fields' ); ?> <p class="description"><?php bp_the_profile_field_description(); ?></p> </div> <?php endwhile; ?> <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids(); ?>" /> <?php endwhile; endif; endif; ?> <?php do_action( 'bp_signup_profile_fields' ); ?> </div><!-- #profile-details-section --> <?php do_action( 'bp_after_signup_profile_fields' ); ?> <?php endif; ?> <?php if ( bp_get_blog_signup_allowed() ) : ?> <?php do_action( 'bp_before_blog_details_fields' ); ?> <?php /***** Blog Creation Details ******/ ?> <div class="register-section" id="blog-details-section"> <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4> <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ); ?></p> <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>> <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_blog_url_errors' ); ?> <?php if ( is_subdomain_install() ) : ?> http:// <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> .<?php bp_blogs_subdomain_base(); ?> <?php else : ?> <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" /> <?php endif; ?> <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label> <?php do_action( 'bp_signup_blog_title_errors' ); ?> <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" /> <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?>:</span> <?php do_action( 'bp_signup_blog_privacy_errors' ); ?> <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes', 'buddypress' ); ?></label> <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_private" value="private"<?php if ( 'private' == bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'No', 'buddypress' ); ?></label> <?php do_action( 'bp_blog_details_fields' ); ?> </div> </div><!-- #blog-details-section --> <?php do_action( 'bp_after_blog_details_fields' ); ?> <?php endif; ?> <?php do_action( 'bp_before_registration_submit_buttons' ); ?> <div class="submit"> <input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" /> </div> <?php do_action( 'bp_after_registration_submit_buttons' ); ?> <?php wp_nonce_field( 'bp_new_signup' ); ?> <?php endif; // request-details signup step ?> <?php if ( 'completed-confirmation' == bp_get_current_signup_step() ) : ?> <h2><?php _e( 'Check Your Email To Activate Your Account!', 'buddypress' ); ?></h2> <?php do_action( 'template_notices' ); ?> <?php do_action( 'bp_before_registration_confirmed' ); ?> <?php if ( bp_registration_needs_activation() ) : ?> <p><?php _e( 'You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.', 'buddypress' ); ?></p> <?php else : ?> <p><?php _e( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ); ?></p> <?php endif; ?> <?php do_action( 'bp_after_registration_confirmed' ); ?> <?php endif; // completed-confirmation signup step ?> <?php do_action( 'bp_custom_signup_steps' ); ?> </form> </div> <?php do_action( 'bp_after_register_page' ); ?> </div><!-- .padder --> </div><!-- #content --> <?php get_sidebar( 'buddypress' ); ?> <script type="text/javascript"> jQuery(document).ready( function() { if ( jQuery('div#blog-details').length && !jQuery('div#blog-details').hasClass('show') ) jQuery('div#blog-details').toggle(); jQuery( 'input#signup_with_blog' ).click( function() { jQuery('div#blog-details').fadeOut().toggle(); }); }); </script> <?php get_footer( 'buddypress' ); ?>March 12, 2019 at 3:22 pm #303494In reply to: Transfering a BuddyPress site to a Multi-site
pandraka
ParticipantGood Morning,
Thank you for your reply, but hiring someone else isn’t a possibility. I’ve been digging in the BuddyPress codex and around the internet. There was a suggestion to turn off the fancy permalinks and using the plain links before exporting the databases when using BuddyPress. That worked for the most part. I think I’m 93% of the way to a solution. The only thing that didn’t work was the user’s profiles. All the users are present and displayed, but the user’s @user_nicename, title, and image are incorrect, the rest of the profile and user’s fields are correct. I also noticed instead of 30 users I now have 31. It looks like the super admin user’s information wasn’t incorporated into the new profile, but a second profile was established. I also imported the data into the topmost site instead of a subdirectory. I’m currently working to address these issues any insight would be appreciated.
Sincerely
Patricia
March 9, 2019 at 7:30 pm #303428In reply to: Members Loop with ACF Parameter
zaino
ParticipantI have tried this from the codex and it works great for xprofile fields, however I do not know how to modify it for ACF fields. There is a whole block of code in there specific to xprofile fields and I have tried various modifications, none working. Would love to get some concrete guidance. Thanks.
function my_custom_ids( $field_name, $field_value = '' ) { if ( empty( $field_name ) ) return ''; global $wpdb; $field_id = xprofile_get_field_id_from_name( $field_name ); if ( !empty( $field_id ) ) $query = "SELECT user_id FROM " . $wpdb->prefix . "bp_xprofile_data WHERE field_id = " . $field_id; else return ''; if ( $field_value != '' ) $query .= " AND value LIKE '%" . $field_value . "%'"; /* LIKE is slow. If you're sure the value has not been serialized, you can do this: $query .= " AND value = '" . $field_value . "'"; */ $custom_ids = $wpdb->get_col( $query ); if ( !empty( $custom_ids ) ) { // convert the array to a csv string $custom_ids_str = 'include=' . implode(",", $custom_ids); return $custom_ids_str; } else return ''; }March 7, 2019 at 12:55 pm #303360In reply to: On profile Update get posted fields
shanebp
ModeratorPlease use the
codebutton when posting code.…it’s not printing anything
That hook is found in a function that has a redirect after the hook, so you cannot dump to the screen.
Trying writing to a debug log or actually changing something with your function.But more importantly – the settings code is not the same as the profile fields code.
I apologize for not noticing that you said general settings and not profile fields in your OP.Try using this hook for Settings > General:
bp_core_general_settings_after_save
Found inbp-settings/actions/general.php
Note that it does not pass any data – so you’ll need to get the data from$_POST.
And the hook is followed by a redirect, so you cannot print to screen.March 6, 2019 at 1:14 pm #303329Topic: On profile Update get posted fields
in forum How-to & Troubleshootingrakhisystematix
ParticipantHello Team,
I need help with profile update code. When the user is updating general settings (password) before submitting to the database I want all posted fields and password as plain text with the username so that I can hit third-party API and send username and password as a parameter.
February 26, 2019 at 9:59 am #303117MorgunovVit
ParticipantHi!
There’s an error on BuddyPress profile page:
content.js:3 E_NOTICE Undefined index: Полное имя – /wp-content/plugins/buddypress/bp-core/classes/class-bp-core-user.php:159
#44 /wp-content/plugins/buddypress/bp-core/classes/class-bp-core-user.php:139 – BP_Core_User->populate()As I can gues – it related to xprofile fields. It seems that I removed the field ‘Полное имя’ that was created before on the Users Profile Fields page.
And now php string:
$this->fullname = esc_attr( $this->profile_data[$full_name_field_name][‘field_data’] );
in plugins/buddypress/bp-core/classes/class-bp-core-user.php
causes an error.Could you help me?
WordPress version 5.1
BuddyPress Version: 4.2.0
Site URL: https://test.mc21academy.ru/February 12, 2019 at 2:36 pm #302801In reply to: Member search in mutiple profile fields
der_velli
ParticipantHello Shane
“BP Profile Search will search as many profile fields as you want for each search input.”
Yes, but i want only ONE searchfield to search in name, surname, city and jobs, not for each profile field a searchfield

best regards
velliFebruary 12, 2019 at 2:28 pm #302800In reply to: Member search in mutiple profile fields
shanebp
ModeratorBP Profile Search will search as many profile fields as you want for each search input.
Just follow the directions for that plugin.
If you have additional questions, please ask them on the support forum for BP Profile Search.February 9, 2019 at 1:55 pm #302738In reply to: Profilesettings only showing 1 line
easybwpacc
ParticipantSolved go to users > profile fields > add fields as needed
February 2, 2019 at 8:17 am #302546In reply to: Update Display Name Using XProfile Data
josh.grisdale
ParticipantHi,
I’m not really a programmer and just hacked together some stuff I found…
but,
First of all I assume that xprofile_get_field_data only gets feilds in the Extended Profile tab of the user, so you would either need to add those fields to the Extended Profile, or you would need another wordpress function to get it from the regular profile likely
$current_user->user_firstname (https://codex.wordpress.org/Function_Reference/wp_get_current_user)
$newname = $current_user->user_firstname . $current_user->user_lastname;I would guess…
January 30, 2019 at 3:29 pm #302488In reply to: Update Display Name Using XProfile Data
MorgunovVit
ParticipantHi, Josh!
I am trying to solve a similar problem, but only I need to make the display_name = First_Name + Last_Name fields of the BuddyPress xprofile.I have been tormenting for a long time and can’t find a suitable hook that firing when the xprofile fields First_Name and Last_Name have already been written in the database.
January 29, 2019 at 7:40 pm #302466Topic: Get ID of user of current profile page
in forum How-to & TroubleshootingNumber_6
ParticipantHello,
I’m looking to create widgets specifically for profile pages. For that I need a way to get the ID/display name of the current profile being viewed.
In plain English: User 1 views their own profile and sees data in widgets relative to their own profile.
User 2 views User 1’s profile and sees data in widgets relative to User 1’s profile.
Example: Custom post types they’ve authored or data from their custom profile fields.For that I need to fetch the ID/Display Name of the currently viewed profile page.
Thanks
January 29, 2019 at 1:45 pm #302465In reply to: Regarding Searching Member Directory
shanebp
ModeratorThe easiest approach, imo, would be to remove the current member search input from the members directory.
For example, create an overload of this file and delete the code re member search:
buddypress\bp-templates\bp-legacy\buddypress\members\index.phpThen get this plugin: BP Profile Search
And configure a custom member search that only includes the fields you want.January 28, 2019 at 1:16 pm #302438In reply to: visibility options bug?
msteimann
ParticipantThanks for your quick reply, Venutius!
I have tried the WP 2015 Theme and got the same results. So I switched back to KLEO and noticed, that the xProfile fields do change to the desired visibility settings, AFTER the user clicks the SAVE SETTINGS button. So I guess I was confused by the fact that BEFORE you hit the save button there is a misleading visual feedback (the visibility term does not alter to the according setting the user has just changed it to, it still displays the same value as before).
Could this be changed in the next release?
My first problem still remains: the „change display name visibility option“ is displayed beneath the name field on the user Registration page. This doesn’t make sense, if the name’s visibility throughout BuddyPress network is mandatory. How can I get rid of this line? Does this line and it’s user changeable visibility options really not appear on a default install?
In the WP Dashboard I cannot change the options for the primary Name field. Only the fields under the details tab can be altered by admin and set to be visibility-changeable by the user. (Hope you understand what I try to say 😉
Regards,
Martin
-
AuthorSearch Results