Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 1,426 through 1,450 (of 5,755 total)
  • Author
    Search Results
  • yousan
    Participant

    Hello.

    There are some required items at register page.
    When make those fields empty, then proceed registration, the user faced to error page.
    Some of fields are shown with “This is a required field” but some of them are not.

    I use x-profile. There are 3 field groups.
    The first field groups (shown as main) cannot show “This is a required field”.
    Others can show “This is a required field”.

    Should I customize some settings?

    Thanks.

    #248745
    macia6
    Participant

    Hey there
    After long fight with profile fields in registration i’m here to ask for help.

    I created 3 groups with lot of profile fields for my register page. And now in field Height and Weight i choosed option “number” so user can put numbers Buuut…. he can put any number there, even -10 etc. Can i somehow modyfy range of numbers user can use ?

    Same problem with field day of birth where i choose “date selector” user can choose even 2037 year !…

    It is for a start becouse i also wanted to modify avery single field in php to put there some images etc but it is made in a loop to create register page on its own… Any ideas ?

    #248735
    mnctigah
    Participant

    Greetings…

    I’m in the process of upgrading an older site (originally running WP 3.7 & BP 1.5) onto a new LAMP stack. All of the component upgrades are okay except the BP 1.5 to 2.4 upgrade. Currently at WP 4.4.1.

    My problem has been with posting Member Search Results with BP 2.4.

    Normal troubleshooting methods. Disabling plugins, debugging (no errors flagged), etc.

    The BP core is modified (reflected in my changelog) and BP Profile Search (3.5) plugin is being used in conjunction with s2Member (151218) for the profile fields and the member roles.

    The site functions normally with BP 1.5 activated. The last hindrance is with the BP 2.4 activation… My search query appears in the address bar, but the Member Search Results fail to be inserted into the page. In looking at page source code, my title differs, and a script being generated from my member-loop is not being inserted in BP 2.4 (though titling and scripts function correctly with BP 1.5).

    I can create, add, edit profiles and such. But obviously I am coding improperly or overlooking something with respect to 2.4.

    I am currently using an older custom theme which emulates the pre-BP 1.7 stack. No change when switching to template heirarchy => 1.7. The objective has been to upgrade the site and utilize bp compat going forwards.

    I’m attaching the relevant files (members-loop, index, page-source, changelog, etc) and links.

    The screenshot…
    https://s3.amazonaws.com/buddypress-errors/screenshot.jpg

    My combined members-loop and changelog (bp-core mods) on pastebin…
    http://pastebin.com/yBHLr2WR

    All of the files (page-source, index.php, bp-members-template.php, etc) and login credentials if needed on DropBox…
    https://www.dropbox.com/sh/qkqnca0xgtp46wu/AAAFNyywX73dbd1fGmr9GQ5Ka?dl=0

    Thanks in advance…

    Hastig
    Participant

    BP 2.4.3 | WP 4.4.1

    I want to create a link to search xprofile fields for a specific keyword.

    For example, the xprofile field ‘Region‘ has two possibilities, ‘East‘ and ‘West‘

    I can do /members/?s=East

    But that searches all fields and will give imprecise results as someone may have the word East in their about me or elsewhere.

    So, something like this..

    /members/?s=East+xp=Region

    I was sure I had seen somewhere it was possible but can’t find the bookmark.

    Here’s the same question asked a few years ago with no answer..

    xprofile slugs search

    helloeng
    Participant

    On the BuddyPress registration form on my site, all the profile fields allow the users to change ‘visibility’, i.e. users can change who can see these values. But in the WP Admin profile fields, I selected ‘enforce field visibility’ for all of them. So I’m not sure whey the option still shows up.

    See screenshots here please: http://www.helloenglish.vn/url-pictures/

    Any advice?

    BuddyPress Version 2.4.0
    Wordpress 4.4

    Thanks.

    #248409

    In reply to: Members – Masonry

    Hastig
    Participant

    without seeing your css i can give you an ugly, possible solution..

    (please backup that file before attempting the change)

    delete

    <div class=”profile_fields”><?php bp_member_profile_data(‘field=Organizational Name’); ?></div>

    replace

    <div class=”item-title”>
    <?php bp_get_member_name(); ?>
    </div>

    with

    <div class=”item-title”>
    <?php bp_get_member_name(); ?>
    <div style="display: block;"><?php bp_member_profile_data(‘field=Organizational Name’); ?></div>
    </div>

    you may want to change style="display: block;" to class="whateverName" and edit from your style sheet.

    #248408

    In reply to: Members – Masonry

    kmw1130
    Participant

    Here is my code. It is on the Members Page
    if ( function_exists(‘bp_is_active’) ) {
    if ( bp_has_members( $params ) ){
    ob_start();
    echo ‘<div class=”wpb_wrapper”>’;
    echo ‘<div id=”members-dir-list” class=”members dir-list”>’;
    echo ‘<ul id=”members-list” class=”item-list row kleo-isotope masonry ‘.$class.'”>’;
    while( bp_members() ) : bp_the_member();
    echo ‘<li class=”kleo-masonry-item”>’
    .'<div class=”member-inner-list animated animate-when-almost-visible bottom-to-top”>’
    .'<div class=”item-avatar ‘.$rounded.'”>’
    .’‘. bp_get_member_avatar() . kleo_get_img_overlay() . ‘‘;
    if ($online == ‘show’) {
    echo kleo_get_online_status(bp_get_member_user_id());
    }
    echo ‘</div>’
    .'<div class=”item”>
    <div class=”item-title”>’
    .’‘. bp_get_member_name() . ‘
    </div>
    <div class=”profile_fields”>’.bp_member_profile_data( ‘field=Organizational Name’ ).'</div>’;
    ‘<div class=”item-meta”><span class=”activity”>’.bp_get_member_last_active().'</span></div>’;

    if ( bp_get_member_latest_update() ) {
    echo ‘<span class=”update”> ‘. bp_get_member_latest_update().'</span>’;
    }

    do_action( ‘bp_directory_members_item’ ); echo ‘</div>’;
    echo ‘<div class=”action”>’;
    do_action( ‘bp_directory_members_actions’ );
    echo ‘</div>’;
    echo ‘</div><!–end member-inner-list–>
    ‘;
    endwhile;
    echo ‘‘;
    echo ‘</div>’;
    echo ‘</div>’;
    $output = ob_get_clean();
    }`
    }
    else
    {
    $output = __(“This shortcode must have Buddypress installed to work.”,”k-elements”);
    }

    #248267
    Xtremefaith
    Participant

    So does this mean you cannot use standard WordPress First & Last name fields, that if I want them accessible on their profile I have to use the xprofile component? Seems either redundant to keep them in both or a waste to not use the WP standard fields.

    Is there not an easy easy way to modify the profile form to make standard fields visible and editable?

    #248245
    shanebp
    Moderator

    I’m not aware of a plugin that does what you want.
    You might try https://wordpress.org/plugins/members-import/ as a starting place.
    You would need to modify the code to handle profile fields like postal codes.

    The search function would be separate.
    There are plugins that search profile fields, such as https://wordpress.org/plugins/bp-profile-search/

    #248216
    nowfoods123
    Participant

    Hi,

    I’m new to wordpress/buddypress and I’m having trouble displaying field names.
    I have a field named “Age:” and using the following code:

    bp_member_profile_data( 'field=Age:' );

    in the members-loop file, the members age is displayed. I would like to add “Age: ” in front of the number, I searched and found this thread:

    https://buddypress.org/support/topic/displaying-profile-field-name-in-member-loop/

    but all the suggestions leave me with a blank members page???
    If I remove the opening and closing php tags for the bp_member_profile_data section and use

    <p>Age: <php bp_member_profile_data( 'field=Age:' );?><p>

    I get the following under all profiles despite only one having an age value set:

    /*** * 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’ ); */

    Age:

    the one profile with an age value set isn’t shown.
    Can anyone see where I’m going wrong with this?

    #248077
    VersGemerkt
    Participant

    Jigesh,

    Thanks for the help! This is how it looks right now:

    Screenshot order.php

    As you can see to the right of the profile image their are some data showing from the custom fields. @mcUK and @shanebp helped me out achieving this. BUT, this is not the correct data it should be showing for this user… It shows data that the logged in user filled in.

    I logged in as the user that filled in the correct data, and then it’s showing the right data for the user. But this is because I’m logged in as that user…

    Screen

    NOTE: I’m transferring this data across two plugins: buddypress and learnpress. Just so you know!

    This is the php in bp-custom:

    <?php
    
    function bptest_show_a_field () {
    	$user_id = bp_loggedin_user_id();
    	$firstname = xprofile_get_field_data( 'First Name', bp_loggedin_user_id(), $multi_format = 'comma' );
    	$lastname = xprofile_get_field_data( 'Last Name', bp_loggedin_user_id(), $multi_format = 'comma' );
    	$birth = xprofile_get_field_data( 'Date of birth', bp_loggedin_user_id(), $multi_format = 'comma' );
    	$education = xprofile_get_field_data( 'Highest Education Grade', bp_loggedin_user_id(), $multi_format = 'comma' );
    	$profession = xprofile_get_field_data( 'Profession', bp_loggedin_user_id(), $multi_format = 'comma' );
     
    	if ( ! $firstname && ! $lastname && ! $birth && ! $education && ! $profession ) { 
    	   return; 
    	}   
    	else {
    	    echo 'Voornaam: ' . $firstname . '<br />' ; 
    	    echo 'Achternaam: ' . $lastname . '<br />' ; 
    	    echo 'Geboortedatum: ' . $birth . '<br />' ; 
    	    echo 'Hoogste graad: ' . $education . '<br />' ; 
    	    echo 'Beroep: ' . $profession . '<br />' ; 
            
    	}
    }
    
    add_action ( 'user_a_field', 'bptest_show_a_field' );
    ?>
     
    #248048
    @mcuk
    Participant

    Hi David,

    Copying the code method does work. (Renaming the function, the variables/fields within and the add_action bits).

    Just tried this out too and it appears to work fine, though not tested thoroughly so you’d need to double check:

    function bptest_show_a_field () {
    	$user_id = bp_loggedin_user_id();
    	$field_one = xprofile_get_field_data( 'Field One', bp_loggedin_user_id(), $multi_format = 'comma' );
    	$field_two = xprofile_get_field_data( 'Field Two', bp_loggedin_user_id(), $multi_format = 'comma' );
     
    	if ( ! $field_one && ! $field_two ) { 
    	   return; 
    	}   
    	else {
    	   echo $field_one ; 
    	   echo $field_two ; 
    	}
    }
    
    add_action ( 'user_a_field', 'bptest_show_a_field' );

    Then put do_action ( 'user_a_field' ); in your desired location.

    #248044
    VersGemerkt
    Participant

    Got one question now that I’m working with the provided code:

    Do you have tips for using this code for multiple custom fields? How should I edit this code in bp-custom.php if I want to add multiple custom fields?

    <?php
    
    function bptest_show_education_field () {
    	$user_id = bp_loggedin_user_id();
    	$education_field = xprofile_get_field_data( 'Highest Education Grade', bp_loggedin_user_id(), $multi_format = 'comma' );
    	if ( ! $education_field  ) { 
    	   return; 
    	}   
    	else {
            echo 'Hoogste opleiding: ' . $education_field . '<br />'; 
    	}
    }
    add_action ( 'user_education_field', 'bptest_show_education_field' );
    ?>

    I’m now trying to copy this code for every custom field, but that’s not really a clean way of doing this. And it’s not working either. Hope you can help me out with this one as well!

    #247957
    VersGemerkt
    Participant

    Hi mcUK!

    Thanks for you reply. I’m working with Lotte on this issue.

    I tried adding your code. Everything should be in place right now, but it’s still not showing the custom fields. I’m probably using the code wrong…

    I tested your code with a custom field ‘Opleiding’ which I added in WordPress: Users -> Profile fields:

    Screenshot with the custom field

    I added this to bp-custom.php:

    <?php
    
    function bptest_show_opleiding_field () {
    	$opleiding_field = bp_get_member_profile_data( 'field=Opleiding' ); 
    	if ( ! $opleiding_field  ) { 
    	   return; 
    	}   
    	else {
    	   echo '<span class="custom-field-text">' . $opleiding_field . '</span>'; 
    	}
    }
    
    add_action ( 'user_opleiding_field', 'bptest_show_opleiding_field' );
    ?>

    Then I added this to order.php (the php file where the custom field should pop-up):

     <div id="user-opleiding">
    	                           <?php 
    		                          do_action ( 'user_opleiding_field' ); 
    	                           ?>
                                 </div>

    What am I doing wrong? It’s probably a typo or a wrongly added term… But I can’t figure out what it is!

    Hope you can help us out! Thanks for the help so far!

    David

    #247927
    danbp
    Participant

    I’m pleased to announce my new plugin Buddy Progress Bar !

    A BuddyPress plugin that use a point system to display a progress bar or progress percentage for any of completed member’s xprofile fields and/or uploaded custom avatar.

    Buddy Progress Bar helps any site administrator to kindly remember his community members to complete their profile in a clear, significant and non-obstrusive way.

    A widget is also available, which let you show a progress bar outside of the positions you can activate in the settings. To get this plugin to work, BuddyPress xprofile component must be active.

    https://wordpress.org/plugins/buddy-progress-bar/

    #247920
    @mcuk
    Participant

    Hi,

    Not used LearnPress so unable to comment much on that . The method I used to insert/display my own custom profile fields into a header on the user activity page was as follows (in this case, a Location field which was created in the WP dashboard).

    1. Add to bp-custom.php :

    //Add Location field to header if user has entered data into it
    //Nothing is shown if user hasn't entered anything into field
    function bptest_show_location_field () {
    	$location_field = bp_get_member_profile_data( 'field=Location' ); 
    	if ( ! $location_field  ) { 
    	   return; 
    	}   
    	else {
    	   echo '<span class="custom-field-text">' . $location_field . '</span>'; 
    	}
    }
    //user_bio_location_field is used within the member-header php template file
    add_action ( 'user_location_field', 'bptest_show_location_field' );

    2. In my member-header.php file (which was copied into my child theme) entered the div :

    <div id="user-location">
    	<?php 
    		do_action ( 'user_location_field' ); 
    	?>
    </div><!-- #user-location - function is found in bp-custom -->

    Obviously the php code in step two is placed wherever you want the field to display, just put it in the correct location of the correct php file. In my case it was member-header.php but for you i’m guessing its the one that generates your order page?.

    Not sure if you have already tried any of that or if it even helps!

    #247908
    dlongm01
    Participant

    In fact I have found a reasonable solution using CSS. I found some key clues on in the support forum for this plugin: Buddypress Xprofile Custom Fields Type (though I’m not using that plugin).

    If anyone has any advice about how to improve this I would be glad to hear it. Thanks

    /* Buddypress profile field description position*/
    .editfield {
    position: relative;
    top: 5px;
    }
    .editfield label {
    font-weight:bold;
    margin-bottom: 30px;
    }
    .input field_4 {
    margin-top: 5px;
    }

    form.standard-form p.description {
    margin: 0 0 15px;
    position: absolute;
    top: 20px;
    line-height:1em;
    }

    #247832
    AdventureRidingNZ
    Participant

    Add me to the list. I want to be able to have a page with a members list which lists 6 xprofile fields if a particular one of those fields is populated.

    #247820
    lotte01
    Participant

    Hello!

    I’m quite new with Buddypress. So I’m searching for hours already how I can do the following thing. I hope you guys can help me!

    I made some custom fields beyond ‘Profile Fields’. I would like to display the outcome of this fields on another page (on a order, within LearnPress). I tried so many PHP codes with ID’s, names etc. But none of them works… What am I doing wrong?

    Here I would like to add the custom fields (beyond the user ID)

    What kind of code do I have to place here?

    Here I made one of the custom fields ('Opleiding')

    Would love to hear from you. Thanks in advance 🙂

    Lot

    #247622

    In reply to: Repeating Group Tabs

    NickAcs
    Participant

    Just an additional note to this issue – each time I refresh/revisit Profile Fields in the backend, more “Social” and “CoverOptions” tabs are added. The list grows!

    @mcuk
    Participant

    I’ve seen a few posts on removing the ability of site users to use the rich text editor (tinymce) that was introduced in update BP 2.4 (i think). But not seen any solutions.

    I encounter it in the Profile Fields with the ‘multi line text area’ setting. Is it possible to remove/suppress it entirely, or failing that, for individual fields as needed?

    Thanks

    BP. 2.4.2
    WP. 4.4

    #247334
    Matt Edminster
    Participant

    Hello,

    I’ve been customizing the layout of my group pages. One of my adjustments is to remove admin and mod icons from the header and place them in the sidebar as a vertical list. (We are using groups for departments in our organization with admins = department heads and mods = managers.) I would like to include profile meta next to each icon so that the list would appear something more like entries in the Members archive. But I understand that the call in the header is bp_group_list_admin () or bp_group_list_mods() rather than the bp_group_members() loop.

    Can I add profile fields to the group_list_* functions?
    Or can I make multiple group members loops for each group role?

    What’s the code I need to accomplish this?

    You can see what I’m talking about at alongside.org/groups/estonia

    George Notaras
    Participant

    @sbrajesh

    Hi Brajesh,

    Thank you very much for the insight. Your reply clarifies a lot of things for me. Really enlightening.

    I was planning to make my plugin able to understand the following field notation:

    
    some field name @ some field group
    

    for easier/friendlier association of xprofile fields to profile properties, for which the plugin can generate metadata.

    Now that I have this information, I’ll have to rethink about the implementation.

    Thanks again!

    Best Regards,
    George

    Brajesh Singh
    Participant

    Hi George,
    No, There is no API function to fetch field group id from field group name and you will need to write your own sql query for the purpose.

    Also, In your example you have passed the profile_group_id to the bp_get_profile_field_data. Please note, it does not take that as a valid argument. It only accepts user_id and field. group id is not required for fetching field data.

    Now, If we forget about the group name API and come to the original requirement, Do you plan to fetch the data for multiple users(In loop) or just once/twice.

    For fetching data, these two functions work

    You can either use

    
    $data = xprofile_get_field_data( $field, $user_id = 0, $multi_format = 'array' )
    
    

    where $field is field id or name( If you know the id, It will fetch from any group, Name has the issue)

    or as you specified

    
    $data = bp_get_profile_field_data( array(
    	'user_id'	=> $user_id,
    	'field_id'	=> $field
    	
    ) );
    
    

    The xprofile data APIs do not allow passing group in general. You either pass a field id or name.

    The problem will happen when multiple fields have same name. In that case, the first field with the name matches if you use the above functions.

    Another point, In both the cases, There is no group arguement and if you use field name, that will need one extra query(field id should be preferred if the id is known).

    Honestly speaking, It is ok to use it one or 2 time on page but avoid using it inside the loop. If you plan to use it inside the loop, you should try to first fetch the xprofile data and cache and then use any of these functions. One way to cache will be by calling

    
    
    BP_XProfile_ProfileData::get_value_byid( $field_id, $user_ids )
    

    Where $field_id is the id of field(not name) and $user_ids is one or more user ids.

    Hope that helps.

Viewing 25 results - 1,426 through 1,450 (of 5,755 total)
Skip to toolbar