Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 576 through 600 (of 3,881 total)
  • Author
    Search Results
  • #273037
    groston
    Participant

    Thanks again for the help! This post, https://buddypress.org/support/topic/how-to-customize-the-order-of-fields-of-registration/, led me to the answer: the function bp_get_the_profile_field_name() returns the ‘friendly’ name of the field, i.e., that which is defined in wp-content\plugins\<my-plugin>\include\users\profile.php as the label parameter for the field.

    Jayell12
    Participant

    Hello Buddypress community,

    I am trying to remove the “last active” section of the membersloop. I have the membersloop file in my child theme within the buddypress->members folders. After deleting the correct code I saved the file and cleared all caches, but the changes are not taking effect.

    Web page: http://mobileweb.guru/webdev/crowdwel/member-directory/

    I have pasted my code below:

    <?php
    /**
    * BuddyPress – Members Loop
    *
    * Querystring is set via AJAX in _inc/ajax.php – bp_legacy_theme_object_filter()
    *
    * @package BuddyPress
    * @subpackage bp-legacy
    */

    /**
    * Fires before the display of the members loop.
    *
    * @since 1.2.0
    */
    do_action( ‘bp_before_members_loop’ ); ?>

    <?php if ( bp_get_current_member_type() ) : ?>
    <p class=”current-member-type”><?php bp_current_member_type_message() ?></p>
    <?php endif; ?>

    <?php if ( bp_has_members( bp_ajax_querystring( ‘members’ ) ) ) : ?>

    <div id=”pag-top” class=”pagination”>

    <div class=”pag-count” id=”member-dir-count-top”>

    <?php bp_members_pagination_count(); ?>

    </div>

    <div class=”pagination-links” id=”member-dir-pag-top”>

    <?php bp_members_pagination_links(); ?>

    </div>

    </div>

    <?php

    /**
    * Fires before the display of the members list.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_before_directory_members_list’ ); ?>

    <ul id=”members-list” class=”item-list” aria-live=”assertive” aria-relevant=”all”>

    <?php while ( bp_members() ) : bp_the_member(); ?>

    <li <?php bp_member_class(); ?>>
    <div class=”item-avatar”>
    “><?php bp_member_avatar(); ?>
    </div>

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

    </div>

    <?php

    /**
    * Fires inside the display of a directory member item.
    *
    * @since 1.1.0
    */
    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=the field name’ );
    */
    ?>
    </div>

    <div class=”action”>

    <?php

    /**
    * Fires inside the members action HTML markup to display actions.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_directory_members_actions’ ); ?>

    </div>

    <div class=”clear”></div>

    <?php endwhile; ?>

    <?php

    /**
    * Fires after the display of the members list.
    *
    * @since 1.1.0
    */
    do_action( ‘bp_after_directory_members_list’ ); ?>

    <?php bp_member_hidden_fields(); ?>

    <div id=”pag-bottom” class=”pagination”>

    <div class=”pag-count” id=”member-dir-count-bottom”>

    <?php bp_members_pagination_count(); ?>

    </div>

    <div class=”pagination-links” id=”member-dir-pag-bottom”>

    <?php bp_members_pagination_links(); ?>

    </div>

    </div>

    <?php else: ?>

    <div id=”message” class=”info”>
    <p><?php _e( “Sorry, no members were found.”, ‘buddypress’ ); ?></p>
    </div>

    <?php endif; ?>

    <?php

    /**
    * Fires after the display of the members loop.
    *
    * @since 1.2.0
    */
    do_action( ‘bp_after_members_loop’ );

    #272976
    Venutius
    Moderator

    Yes that sounds about right, the page is doing a loop printing out the profile fields, so you could add an if statement dependent on the field name.

    if ( 'Name' == bp_get_the_profile_field_name() ) {
        //insert label
    }
    #272940
    RobertL4807
    Participant

    Having this custom build as a post type. Then each posts have hidden fields containing the company info. Custom page theme. Then each post has associated profile IDs. Oh, and then having profile page pull company post info that matches their profile id.
    Seems like the only way due to the gap in the current features.

    gheebuttersnaps
    Participant

    Hey there,

    I am currently setting up a members directory for our alumni association using buddypress (currently Version 3 RC1 from trac). I really love it and so far the feedback from our testers is really positive. I might consider contributing a showcase/case study if there is anything like that for buddypress. I have already contributed several translations and will add more during the weekend!

    I have one issue remaining which is related to the search function. We allow our members to hide certain information from other members. For example one member can set their current location to “adminsonly”. Let’s assume this example. We have user Thomas in city Berlin and user Peter in city Munich. Thomas decides to hide his location from other members and sets the field visibility to adminsonly. Now Peter views Thomas’ profile and is not able to see his location. So far everything works as expected. Now Peter uses the search function and uses the keyword “Berlin”. The result set contains Thomas (without displaying any information about the city) although Peter should not be able to know the city.

    I would tend to consider this as a breach of privacy for users. That’s why I currently have removed the search boxes from all pages. Technically, if someone knows the URL search strings he/she could still do the search. Is it possible to configure the search so that it only searches fields which are available to the user conducting the search?

    Thanks and regards!

    #272905
    Venutius
    Moderator

    I don’t think I can advise you. BuddyPress does not some built in with a personal description. You can add one, in Dashboard>>Users>>Profile Fields, and it would be displayed during signup and in the users Profile>>View page. However, that’s not the default landing page for a profile, so it looks like your theme is overloading the users profile, and I think your theme developers would be best placed to ask.

    #272810

    In reply to: GDPR compliance

    Varun Dubey
    Participant

    @erictracz BuddyPress will also be ready with GDPR compliance in coming updates.
    There is an ongoing discussion about it.
    https://buddypress.trac.wordpress.org/ticket/7698

    For 3rd party plugin concern, Site owners are ultimately responsible for the all the plugins they are using at their site, and they also have to understand the functionality of each plugin including their data collection and storage methods before using them.

    Regarding 3rd party BuddyPress developers, after BuddyPress GDPR compliance release they can update their plugins to hook all user specific data at BuddyPress option which allow users to delete themselves.


    @hdcms
    You can create a profile fields with terms & condition or take a look at https://wordpress.org/plugins/simple-terms-and-conditions-for-buddypress/ plugin.

    dennis.cabasal
    Participant

    Hi,

    I’m new to buddypress and I was trying to add the xprofile fields to admin email after activation.

    I found this code and I’m desperately trying to figure out how to make it work.

    /*
    Plugin Name: Custom New User Email
    Description: Changes the copy in the email sent out to new users
    */
     
    // Redefine user notification function
    if ( !function_exists('wp_new_user_notification') ) {
        function wp_new_user_notification( $user_id, $plaintext_pass = '' ) {
            $user = get_userdata( $user_id );
          
    	// The blogname option is escaped with esc_html on the way into the database in sanitize_option
    	// we want to reverse this for the plain text arena of emails.
    	$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    	
    	// find the profile field for referrer
    	//$field1 = xprofile_get_field_data( 'Referrer', $user_id );
            $field1 = xprofile_get_field_data( 'field_id=1', $user_id );
            $field2 = xprofile_get_field_data( 'field_id=2', $user_id );
            $field3 = xprofile_get_field_data( 'field_id=3', $user_id );
    	$field4 = xprofile_get_field_data( 'field_id=4', $user_id );
    	$field5 = xprofile_get_field_data( 'field_id=5', $user_id );
    	$field6 = xprofile_get_field_data( 'field_id=6', $user_id );
    	$field7 = xprofile_get_field_data( 'field_id=32', $user_id );
    	$field8 = xprofile_get_field_data( 'field_id=8', $user_id );
    	$field9 = xprofile_get_field_data( 'field_id=9', $user_id );
    	$field10 = xprofile_get_field_data( 'field_id=10', $user_id );
    	$field11 = xprofile_get_field_data( 'field_id=13', $user_id );
    	$field12 = xprofile_get_field_data( 'field_id=16', $user_id );
    	$field13 = xprofile_get_field_data( 'field_id=25', $user_id );
    
    	$message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
    	$message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
    	$message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n\r\n";
    	$message .= sprintf(__('First Name: %s'), $field1) . "\r\n";
    	$message .= sprintf(__('Last Name: %s'), $field2) . "\r\n";
    	$message .= sprintf(__('Job Title: %s'), $field3) . "\r\n";
    	$message .= sprintf(__('Company: %s'), $field4) . "\r\n";
    	$message .= sprintf(__('Address 1 : %s'), $field5) . "\r\n";
    	$message .= sprintf(__('Address 2 : %s'), $field6) . "\r\n";
    	$message .= sprintf(__('Country	: %s'), $field7) . "\r\n";
    	$message .= sprintf(__('City: %s'), $field8) . "\r\n";
    	$message .= sprintf(__('Zip: %s'), $field9) . "\r\n";
    	$message .= sprintf(__('Phone: %s'), $field10) . "\r\n";
    	$message .= sprintf(__('Fax: %s'), $field11) . "\r\n";
    	$message .= sprintf(__('Relationship: %s'), $field12) . "\r\n";
    	$message .= sprintf(__('Interest: %s'), $field13) . "\r\n";
    
    	@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
    
    	if ( empty($plaintext_pass) )
    		return;
    
    	$message  = sprintf(__('Username: %s'), $user->user_login) . "\r\n";
    	$message .= sprintf(__('Password: %s'), $plaintext_pass) . "\r\n";
    	$message .= wp_login_url() . "\r\n";
    
    	wp_mail($user->user_email, sprintf(__('[%s] Your username and password'), $blogname), $message);
     
         }
    }
     

    Please help.

    Thank you so much

    Dennis

    #272789

    In reply to: Age Field two fields

    modde
    Participant

    Thank you, but the problem is, that its displayed like: 24 years, 2 months ago
    In German its vor 24 Jahren, 2 Monaten.

    The birthday should be display like this: 24 years
    Or in German: 24 Jahre

    The solution for me was to install the plugin BuddyPress Xprofile Custom Fields Type.
    Its not maintained and got deleted from the plugin site, but it works.

    Maybe I can add a php code in the custom field of the profile fields?

    Norman Cates
    Participant

    Thank you.

    However, I am using a plugin that sends an email invite to people whoare to become users.

    They fill in a simple registration form, then submit it.

    And then log in to the website.

    At that point, they have access. They haven’t gone through any Buddypress registration forms.

    So I can’t hook those actions.

    At what point in the user registration process do the xProfile fields get created/populated for a new user. eg. When does the default Name field get populated in the user registration process.

    And is there a corresponding action I could hook?

    Norman Cates
    Participant

    I’ve tried xprofile_get_field_data using this code:

    $args = array(
        'field'     => 'Nickname'
    );
    
    $result = xprofile_get_field_data($args); 
    print ("<br><br>");
    print ("XProfileData");
    print ("<br>");
    var_dump($result);

    But all it does is return “FALSE”

    That xprofile field definately exists

    Thanks to someone on WPMU dev, I tried this:

    $profile_data = BP_XProfile_ProfileData::get_all_for_user( 1 );
    echo '<pre>';
    print_r($profile_data);
    echo '</pre>';

    This returns the Profile fields…

    Norman Cates
    Participant

    So I realised looking at this page:

    Profile Fields Loop

    That I have no idea how it’s getting its data.

    There’s no arrays or variables being set. There’s these functions:

    bp_has_profile()
    bp_profile_groups()

    and so on.

    But none of these do any assignments of variables or results.

    I suspect my PHP/programming knowledge is way out of date. Because there’s something sophisticated or hidden going on here with those functions that I just don’t understand.

    As usual glad to be pointed at background reading…

    Norman Cates
    Participant

    So I’m having a really frustrating time getting BuddyPress to show all groups and fields, even if they have no data in them.

    I found this page:

    Profile Fields Loop

    It talks about the bp_group_has_profile() function. And parameters that can be applied. BUT that function is NOT in the example code on that page.

    I tried applying some of that information to

    public_html/wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single/profile/profile-loop.php

    But bp_group_has_profile does not exist in the above file.

    How does this information apply to showing all the fields and Profile Groups?

    When I search for the individual functions (like bp_profile_group_has_fields) in the BuddyPress site, they don’t seem to exist…

    Are these standard functions?

    I’m very confused about how to make this work.

    I also found this page:

    https://wordpress.stackexchange.com/questions/243884/how-to-display-profile-fields-with-no-data-in-buddypress-profile-view

    But that involves removing bits, rather than using function calls… Is this the way to do it?

    Thanks for any insight

    #272513
    yodam
    Participant

    Hi,
    I’ve created some custom fields for user profile and tryed some themes.

    At registration page I have dates and radio that always goes on new line (also date day,year and month are really too large).

    What can I do?

    Is also possible to have profile fields under (and not beside) account data?

    Thanks!

    #272489
    darunia77
    Participant

    Thanks @venutius.

    I’m actually using Paid Memberships Pro plugin for my memberships management and they just recently released a BP integration which takes care of the xprofile fields plugin problem as I was told by one of their tech support. It is better installed when you just create your site as they still have to create syncing issues between their fields and regular old xprofile fields for older members – currently this syncing is not available but will be. So as a result I will have to manually move the data over from the members prior to using their integration (about 200 people but it’s doable) . I’m waiting for the code to be installed on my site by their tech support to do this.

    But if anyone is interested, they should check out PMPro for managing bp or other memberships, it really is great and it’s always supported. I am using the Pro version which is expensive per year however you get great tech support and they will go into your site to modify things and help you install various add ons and integrations. This BP integration plugin is available in free version too I believe. If you have a serious memberships site where you do or intent do make money, it’s worth to pay for the yearly fee though for support and access to more add ons.

    I’ve tried other membership plugins and just wasn’t working for me.

    Hopefully the old xprofile fields plugin can be cloned by someone for those who are not going to use PMpro. It’s odd that there are not many options for this plugin and it’s not supported as it’s very essential.

    Here’s PMPro info:

    Paid Memberships Pro

    The integration plugin below, you need the above memberships plugin installed though:

    Paid Memberships Pro – BuddyPress Add On

    panosa1973
    Participant

    Yes! bp_get_member_user_id() did the job.
    My working code now is:

    //Add fields in the member directory results
    function add_info_to_members_loop() {
    	global $wpdb; 
    	$dateOfBirth = array();
    	$user_id = bp_get_member_user_id();
    	$dateOfBirth = $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 2 AND user_id = $user_id");
    	$dob =  $dateOfBirth[0];
    
    $today = date("Y-m-d");
    $diff = date_diff(date_create($dob), date_create($today));
    $state = bp_get_member_profile_data( 'field=State' );
    echo 'Age '.$diff->format('%y')  . ' - In ' . $state;
    //This will output i.e.: Age 35 - In New York 
    }
    add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );

    Thank you @venutius!

    panosa1973
    Participant

    This is happening in functions.php to fire up in members_loop:
    Even though the Date of Birth is a private field I still need to pull it so I can calculate and display the user’s age. The below code works fine when I’m logged in as Admin but returns 0 when I’m logged in as a regular user which made me realize it’s probably because it’s set to private.
    $dod = bp_get_member_profile_data( 'field=Date of birth' )

    How do I get the field value straight from wp_bp_xprofile_fields?
    The below isn’t working. I’m assuming it’s terribly wrong. I think I need to include in the db query the userID because it only pulls one value no matter who the user is but how do I get the displayed user’s ID (if that’s the case to begin with)? I managed to get this to work when viewing one’s profile page but I can’t seem to do it in members_loop.

    //Add fields in the member directory results
    function add_info_to_members_loop() {
    //$dateOfBirth = bp_get_member_profile_data( 'field=Date of birth' );//This isn't working
    
    global $wpdb; 
    $dateOfBirth = array();
    $dateOfBirth = $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 2");
    $dob = $dateOfBirth[0];
    
    /*This will work when I finally get the date of birth
    $today = date("Y-m-d");
    $diff = date_diff(date_create($dob), date_create($today));
    $state = bp_get_member_profile_data( 'field=State' );
    echo 'Age '.$diff->format('%y')  . ' - In ' . $state;
    */
    }
    add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );

    Thank in advance.

    kwavewd
    Participant

    they don’t help they are so slow. The only requirements are calling the xprofile fields into a template file

    zimou13
    Participant

    add_action(‘bp_after_profile_edit_content’,’edit_appointment_settings_xprofile’);

    // Displays Editable Fields for Appointments+ email and phone
    function edit_appointment_settings_xprofile(){
    // Only Logged in users can make these edits
    $profileuser = wp_get_current_user();

    ?>
    <h3><?php _e(“Appointments+ Settings”, ‘appointments’); ?></h3>
    <form method=”post” action =” “id=”appointment-edit-form” class=”standard-form”>
    <table class=”form-table”>
    <tr>
    <th><label><?php _e(“My email for A+”, ‘appointments’); ?></label></th>
    <td>
    <input type=”text” style=”width:25em” name=”app_email” value=”<?php echo get_user_meta( $profileuser->ID, ‘app_email’, true ) ?>” <?php echo $is_readonly ?> />
    </td>
    </tr>
    <tr>
    <th><label><?php _e(“My Phone”, ‘appointments’); ?></label></th>
    <td>
    <input type=”text” style=”width:25em” name=”app_phone” value=”<?php echo get_user_meta( $profileuser->ID, ‘app_phone’, true ) ?>”<?php echo $is_readonly ?> />
    </td>
    </tr>
    <input name=”action” type=”hidden” value=”save_xprofile” />
    // Add other fields like location etc .. here if needed

    </table>
    <div class=”submit”>
    <input type=”submit” action = “” name=”appointment-edit-form-submit” id=”appointment-edit-form-submit” value=”Save” />
    </div>
    <?
    }

    kwavewd
    Participant

    So what you do is create a shortcode similar to what you did for the profile pages but it’s within the appointments+ files. I can adjust the code to create the shortcode USER_PHONEr . Here is an example of custom code for a drop down on profile that was included into email templates

    if($r->travel_type==2){
    $address=$r->address;
    $travel_type=”Photographer Travel to Me”;
    } else {
    $sql = “SELECT * FROM wppl_friends_locator where member_id=”.$r->worker;

    $squad=$wpdb->get_results( $sql );

    if($squad){
    $address=$squad[0]->formatted_address;
    }
    else{
    $address=””;
    }
    $travel_type=”Travel to Photographer”;
    }

    but instead of all the travel type and address stuff I need to call the xprofile fields database then find id 206 and display that info.

    Thank You

    kwavewd
    Participant

    Thank you so much for replying. There is quite a lot of data on the plugin page. I need to display it within a backend email template. I am already able to show xprofile fields on the profile. Any ideas?

    #272350
    acieffe
    Participant

    I am running WordPress 4.9.5 with the Sweetdate Theme. Buddpypress 2.9.4 http://housing.digitalelegance.com/members/

    I am trying to get a few of the profile fields to show up under the member name on the members page. I tried to edit the member-loop.php and nothing was showing up. At the moment I have hidden the following areas through CSS

    .search-item .date {display:none;}
    .search-item .search-body{display:none;}

    I need some real world help in displaying these fields. Any other information you may need, just ask. Thank you

    #272333
    Venutius
    Moderator

    1. take a look at this page, it shows the general principles https://codex.buddypress.org/themes/theme-compatibility-1-7/template-hierarchy/ also you can look at the BP Template Overloader plugin, it’s designed to make this process more accessible.

    Basically you create a buddypress directory in your child theme directory and replicate the directory path to the buddypress/members/register.php file.

    Regarding 2, how did you do that? I’ve not got it as an option, I’m aware there’s plugin that added a TOS checkbox, not seen it done directly from the xProfile fields.

    But if you did add it as a xProfile field, BP will by default show it in the profile page if the user has set it to publicly visible.

    you might like to check out that plugin, I don’t think it uses xProfile fields: BuddyPress Simple Terms And Conditions

    #272326
    Venutius
    Moderator

    1. One way to achieve this would be to overload the BuddyPress register page and replace the current section that adds the username with code that populates this field from the username field.

    2. Not sure about that one, I take it this is being added by a plugin? if it’s creating an xprofile field then by default it will show up in profile, unless set to not be shown by the user. There’s a couple of options I think, either add some code to force this to not be displayed or else overload the profile page and set it up to display the profile fields you want to display.

    michaellanfield
    Participant

    Hello. here is my site https://www.thosecrazyvegans.net

    When I add a description to extended profile fields it shows up as 2 descriptions. I would like to remove the bottom ones. This happens to every new field I add that has a description.

    Here is the screenshot of what I am talking about. I don’t do anything different. I just add a description to the new field in Profile Fields.

    https://www.thosecrazyvegans.net/screenshot5.png

Viewing 25 results - 576 through 600 (of 3,881 total)
Skip to toolbar