Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 776 through 800 (of 3,593 total)
  • Author
    Search Results
  • #253421
    modemlooper
    Moderator

    any profile fields you add to the first field group get added to the registration form.

    prdufresne
    Participant

    I was able to override the offending settings by adding a few lines in the custom css file of my theme. Below are the changes I made to resolve the issue, in case anyone else runs into a similar problem

    #buddypress table.profile-fields td.label {
        color: #555555;
        display: table-cell;
    }
    #253164
    shanebp
    Moderator

    Your task is very logical – but fraught with danger.

    Have you noticed that emails can be edited from a Profile page via Settings?
    And how a confirmation email is sent?

    And this setting: wp-admin/admin.php?page=bp-settings > Profile Sync ?

    So it’s possible but not easy.
    Display of those fields is fairly simple – but writing handlers to save those fields… eek.

    If it was me, I’d just add Profile fields for bio and website – and move on.

    #253044
    yoast79
    Participant

    Hey Henry,

    After some more hours of trying I managed to find the right code to get it done!

    This is what made it work;

    .profile-fields {
    color: #ffffff
    }
    
    .profile-fields {
        background: #000000
    }
    
    .profile-fields tr.alt td {
         color: #ffffff
    }
    
    #buddypress table.profile-fields tr.alt td {
         background: #000000
    }
    

    I’m sorry to bother you with my question.

    #252991
    sharmavishal
    Participant
    #252972
    sharmavishal
    Participant

    i use donmik’s excellent plugin “BuddyPress Xprofile Custom Fields Type” for this…you can add a TOS to xprofile field

    #252937
    BobSD99
    Participant

    A quick followup, I see the permitted field value for the checkbox (in this case) is stored in field 315 in table wp_bp_xprofile_fields – how do I query this checkbox setting value?

    I want to pull the correct value from the database, so in case I update that checkbox field’s option in the backend, I can correctly set it.

    I don’t see a function in /buddypress/bp-xprofile/bp-xprofile-functions.php: that seems to pull this, and nothing is locking in with Google….

    #252927
    shanebp
    Moderator

    It won’t work unless you pass a ‘valid’ value. And you don’t have to use an array for a single value.
    So if you have not changed the option value ( via Users > Profile Fields ) to ‘Subscribe to Newsletter Digest’, it will fail.

    To ‘uncheck’ the box – just delete that row for that user in the _bp_xprofile_data table.
    xprofile_delete_field_data( field name or ID, $user_id )

    #252923
    BobSD99
    Participant

    To keep this simple, and for illustration purpose, I edited the data I wanted to update in the question, which given it’s a checkbox, is confusing.

    I actually want to toggle that element off, so I assume I’d actually either a) update the array to an empty field, or b) delete the entry entirely.

    I assume I want to change the field to an empty string, but now that doesn’t seem as obvious. Some guidance is appreciated on updating this field and any curves a checkbox might throw in working with BP XProfile fields.

    Naomi
    Participant

    Because adding them as xprofile fields doesn’t add them to the TML registration page that I need to use. Have you looked at the TML instructions? I followed them exactly and they don’t use xprofile fields so it’s glitchy.

    #252863
    gregsee
    Participant

    Hi Modemlooper, thank you, I did manage to work it out. Problem partly due to my WP theme has a social counter plugin that provides a stack of fields for links that I assumed were part of the WP or BP basic profile fields. I have set up some of my new xProfiles fields now and have it working – just need to organise these for groups better.
    Thanks

    modemlooper
    Moderator

    You can update a field with this function

    xprofile_set_field_data( $field, $user_id, $value, $is_required = false )
    
    $fields = field id
    $user_id = current login user id
    $value = inserted value
    $is_required = boolean

    Hook your function to

    do_action( 'bp_core_activated_user', $user_id, $key, $user )

    modemlooper
    Moderator

    BuddyPress users are the same as WordPress so you can create a user using https://codex.wordpress.org/Function_Reference/wp_create_user

    To set profile fields data:

    xprofile_set_field_data( $field, $user_id, $value, $is_required = false )
    
    $fields = field id
    
    $user_id = current login user id
    
    $value = inserted value
    
    $is_required = boolean
    #252857
    modemlooper
    Moderator

    BuddyPress searches username and profile fields to find a member. You would need to develop a custom solution for this. Is this requirement for site admins? If so, you can find members by id in the admin -> Users menu item.

    #252856
    modemlooper
    Moderator

    Any profile fields you create in the admin that are in the first section are automatically added to the registration form.

    User Extended Profiles

    #252794
    mairaj
    Participant

    Ok thank you! I was by the way referring to the custom xprofile fields that I have on my current site (the multisite one that I have now).

    I assume when I import the back up database file to the new site those custom xprofile fields would be created automatically.

    #252786
    mairaj
    Participant

    Thank you for the reply 🙂 Since you have suggested to export TABLES OF WP_xprofile, I believe I don’t need to create any xprofile fields in the new installation.

    #252630
    Henry Wright
    Moderator

    This doesn’t happen for me. When I set the page “Register” to a static front page, I can still see custom profile fields in the sign up form. Can you post some details about your set up?

    • Theme
    • Plugins active
    • Do you use custom code snippets in bp-custom.php or functions.php?
    • etc
    #252259
    ngoegan
    Participant

    I still can’t get it to work. I do have header images enabled so I edited this file:

    buddypress\bp-templates\bp-legacy\buddypress\members\single\cover-image-header.php

    as follows:

    <?php
    
    				 /**
    				  * Fires after the group header actions section.
    				  *
    				  * If you'd like to show specific profile fields here use:
    				  * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
    				  *
    				  * @since 1.2.0
    				  */
    		
    
    bp_member_profile_data( 'field=city' );
    bp_member_profile_data( 'field=state' );
    
    		 do_action( 'bp_profile_header_meta' );
    
    				 ?>
    
    			</div>
    #252254
    ngoegan
    Participant

    I tried this and it isn’t showing up on profile pages:

    <?php do_action( 'bp_member_header_actions' ); ?>
    
    		</div><!-- #item-buttons -->
    
    		<?php
    		/***
    		 * If you'd like to show specific profile fields here use:
    		 * bp_member_profile_data( 'field=About Me' ); -- Pass the name of the field
    		 */
    
    bp_member_profile_data( 'field=city' );
    bp_member_profile_data( 'field=state' );
    
    		 do_action( 'bp_profile_header_meta' );
    
    		 ?>
    
    #252253
    ngoegan
    Participant

    I’m sorry, but where exactly in that code would I enter that? Like this?

    <?php
    /***
    * If you’d like to show specific profile fields here use:
    * bp_member_profile_data( ‘field=About Me’ ); — Pass the name of the field
    */
    do_action( ‘bp_profile_header_meta’ );

    bp_member_profile_data( ‘field=City’ );
    bp_member_profile_data( ‘field=State’ );

    ?>

    #252252
    shanebp
    Moderator

    You have identified the correct code location:

    Assuming your field names are City and State, try:

    bp_member_profile_data( 'field=City' );
    bp_member_profile_data( 'field=State' );

    If you need to do some formatting or add text or check for empty fields, use:

    $city = bp_get_member_profile_data( 'field=City' );
    echo $city;
    #252205
    concoa
    Participant

    UPDATE:
    I deleted all BP files and the plugin and did a reinstall.

    PROBLEM #1)
    I am still having trouble with the Register page. I do not know what this error refers to:

    displays an error message:
    “Profile Details
    Warning: Creating default object from empty value in /home/content/p3pnexwpnas09_data01/28/2853428/html/wp-content/plugins/buddypress/bp-xprofile/classes/class-bp-xprofile-group.php on line 649”

    Line 649 is:
    $fields[ $key ]->visibility_level = $field_visibility;

    PROBLEM #2)
    Registration submission is now working, but an auto response email is being sent. Is there something in BuddyPress (or WordPress) to disable this? I’m getting an email saying:
    Hi test4,
    Thanks for registering!

    To complete the activation of your account, go to the following link: http://blahblahblah.com/activate/ef23a0f24958c3a125917f7e3bac95f8/

    I’m using s2Member to allow admin approval of registrations. This email needs to be removed. Thx.

    #252077
    Ike Ten
    Participant

    Hi @ch1n3s3b0y @jokyfoot @ksimpson1986 @ksimpson1986 ,

    I think I found something something close.

    A free plugin called ‘Conditional Profile Fields for BuddyPress’ on buddydev.com/
    It allows you to set conditions for profile field so each user has a different set of fields based on their previous answer or input.

    Plugin Link: http://buddydev.com/plugins/conditional-profile-fields-for-buddypress/

    It does it by hiding or showing fields based on specific answer given. The great thing here is that you now have to use just one dynamic registration form for all user types or groups.

    Use this tutorial for a better understanding how the plugin works http://wptavern.com/new-plugin-adds-conditional-profile-fields-to-buddypress/

    I hope it helps.

    #251970
    valuser
    Participant

    The second ask — i can’t usefully contribute!

    for the first ask

    Assuming your new user fills in her/his profile fields on registration

    Something like the following MIGHT work.

    On FIRST login a user is redirected to say .$user -> user_login.’/profile/change-avatar/’;

    then add something like this to the functions.php file of your theme

    function alaiam(){
    
    global $current_user, $wpdb, $bp;
    
    get_currentuserinfo();
    
    $user_id = get_current_user_id();
    
    $firstname = xprofile_get_field_data( "First Name" ,$user_id);
    update_user_meta( $user_id, 'first_name', $firstname);
    
    $lastname = xprofile_get_field_data( "Last Name" ,$user_id);
    update_user_meta( $user_id, 'last_name',$lastname);
    
    $gender= xprofile_get_field_data( "Gender" ,$user_id);
    update_user_meta( $user_id, 'gender',$gender);
    
    $xdob= xprofile_get_field_data( "Date of Birth" ,$user_id);
    update_user_meta( $user_id, 'dob',$xdob);
    
    /*and so on.........*/
    
    add_action('bp_before_profile_avatar_upload_content', 'alaiam', 10, 0);
Viewing 25 results - 776 through 800 (of 3,593 total)
Skip to toolbar