Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1 through 25 (of 3,799 total)
  • Author
    Search Results
  • #185556
    Avatar of victord34
    victord34
    Participant

    hello,

    i need to display one line(field-3) of profils in LIST of profil. Its very important for me.

    @bphelp give me this code but i have just “Field-name :” and nothing else..doesn’t work :

    add_action(‘bp_directory_members_item’, ‘bphelp_dpioml’);
    function bphelp_dpioml(){
    $bphelp_my_profile_field_3=’Field-Name’;
    if( is_user_logged_in() && bp_is_members_component() ) { ?>
    <div class=”bph_xprofile_fields” style=” margin-left: 25%;”>

    <?php echo $bphelp_my_profile_field_3 ?>: <?php echo bp_member_profile_data( ‘field=’.$bphelp_my_profile_field_3 ); ?><br />

    </div><?php
    }
    }

    #185437
    Avatar of rcjr24
    rcjr24
    Participant

    @mercime I manage to rearrange all the fields using the code I posted, and now I have a code like this,

    <?php if ( function_exists( 'bp_has_profile' ) ) : if ( bp_has_profile( 'profile_group_id=1&hide_empty_fields=0' ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    <?php if ( 'Country of Residence' == bp_get_the_profile_field_name() ) : ?>
    
    	<select class="country-residence" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>" placeholder="<?php _e( bp_the_profile_field_name().':' ); ?>">
    		<?php //bp_the_profile_field_options(); 
    			
    			global $wpdb;
    			$sql = "SELECT * FROM wp_country_list";
    			$results = $wpdb->get_results($sql) or die(mysql_error());
    			echo '<option data-value="holder-only" class="holder">Country of Residence:</option>';
    				foreach( $results as $result ) {
    
    					echo '<option data-value="'. $result->three_letter_code .'" value="'. $result->three_letter_code .'">'.$result->name.'</option>';
    				}
    		?>
    	</select>
    	<?php do_action( bp_get_the_profile_field_errors_action() ); ?>
    
    <?php endif; ?>
    <?php endwhile;  ?>
    
    <?php endwhile; endif; endif; ?>

    Now the problem is, when the registration completes, this field doesn’t reflect to the user profile after successful registration. Hope you’ve got my point here.

    #185405
    Avatar of noyzen
    noyzen
    Participant

    Hi
    i have a BP powered site and i have profile fields with million checkboxes and options…
    i need that fields in another group too and have to write them all again one by one…

    how can i get a copy button there? to copy a field?
    ty

    #185402
    Avatar of noyzen
    noyzen
    Participant

    i have same need.
    is there any plugin to make more advanced profile fields??

    another thing i need is when people select for example country from a combobox next combobox load cities of that country so he can select city of country.

    any plugins?

    Avatar of Big Dreams Theory
    Big Dreams Theory
    Participant

    Hi,

    Is there a way (plugin or code) in order that users who have edited a specifc xprofile field (text box or multine area) have their edit send to the admin and moderators (or a specific group i could add) for validation, with, of course a visual info in dashboard that a field is upon validation you know, before it goes live again?
    You know, the same way an editor can have his text sent for validation if he updates it but for users budypress xprofile fields.

    Thx

    #185326
    Avatar of Big Dreams Theory
    Big Dreams Theory
    Participant

    Hi

    Is there a way (plugin or code) to limit the length of xprofile fields to a specific amount of characters?
    Or better, what’s above + like a left characters countdown.

    Thanks

    #185263
    Avatar of @mercime
    @mercime
    Keymaster

    How to customize the order of fields of registration

    @rcjr24 you can change the order within Users > Profile Fields panel

    http://codex.buddypress.org/buddypress-components-and-features/extended-profiles/

    Avatar of AIRFieldNotes
    AIRFieldNotes
    Participant

    Thanks for the response. I think I was a bit confused, I am actually using Magazine Basic, not Buddypress Default, but thanks for the head’s up.

    I created the extended profiles via Users>Profile Fields

    #185207
    Avatar of Panicky
    Panicky
    Participant

    And I resolved it simply.

    Just add

    #buddypress table.profile-fields p {
    	margin-top: 10px !important;
    	margin-bottom: 10px !important;
    }

    or the kind of margin you want, to a custom css, and voíla!

    Avatar of rcjr24
    rcjr24
    Participant

    Im using 2014 wordpress template and has 2.0.1 version of buddypress installed. I’d like to know if how could I properly reorder the fields on registration. My template path is [my theme]/buddpress/members/index-registration.php… Could it be possible to create my own template just by using or calling a function like this <?php if ( 'Registration Type' == bp_get_the_profile_field_name() ) : ?> inside a loop? Hope someone could give me an idea. Thanks

    #185146
    Avatar of titoesco
    titoesco
    Participant

    @modemlooper
    I’ve added some custom fields to my buddy press profile but they don’t seem to be responsive like the “Activity, Profile, Friends, etc”. I’ve checked the style.css and member-header.php files. Should I be checking different files to fix this issue? The desktop view is great but smart phone view is not so great. Thanks for the help!

    #185093
    Avatar of @mercime
    @mercime
    Keymaster

    username appearing twice on registration form

    @jaciando1 Change the “User Name” profile field name in the “Profile Details” box -> go to admin menu
    Users > Profile Fields and click on the “edit” button under that profile field name.

    I also appear to have two different register forms???

    You can add the following to your theme’s functions.php page:

    /* If BuddyPress is active */
    if ( class_exists('BuddyPress') ) {
    	add_action('init','mme_redirect_register');
    	function mme_redirect_register(){
    		global $pagenow;
    		if( 'wp-login.php?action=register' == $pagenow ) {
    			wp_redirect('http://buddypress.dev/join-us');
    			exit();
    		}
    	}
    }

    Change http://buddypress.dev/join-us to your site’s register page.

    Avatar of giuseppe23
    giuseppe23
    Participant

    Hi I use buddypress 2.0.1 on localhost and i am making a new theme everything is going well but I need only a small css help you can see the images below to undestand me better.
    profile search filed on the sidebar.
    null

    Profile edit section

    New blog post on profile

    So all my forms are like this included the register page everything can you help me how to fix this problem?thankyou

    #184991
    Avatar of buddy13.ph
    buddy13.ph
    Participant

    Hi, i’m new using wordpress+buddypress. Here is my problem encountered, when i create a selectbox in admin users->profile fields there is no option for selectbox label. How can i differentiate the selectbox value from label?

    I’m using WordPress v3.9 and buddypress v2.0

    Thanks

    Avatar of medkadri
    medkadri
    Participant

    Hello,

    I’m new to BuddyPress and the Xprofile extension,

    I’ve just created a simple site like linkedin. I can create a field section which contains some fields. Exple:

    * Basic Info:
    – Name: my name
    – Date of Birth: my date of birth

    Now I want to do this:

    * Languages:
    – 1:
    – Languge: English
    – Level: Excellent
    – 2:
    – Languge: French
    – Level: Intermediate

    How to do it just like LinkedIn does?

    Thanks.

    Avatar of chiraggmodi
    chiraggmodi
    Participant

    hi
    i have make a community website.
    i want to display all fields which were added in the Profile Group Fields to member page.

    Currently i am using this code for member fields, but this code will get data randomly.
    Like… i have created group fields of Chief(main filed), SON, DAUGHTER, MOTHER< FATHER, SISTER, BROTHER.

    so when i display middle name filed then it take from other group fields not from chief group.
    This is the code which i used in custom.php


    // Here is one way you could add xprofile fields name as well as the value to the members directory!
    // Just remember to replace "Field-Name" with the names of your fields in the 5 variables in my code.
    // Also remember the field name is case sensitive. If you notice the pattern of 5 in my code you can
    // easily see how to add more fields if you need them. You can also use the div class bph_xprofile_fields
    // to adjust the CSS in your stylesheet. Place this code in bp-custom.php:
    add_action('bp_directory_members_item', 'bphelp_dpioml');
    function bphelp_dpioml(){
    $bphelp_my_profile_field_1='Field-Name';
    $bphelp_my_profile_field_2='Field-Name';
    $bphelp_my_profile_field_3='Field-Name';
    $bphelp_my_profile_field_4='Field-Name';
    $bphelp_my_profile_field_5='Field-Name';
    if( is_user_logged_in() && bp_is_members_component() ) { ?>
    <div class="bph_xprofile_fields" style=" margin-left: 25%;">
    <?php echo $bphelp_my_profile_field_1 ?>: <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_1 ); ?><br />
    <?php echo $bphelp_my_profile_field_2 ?>: <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_2 ); ?><br />
    <?php echo $bphelp_my_profile_field_3 ?>: <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_3 ); ?><br />
    <?php echo $bphelp_my_profile_field_4 ?>: <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_4 ); ?><br />
    <?php echo $bphelp_my_profile_field_5 ?>: <?php echo bp_member_profile_data( 'field='.$bphelp_my_profile_field_5 ); ?><br />
    </div><?php
    }
    }

    #184911
    Avatar of JoshtheDesigner
    JoshtheDesigner
    Participant

    I tried the exact code that you put in your first response. I put it in my Functions file then updated one of the xProfile fields and it was not in the activity feed.

    Avatar of JoshtheDesigner
    JoshtheDesigner
    Participant

    I would like to see if there is a way to add a checkbox or 2 to the text option in the xProfile fields? It is for a gym with certain workouts and sometimes they do not do the prescribed (RX) workout so I would like to add a checkbox next to their time if they did in fact do the prescribed workout. Any help?

    Avatar of JoshtheDesigner
    JoshtheDesigner
    Participant

    I have created some custom xProfile fields where people input their workout times. I would like them to be able to hover over the workout and it has the title tag show that is pulled from the Field Description. You can see what I am trying to accomplish on my profile at http://crossfitarc.com/members/joshthedesigner/. In the member header you can hover over the workouts and the title tag shows with the workout, however I custom input the title tags and if you go to the profile section in the bottom it does not do this. Can anyone help?

    #184901
    Avatar of JoshtheDesigner
    JoshtheDesigner
    Participant

    Ok yes sorry I knew that. I tried to add it to my functions.php and I updated my profile but it did not show in the activity feed. I would like it to show in the activity feed if anyone updates their profile via the xprofile fields. It looks like from your code that it would only show if I update my profile. Any thoughts?

    #184896
    Avatar of shanebpdev
    shanebp
    Participant

    Use the ‘xprofile_updated_profile’ hook

    function josh_profile_check( $user_id, $posted_field_ids, $errors ) {
      /* check $posted_field_ids to see if one of the fields you are interested in has changed
      if yes, then use bp_activity_add to add to activity stream
      */
    }
    add_action( 'xprofile_updated_profile', 'josh_profile_check', 10, 3 );

    bp_activity_add

    Avatar of mshafshak
    mshafshak
    Participant

    i’m trying to get user info from facebook when a user tries to login through facebook on my website ,Wordpress website, I have been struggling to retrieve users’ birthday, email, first name, last name and interests and so on what is the code to get them. I’m newly to facebook apps so I don’t know what to do and what is the procedure

    All what i can retrieve is the email, name and create username according to the url user name

    some clear code would be useful Thank you

    This is my code location in my directory:
    wp-content/themes/themeName/framework/functions/facebook_login.php

    
    <?php
    
    function fb_head(){
      if( is_user_logged_in()) return;
      ?>
    
      <div id="fb-root"></div>
    	<script>
    		// Additional JS functions here
    		window.fbAsyncInit = function() {
    			FB.init({
    				appId      : '<?php echo sq_option('fb_app_id'); ?>', // App ID
    				version    : 'v2.0',
    				status     : true, // check login status
    				cookie     : true, // enable cookies to allow the server to access the session
    				xfbml      : true,  // parse XFBML
    				oauth      : true
    			});
    
    			// Additional init code here
    
    		};
    
    		// Load the SDK asynchronously
    		(function(d){
    			 var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
    			 if (d.getElementById(id)) {return;}
    			 js = d.createElement('script'); js.id = id; js.async = true;
    			 js.src = "//connect.facebook.net/en_US/sdk.js";
    			 ref.parentNode.insertBefore(js, ref);
    		 }(document));
    	</script>
        <?php
    }
    add_action( 'kleo_after_body', 'fb_head' );
    
    function fb_footer(){
    ?>
    	<script type="text/javascript">
    	var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
    	jQuery('.facebook_connect').click(function(){
    			var context = jQuery(this).closest("form");
    			if (jQuery(".tos_register", context).length > 0)
    			{
    				if (! jQuery(".tos_register", context).is(":checked"))
    				{
    					alert('<?php echo apply_filters('kleo_fb_tos_alert',__("You must agree with the terms and conditions.",'kleo_framework'));?>');
    					return false;
    				}
    			}		
    			
    		FB.login(function(FB_response){
    			if( FB_response.status === 'connected' ){
    				fb_intialize(FB_response);
    			}
    		},
    		{scope: 'public_profile,email'});
    	});
    
    	function fb_intialize(FB_response){
    		FB.api( '/me', 'GET', 
    						{'fields':'id,email,verified,name'},
    						function(FB_userdata){
    							jQuery.ajax({
    									type: 'POST',
    									url: ajaxurl,
    									data: {"action": "fb_intialize", "FB_userdata": FB_userdata, "FB_response": FB_response},
    									success: function(user){
    										if( user.error ){
    											alert( user.error );
    										}
    										else if( user.loggedin ){
    											if( user.type === 'login' )
    											{
    												window.location.reload();
    											}
    											else if( user.type === 'register' )
    											{
    												window.location = user.url;
    											}
    										}
    									}
    							});
    						}
    		);
    	};
    	</script>
    <?php
    }
    add_action( 'wp_footer', 'fb_footer' );
    
    if (!function_exists('fb_button')):
    function fb_button()
    {
    ?>
        <a href="#" class="facebook_connect radius button facebook"><i class="icon-facebook-sign"></i> &nbsp;<?php _e("LOG IN WITH Facebook", 'kleo_framework');?></a>
    <?php
    }
    endif;
    
    if (!function_exists('fb_register_button')):
    function fb_register_button()
    {
    ?>
        <a href="#" class="facebook_connect radius small button facebook"><i class="icon-facebook-sign"></i> &nbsp;<?php _e("Register using Facebook", 'kleo_framework');?></a>
    <?php
    }
    endif;
    
    if (!function_exists('fb_register_button_front')):
    function fb_register_button_front()
    {
    ?>
        <a href="#" class="facebook_connect radius button facebook"><i class="icon-facebook"></i></a>
    <?php
    }
    endif;
    
    add_action('fb_popup_button', 'fb_button' );
    
    if (sq_option('facebook_register', 0) == 1) {
        add_action('fb_popup_register_button', 'fb_register_button' );
        add_action('fb_popup_register_button_front', 'fb_register_button_front' );
    }
            
    function wp_ajax_fb_intialize(){
        @error_reporting( 0 ); // Don't break the JSON result
        header( 'Content-type: application/json' );
    
        if( !isset( $_REQUEST['FB_response'] ) || !isset( $_REQUEST['FB_userdata'] ))
        die( json_encode( array( 'error' => __('Authenication required.', 'kleo_framework') )));
    
        $FB_response = $_REQUEST['FB_response'];
        $FB_userdata = $_REQUEST['FB_userdata'];
        $FB_userid = $FB_userdata['id'];
    
        if( !$FB_userid )
        die( json_encode( array( 'error' => __('Please connect your facebook account.', 'kleo_framework') )));
    
        global $wpdb;
        //check if we already have matched our facebook account
        $user_ID = $wpdb->get_var( "SELECT user_id FROM $wpdb->usermeta WHERE meta_key = '_fbid' AND meta_value = '$FB_userid'" );
        
    	
        //if facebook is not connected
        if( !$user_ID ){
    			$user_email = $FB_userdata['email'];
    			$user_ID = $wpdb->get_var( "SELECT ID FROM $wpdb->users WHERE user_email = '".$wpdb->escape($user_email)."'" );
    
    			$redirect = '';
    
    			//if we have a registered user with this Facebook email
    			if(!$user_ID )
    			{
    				if ( !get_option( 'users_can_register' )) {
    					die( json_encode( array( 'error' => __('Registration is not open at this time. Please come back later.', 'kleo_framework') )));
    				}
    				if (sq_option('facebook_register', 0) == 0) {
    					die( json_encode( array( 'error' => __('Registration using Facebook is not currently allowed. Please use our Register page', 'kleo_framework') )));
    				}
    				
    				extract( $FB_userdata );
    
    				$display_name = $name;
    
    				if( empty( $verified ) || !$verified )
    				die( json_encode( array( 'error' => __('Your facebook account is not verified. You have to verify your account before proceed login or registering on this site.', 'kleo_framework') )));
    
    				$user_email = $email;
    				if ( empty( $user_email ))
    				die( json_encode( array( 'error' => __('Please re-connect your facebook account as we couldn\'t find your email address.', 'kleo_framework') )));
    
    				if( empty( $name ))
    				die( json_encode( array( 'error' => 'empty_name', __('We didn\'t find your name. Please complete your facebook account before proceeding.', 'kleo_framework') )));
    
    				$user_login = sanitize_title_with_dashes( sanitize_user( $display_name, true ));
    
    				if ( username_exists( $user_login )) {
    					$user_login = $user_login. time();
    				}
    
    				$user_pass = wp_generate_password( 12, false );
    				$userdata = compact( 'user_login', 'user_email', 'user_pass', 'display_name' );
    				$userdata =  apply_filters('kleo_fb_register_data', $userdata);
    
    				$user_ID = wp_insert_user( $userdata );
    				if ( is_wp_error( $user_ID ))
    				die( json_encode( array( 'error' => $user_ID->get_error_message())));
    
    				//send email with password
    				wp_new_user_notification( $user_ID, wp_unslash( $user_pass ) );
    
    				//add Facebook image
    				update_user_meta($user_ID, 'kleo_fb_picture', 'https://graph.facebook.com/' . $id . '/picture');
    						
    				do_action('fb_register_action',$user_ID);
                
    				update_user_meta( $user_ID, '_fbid', (int) $id );
    				$logintype = 'register';
    				$redirect = apply_filters('kleo_fb_register_redirect',bp_core_get_user_domain( $user_ID ).'profile/edit/group/1/?fb=registered');
    			}
    			else
    			{
    				update_user_meta( $user_ID, '_fbid', (int) $FB_userdata['id'] );
    				//add Facebook image
    				update_user_meta($user_ID, 'kleo_fb_picture', 'https://graph.facebook.com/' . (int) $FB_userdata['id'] . '/picture');
    				$logintype = 'login';
    			}
    		}
        else
        {
    			$logintype = 'login';
        }
    
        wp_set_auth_cookie( $user_ID, false, false );
        die( json_encode( array( 'loggedin' => true, 'type' => $logintype, 'url' => $redirect )));
    }
    add_action( 'wp_ajax_nopriv_fb_intialize', 'wp_ajax_fb_intialize' );  
            
    //If registered via Facebook -> show message
    add_action( 'template_notices', 'kleo_fb_register_message' );
    if (!function_exists('kleo_fb_register_message')):
        function kleo_fb_register_message()
        {
            if (isset($_GET['fb']) && $_GET['fb'] == 'registered')
            {
                echo '<div class="clearfix"></div><br><div class="alert-box success" id="message" data-alert>';
                echo __('Thank you for registering. Please make sure to complete your profile fields below.', 'kleo_framework');
                echo '</div>';
            }
        }
    endif;
    
    //display Facebook avatar
    if(sq_option('facebook_avatar', 1) == 1) {
    	//show Facebook avatar in WP
    	add_filter('get_avatar', 'kleo_fb_show_avatar', 5, 5);
    	//show Facebook avatar in Buddypress
    	add_filter('bp_core_fetch_avatar', 'kleo_fb_bp_show_avatar', 3, 5);
    	//show Facebook avatar in Buddypress - url version
    	add_filter('bp_core_fetch_avatar_url','kleo_fb_bp_show_avatar_url', 3, 2);
    }
    function kleo_fb_show_avatar($avatar = '', $id_or_email, $size = 96, $default = '', $alt = false) {
      $id = 0;
      if (is_numeric($id_or_email)) {
        $id = $id_or_email;
      } else if (is_string($id_or_email)) {
        $u = get_user_by('email', $id_or_email);
        $id = $u->id;
      } else if (is_object($id_or_email)) {
        $id = $id_or_email->user_id;
      }
      if ($id == 0) return $avatar;
    	
    	//if we have an avatar uploaded and is not Gravatar return it
    	if(strpos($avatar, home_url()) !== FALSE && strpos($avatar, 'gravatar') === FALSE) return $avatar;
    	
    	//if we don't have a Facebook photo
      $pic = get_user_meta($id, 'kleo_fb_picture', true);
      if (!$pic || $pic == '') return $avatar;
    	
      $avatar = preg_replace('/src=("|\').*?("|\')/i', 'src=\'' . $pic . apply_filters('fb_show_avatar_params', '?width=580&height=580') . '\'', $avatar);
      return $avatar;
    }
    
    function kleo_fb_bp_show_avatar($avatar = '', $params, $id) {
        if(!is_numeric($id) || strpos($avatar, 'gravatar') === false) return $avatar;
    		
    		//if we have an avatar uploaded and is not Gravatar return it
    		if(strpos($avatar, home_url()) !== FALSE && strpos($avatar, 'gravatar') === FALSE) return $avatar;
    		
        $pic = get_user_meta($id, 'kleo_fb_picture', true);
        if (!$pic || $pic == '') return $avatar;
        $avatar = preg_replace('/src=("|\').*?("|\')/i', 'src=\'' . $pic. apply_filters('fb_show_avatar_params', '?width=580&height=580') . '\'', $avatar);
        return $avatar;
    }
    
    function kleo_fb_bp_show_avatar_url($gravatar, $params) {
    	
    	//if we have an avatar uploaded and is not Gravatar return it
    	if(strpos($gravatar, home_url()) !== FALSE && strpos($gravatar, 'gravatar') === FALSE) return $gravatar;
    	
      $pic = get_user_meta($params['item_id'], 'kleo_fb_picture', true);
      if (!$pic || $pic == '') return $gravatar;
    	return $pic. apply_filters('fb_show_avatar_params', '?width=580&height=580');
    }
    
    ?>
    
    #184828
    Avatar of seagate3
    seagate3
    Participant

    I’ve made the changes below to the Member Loop that I read about http://www.itegritygroup.com/buddypress-members-directory-s2members

    1) Listing users in alphabetical order in the BuddyPress members directory
    2) Showing BuddyPress custom profile fields in the BuddyPress members directory from the BuddyPress registration form.
    3) Removing the “last active” label from each user’s BuddyPress members directory listing.
    4) Showing S2 Membership level 1 and 2

    I deactivated the plug-in, found the member loop: buddypress/bp-themes/bp-default/members/members-loop.php, edited it, then updated it. Nothing happened.

    Can anyone help?

    Thank you

    Avatar of chiraggmodi
    chiraggmodi
    Participant

    Hi
    I want to display all profile fields in member list page.
    I don’t want to put code for every single filed to member loop. I want code that display all fields from profile page.

    #184784
    Avatar of Bluesharp
    Bluesharp
    Participant

    @mercime – I just fix the issue with notification tab – and that seems to has effect on this too.

    Now logged in members can see other members full profile fields. I want to make the full profile fields including base fields and xProfile group fields public to everyone even not logged in, how can I do this?

Viewing 25 results - 1 through 25 (of 3,799 total)