Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 376 through 400 (of 3,608 total)
  • Author
    Search Results
  • #304444
    Venutius
    Moderator

    If 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?

    #304443
    joshreid
    Participant

    Oh 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.

    #304244
    Venutius
    Moderator

    By 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;
    }
    #304016

    In reply to: user profile fields

    Venutius
    Moderator

    If 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.

    #303976

    In reply to: user profile fields

    Venutius
    Moderator

    It’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?

    #303735
    mspiggie
    Participant

    How 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

    #303685
    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 override

    For 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 …

    #303675
    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; ?>`

    #303674
    chris19731973
    Participant

    Now, 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 189

    I 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 : /**

    #303673
    zoleest
    Participant

    Still 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.

    #303669
    Venutius
    Moderator

    Then you can overload the edit.php and ‘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.php

    in 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’

    #303549
    airsid
    Participant

    Hello,
    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' ); ?>
    #303494
    pandraka
    Participant

    Good 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

    #303428
    zaino
    Participant

    I 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 '';
       
    }
    #303360
    shanebp
    Moderator

    Please use the code button 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 in bp-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.

    #303329
    rakhisystematix
    Participant

    Hello 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.

    #303193
    john vivian
    Participant

    Hi.

    i have a user with some profile fields set to be viewable by “Only Me”.

    However, other users (including anonymous) can search for the field contents and the user will show in the results.

    Is this a known bug?

    Is there a setting or code i can use to fix this behaviour?

    Thanks,

    john

    #303187
    cammac1
    Participant

    Hi,
    I’m using BuddyPress and the result that I’d like to reach is modifying a field in the user profile page (http://yourSite/members/userName). So far I’ve found bp_after_profile_content and bp_before_profile_content but what I want is affecting one field inside the profile_fields_content. I’m not using any custom field and I can’t find a solution. Does any of you have any idea? I’m in function.php of a child theme and my function so far is this one:

    function get_member_field_test($data){
    $data = bp_get_member_profile_data( ‘field=lname’ );
    if ( strlen($data) > 3){
    $data = substr($data,0, 3).’…’;
    return $data;
    }
    }add_action(‘bp_before_profile_content’,’get_member_field_test’);

    thanks in advance

    MorgunovVit
    Participant

    Hi!
    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/

    leile
    Participant

    Hi!

    I am using BuddyPress with “SuitePlugins – Advanced XProfile Fields for BuddyPress”, and I created some custom fields. On the registration page I want to check if ex. “idofcertificate” custom field data exist in the database. If exist then throw an error, to only one account to be created with this “idofcertificate”. There is any resolution to do this?

    Thank you very much!

    #302961
    elrico13
    Participant

    A general question, not related to a live site at this point, just something I’m playing with.

    With a fresh WordPress + BuddyPress install, under Users > Profile Fields, I’ve created a new field called Last Name.

    New registrations are capturing the data correctly and it is stored in wp_bp_xprofile_data.

    Is there any easy way of also getting that value into wp_usermeta.last_name as well?

    Thanks in advance.

    sitesfromash
    Participant

    Hi. I hope someone can please help me. I have set up a group of two questions which I am requiring users to enter when registering for my site. I would like to be able to see the values entered by each user on the backend admin Users panel in the form of columns. However, I am unsure of how to accomplish this. I appreciate any assistance which anyone can provide me in regards to this matter.

    #302801
    der_velli
    Participant

    Hello 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
    velli

    #302800
    shanebp
    Moderator

    BP 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.

    #302795
    der_velli
    Participant

    Hi. I’m looking for one search field (widget) which searchs in couple of profile fields. like name, surname, city, job (and other custom made profile fields) but i don’t want to search all fields (some fields have to be hidden for other users).
    BP Member Search would be fine, but i can only search one profile field for each search input.

    Best Regards

Viewing 25 results - 376 through 400 (of 3,608 total)
Skip to toolbar