Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1 through 25 (of 3,877 total)
  • Author
    Search Results
  • Avatar of DarkPsy
    DarkPsy
    Participant

    It’s one of those I just have to grind it out I guess. I’m not worried at all about the PHP Notices, that’s fine. The absolutely amazing behavior where the current_avatar function stops working even on a clean install is spooky. I’ll post something if I do make a break through , which seems unlikely right now.

    Workaround: bbp_current_user_avatar fetches the gravtar link associated with an email.
    At signup I have another custom field which forces the user to upload an avatar and then I replace all avatar references to the user defined profile image.

    You could do this with custom fields or a plugin like ‘Buddypress upload avatar ajax’ and then just retrieve the value from the $user.

    Anyway you won’t have a website which relies solely on gravatars to begin with.

    Until then I’ll stick to this, thanks again Dan for your patience. Cheers!

    #188803
    Avatar of danbp
    danbp
    Moderator

    @evilben,

    go to dashboard > users > profile fields.
    Required field on registration form should be added to the NAME field group.
    There is a date field type for birthdates. Set it to required, viewable by everyone

    For the TOS read here

    Another solution here (not tested)

    Avatar of robparker
    robparker
    Participant

    I have a site where some posts are labelled by applying a user as a custom field. In WordPress, I can create a page which displays all posts linked to the currently logged in user, by testing for posts that equal their username.

    My answered query was at http://wordpress.org/support/topic/query-if-custom-field-value-equals-a-current-user-value?replies=3 and I’ve also found a method at http://www.advancedcustomfields.com/resources/how-to-query-posts-filtered-by-custom-field-values/ (Example 2)

    Now I’m looking to display within the user’s Buddypress Profile. I thought the same approach may work, asking for $bp->displayed_user->user_login rather than current user but it doesn’t seem to work – just says no posts found.

    If anyone can shed some light on this, I’d be very very grateful

    Thank you

    #188776
    Avatar of EvilBen
    EvilBen
    Participant

    Hey guys,

    im looking for an Addon or stuff like that which allows me to add required fields during the registration process but which weren’t shown in Profile. For example:
    “Accept Terms of Use”
    “Date of Birth” (this one should be shown on Profile byte should not be change)

    Can Anyone help me pls!?

    Thx

    Avatar of ahd904
    ahd904
    Participant

    Hello,

    I was wondering if there is anybody who could integrate the Group locator add-on (Geo my WP plugin) which adds location address to groups created within the community as an extra field.

    For members search, i use BP profile search to search additional custom fields and it is already integrated with the BP members search in the members directory page.

    Basically, i want the same thing to happen for the BP group search.

    Can anyone give a hand for this?

    I really want the Group search to work as so the users can find the groups they want based on the location address of the group and a tag of their interest.

    Thank you a million in advance.

    #188607
    Avatar of rthomasTechnology
    rthomasTechnology
    Participant

    That’s not it. I’m in members-loop.php. That (as I understand it) is the file that controls what people see when they go to the default members directory in BuddyPress (the page that shows you everyones icon, their name and when they were last active). I want to add the users email addresses to this screen. At one point I found a line of code and pasted it between:

    <div class=”item”>
    <div class=”item-title”>
    “><?php bp_member_name(); ?>

    <?php if ( bp_get_member_latest_update() ) : ?>

    <span class=”update”> <?php bp_displayed_user_email(); ?></span>

    <?php endif; ?>

    </div>

    and

    <?php do_action( ‘bp_directory_members_item’ ); ?>

    <?php
    /***
    * If you want to show specific profile fields here you can,
    * but it’ll add an extra query for each member in the loop
    * (only one regardless of the number of fields you show):
    *
    * bp_member_profile_data( ‘field=email email’ );
    */

    ?>
    </div>

    which made the email addresses show directly under the names of the site members. I can’t find that code again.

    Thanks
    Randy

    Avatar of Jean-Pierre Michaud
    Jean-Pierre Michaud
    Participant

    multiple instances fields in profile
    example: we now have URL field in 2.1.. but for who has multiple websites to fill, we need that field to be duplicated into the same entry… something like *(add a url) button

    we want this for parents as well, to be able to list our children, with or without listing them as members of the site… kinda like in facebook, but less stupid.

    second level depth fields
    Simple… we add someone’s name in a field, and we want to add a date to it, we can’t… same if we enter our school name, we can’t attach our graduation date to it.
    :)

    #188504

    In reply to: Nobody visibility

    Avatar of danbp
    danbp
    Moderator

    Another snippet, more accurate with the suggested way above. Snippet goes into bp-custom or functions.php

    The field/field group is only shown to site admins. A small bug in the current BP version(.0 -> 2.0.2) prevent of completely remove the group tab from the edit screen. Bug is fixed and this will work with BP 2.1.

    function bpfr_hide_profile_field_group( $retval ) {
    	if ( bp_is_active( 'xprofile' ) ) :	
    	
    	// hide profile group/field to all except admin	
    	if ( !is_super_admin() ) {		
    		//exlude fields, separated by comma
    		$retval['exclude_fields'] = '60';  
    		//exlude groups, separated by comma - this may work with BP 2.1
    		$retval['exclude_groups'] = '7'; 			
    	} 
    	return $retval;		
    	
    	endif;
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_field_group' );
    #188500

    In reply to: Nobody visibility

    Avatar of danbp
    danbp
    Moderator

    @csimpson,

    oh crossposting ! haven’t seen henry’s answer.

    nobody visibility doesn’t exist. This setting is called “only me“. This means that only the member can see this field – and the site admins. Such fields are not for site admins, but for the members !

    I don’t really understand what is not working for you, as what you’re looking for doesn’t exist in BuddyPress. Sorry if i’m misunderstanding you.

    When you create such a field visibility, you should also set “Enforce the default visibility for all members“, so the member cannot modify it later on his profile settings.

    Little weird side effect, when a “only me” field is used and member A wrote hello, this word becames clickabke, by default. When member B write also hello, it becames also clickable. And if A or B clcik on Hello, it shows a list of all members who wrote the same word. In this case A and B !

    Not really confidential, isn’t it ? The solution is to remove the clickable link.
    Here’s a snippet which let you do that selectively.

    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,9,54); // field ID separated by comma
    	
        // 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');
    #188499

    In reply to: Nobody visibility

    Avatar of henrywright
    henrywright
    Moderator

    I think the field visibility settings are applicable to the member who is performing the setting.

    The suggested way to do what you want would be to make your notes profile field hidden to all non-admin members.

    The first step would be to create /wp-content/themes/your-theme/buddypress/members/single/profile/edit.php inside your theme.

    You can copy the contents of edit.php from:

    bp-templates/bp-legacy/buddypress/members/single/profile/edit.php

    Then you need to modify edit.php. In edit.php, find <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?> and add the following immediately after it:

    if ( ! current_user_can( 'manage_options' ) && ( bp_get_the_profile_field_name() === 'notes' ) )
        continue;

    Note: I’m assuming your field name is notes

    #188491
    Avatar of csimpson
    csimpson
    Participant

    Hi all, can someone clear this up for me please?

    The Nobody field visibility in buddypress – I understand its a field which is against a users profile of which only the admins can see. This is exactly what i am after. I need a place for an admin to make notes against a user, of which the user cannot see.

    I’ve seen so much talk about this field, although fairly old now, but seems like it has been finally developed in bp 2.0+.

    However, it doesnt work for me. I have a field called ‘notes’.

    Should this feature now work and for some reason my installation isn’t/conflicting etc. I am also using xprofile fields.

    best wishes Craig

    Avatar of Doremdou
    Doremdou
    Participant

    Hi everyone :)

    I would like to be able to set a default privacy option on profile fields to “site members”, AND give my users the ability to change this privacy option to “Friends” only.

    For the moment I can only set the privacy option to “site members” and then lock the ability to change it because otherwise some users would change it to “public” and I don’t want it.

    I only want the “site members” or “friends only” options, but not “public”. How can I do that?
    Thank you very much!

    and sorry for my english, trying to do my best ^^
    keep up the good work!

    Avatar of Jencina
    Jencina
    Participant

    Sorry, not all is well.

    I edit in my custom “register.php” , but I can’t see anything. This is the code of my register custom page:

    <?php 
    global $bp;
    if(empty($bp->signup->step))
    $bp->signup->step=’request-details’;
    ?>
    
    		<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() ) : ?>
    
    			<?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( 'PRUEBA', '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
    							$field_type = bp_xprofile_create_field_type( bp_get_the_profile_field_type() );
    							$field_type->edit_field_html();
    
    							do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
    
    							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() ) : ?>
    
    			<?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><!-- #buddypress -->
    
    #188351
    Avatar of danbp
    danbp
    Moderator

    Hi @hardeepasrani,

    xProfile field manipulation is a such common question on this forum. :roll: Did you searched before asking ?

    But codex first !

    http://codex.buddypress.org/plugindev/creating-a-plugin/

    other reference

    Here a topic where you can find how this works and can be done.

    http://buddypress.org/support/topic/how-to-add-fields-from-xprofile-fields-groups-created-by-me/

    #188338
    Avatar of r-a-y
    r-a-y
    Moderator

    You shouldn’t be loading your field_xprofile_twitter() function on ‘bp_init’. Doing this creates your field on every page load.

    Why don’t you just create your field once in the WP admin dashboard under “Users > Profile Fields”?

    Avatar of Hardeep Asrani
    Hardeep Asrani
    Participant

    I’m using following snippet to create xProfile fields in a custom plugin:

    `
    add_action(‘bp_init’, ‘field_xprofile_twitter’);

    function field_xprofile_twitter()
    {
    global $wpdb;
    xprofile_insert_field(
    array (
    field_group_id => 1,
    name => ‘WWWYKI’,
    can_delete => false, // Doesn’t work *
    field_order => 1,
    is_required => false,
    description => ‘Woo Woo Woo You Know it, bro!’,
    type => ‘textbox’
    )
    );
    }
    `

    But it’s creating a new field every time the script runs. Is there a way to prevent that from happening?

    #188334
    Avatar of ichigo_roukia
    ichigo_roukia
    Participant

    Hi All,
    I wonder if there is a way to make customized user filed in buddypress users’ profiles depending on a specific type of the user or its role. All I can find now is a one-type registraton fields for all users. However, for my website (which integrates buddypress) i have different profiles, so i need to find a way to show customized registration fields depeding on the profile user ?! thank you.

    Avatar of ww2boy
    ww2boy
    Participant

    Hi,

    Again thanks for your quick reply.
    Yes, I used the snippet ‘as is’, and then tried to use the field name instead of the ID.
    Field name obviously didn’t work, although you could use it too, according to this page:

    http://codex.buddypress.org/getting-started/guides/displaying-extended-profile-fields-on-member-profiles/

    But I found the profile field ID, and now it works!

    Thank you so much :D.

    (Yes, KLEO has premium support. But they are very, very slow. I opened a few tickets 1-2 weeks ago, still no replies. Found the answer in the meantime though :P ).

    Avatar of danbp
    danbp
    Moderator

    I use the KLEO theme (BuddyPress is integrated), could it be because of that?
    Normally, no.

    But as you use a premium theme, don’t except much help here. You also payed for support. If the snippet doesn’t work for you ( i tested it successfully with Twentythirteen before publishing), you have to get in contact with the theme author or read his doc about customization (if exist).

    To get the field ID, see it from where the field is created, in xprofile admin. If you hover the delete button, you can see it at the bottom left corner of your browser.

    You can also go into the DB and check for it in the bp_xprofile_fields table.

    NOTE:
    When you get a snippet, the first thing to do is to use it “as is” to test it – this means also “understanding how it works”, not to apply what you think is better. :roll:

    And only when the test is ok, you can modify it or try to do so. ;-)

    Avatar of ww2boy
    ww2boy
    Participant

    Hey,

    Thank you for your quick reply! :)

    I added the code to my theme’s functions.php, and replaced ’54′ with the name of the field (I can’t find the ID number anywhere), but that specific field still shows up in profiles/edit fields.

    I use the KLEO theme (BuddyPress is integrated), could it be because of that?
    Or is there a different way to find the field’s ID number? :)

    I really appreciate your help, I didn’t expect such a fast and detailed reply! :D

    Avatar of danbp
    danbp
    Moderator

    Hi @ww2boy,

    Yes ! ;-) Give this a try. Add it to child theme’s functions.php or bp-custom.php

    function bpfr_hide_profile_edit( $retval ) {	
    	// remove field from edit tab
    	if(  bp_is_profile_edit() ) {		
    		$retval['exclude_fields'] = '54'; // ID's separated by comma
    	}	
    	// allow field on registration page     
    	if ( bp_is_register_page() ) {
    		$retval['include_fields'] = '54'; // ID's separated by comma
    		}		
    	
    	// hide the filed on profile view tab
    	if ( $data = bp_get_profile_field_data( 'field=54' ) ) : 
    		$retval['exclude_fields'] = '54'; // ID's separated by comma	
    	endif;	
    	
    	return $retval;	
    }
    add_filter( 'bp_after_has_profile_parse_args', 'bpfr_hide_profile_edit' );

    Codex reference:

    http://codex.buddypress.org/plugindev/using-bp_parse_args-to-filter-buddypress-template-loops/

    Avatar of ww2boy
    ww2boy
    Participant

    Hello,

    I’ve added an extra required field to the registration form.
    But I need to customize it a little bit further:

    - Users should not be able to change the value of this profile field after registration
    (disable editing of this field)

    +

    - This field should be hidden from users after registration.

    So the only time users can submit a ‘value’ to this specific field, and view this field, is when they sign up. After successful registration, they can not view what they submitted anymore, and they can’t change it either.

    Is this possible?

    Avatar of noise
    noise
    Participant

    Hi

    Got an interesting challenge here. I’m creating a site for a race-club. What we’d like to have is a listing of the members standings in the various races over the year (12 each year).

    Ideally, the admin would enter in the results for each user for each race.

    Each member would see just his results on his profile page, but the total membership could see everyones stats in a grid on the front page (which would be sorted).

    I was thinking about futzing about with the Advanced Custom Fields plugin, but thought someone might have cracked this egg already.

    Thanks!

    #188267
    Avatar of mmadden
    mmadden
    Participant

    Yes, I’ve already edited the input fields within the basic-details-section div. I want to edit the input field in the profile-details-section div to match, but there is no input field in the register.php for that section. Instead there’s this:

    <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(); ?>

    Is there any way to get at the input tag that gets output to the profile-details-section?

    #188236
    Avatar of danbp
    danbp
    Moderator
Viewing 25 results - 1 through 25 (of 3,877 total)