Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 676 through 700 (of 3,880 total)
  • Author
    Search Results
  • #269034
    Boone Gorges
    Keymaster

    Hi @barkins – BP doesn’t have a built-in tool for this (though it should – see https://buddypress.trac.wordpress.org/ticket/7393, https://buddypress.trac.wordpress.org/ticket/408). If you know that user IDs will remain the same between the local WP install and the live install, then you can do a simple database export/import, something like:

    $ mysqldump -u db_user -p db_name wp_bp_xprofile_groups wp_bp_xprofile_fields wp_bp_xprofile_data > ~/xprofile-export.sql

    $ mysql -u db_user -p db_name < ~/xprofile-export.sql

    If the user names will not be the same, you’ll need to write a script to handle this, but the details will depend on how you plan to identify users (email address, etc).

    #268986
    barkins
    Participant

    I need to export and import just the Profile fields from my local WordPress installation to my live website.

    Is there a way to do this? I see there are ways to export and import the field data, but I just need the fields themselves. Thanks

    #268921
    creative nomad
    Participant

    I’m looking for the file or a way to change the words profile details on the registration form

    #268860
    Boone Gorges
    Keymaster

    Hi @willallen83 – I’m afraid I haven’t integrated with s2member in many years, so I can’t provide exact advice. But briefly, it appears that the code above is meant to sync the $s2member_fields fields – which I assume are defined somewhere in s2member – to the corresponding members of the $xprofile_fields array. The latter fields are created in Dashboard > Users > Profile fields; make sure the names (like ‘Last Name’) match exactly, or the lookup will fail.

    Note also that it may be more reliable to fetch user info from the values passed by the ‘wp_login’ hook to the function. So something like this:

    
    function s2_profile_field_update( $user_login, $user ) {
      //Array of xprofile field names
      $xprofile_fields = array('Last Name','Country','Introduce yourself to Aisha Salem');
      //Array of s2member field slugs
      $s2member_fields = array('last_name','user_country','member_letter_aisha');
      //Populates BP with S2 info
      get_currentuserinfo();
      // if( current_user_is("s2member_level1") ) {
           for($i = 0; $i < sizeof($xprofile_fields); $i++) {
              if(xprofile_get_field_data($xprofile_fields[i], $user->id) == '' && get_user_field($s2member_fields[i]) != '' )  {
                  xprofile_set_field_data($xprofile_fields[i], $user->id, get_user_field($s2member_fields[i]) );
               }
           }
      // }
    }
    

    Note that, according to this code, it’ll only update the BP xprofile fields if they’re empty. You’ll have to remove that check if you always want s2member values to take precedence.

    Beyond this, your best bet for figuring out why this is not working is to place some debug statements at various points. Use error_log() or good old-fashioned var_dump() to make sure (a) the function is actually firing at ‘wp_login’, (b) the xprofile field values are actually being fetched properly, (c) the get_user_field() function is fetching data properly, and from the correct user https://s2member.com/kb-article/user-custom-fields-via-php-code/#toc-460a2dd2, etc.

    #268803
    Boone Gorges
    Keymaster

    Sure, I’m happy to point you in the right direction.

    The BuddyPress Custom XProfile Field Type plugin is probably a good one to start with. It uses the BP_XProfile_Field_Type class to register its fields. It even has an existing Datepicker field that you can use as a starting place: https://github.com/donmik/buddypress-xprofile-custom-fields-type/blob/master/classes/Bxcft_Field_Type_Datepicker.php

    There are a few changes you’ll need to make in order for this to show two datepickers instead of one.

    – The set_format validation regex expects a single date. This will need to be modified for your new format. https://github.com/donmik/buddypress-xprofile-custom-fields-type/blob/1126cf093bd2b6e9f917b5c15f52e203f17cbb9e/classes/Bxcft_Field_Type_Datepicker.php#L14
    – You’ll need to modify the edit_field_html method so that it loads two separate input fields, and then write some JavaScript that assigns a jquery-datepicker to each one of them. Then you’ll need to write a little bit of extra JS that combines the two datepicker inputs into a single (probably hidden) field, which is the one that BP will actually save to the database. https://github.com/donmik/buddypress-xprofile-custom-fields-type/blob/1126cf093bd2b6e9f917b5c15f52e203f17cbb9e/classes/Bxcft_Field_Type_Datepicker.php#L29
    – If you decide to store the start and end date in a single row in the profile field, you’ll also need some logic that splits it into start and end when you load the edit_field_html. Another option is to store the concatenated display text – say, April 2017 - May 2017 – in BP’s native xprofile field, and to store the start and end date separately, as xprofilemeta. You’d need a custom save routine for this, but it may be a bit cleaner.

    Good luck! Sounds like a fun project.

    #268799
    amitrwt
    Participant

    @boonebgorges

    If you want your users to be able to select start and end times, my best suggestion is to create two separate xprofile fields, and name them accordingly: ‘Start Date’, ‘End Date’ or something like that.

    That is exactly what I did, that was only way around I found for time being. If you have any insight can you pls tell me if it is possible to have a field with JQ datepicker where I can select start and end date. I’m planning to create a filed like this just need something to start with.. that’s the hard part once I’ll have a slate to start with I can write what I want. I’ve no issues getting my hands in code I’d rather enjoy it.

    #268792
    Boone Gorges
    Keymaster

    Hi @amitrwt – The ‘Start’ and ‘End’ fields in the BP admin settings define the start and end dates of a single datepicker. That is, if you want to have a datepicker, but you only want to show dates between the years 1970 and 1990, you’d use those dates as the Start and End.

    If you want your users to be able to select start and end times, my best suggestion is to create two separate xprofile fields, and name them accordingly: ‘Start Date’, ‘End Date’ or something like that.

    #268788
    Boone Gorges
    Keymaster

    Hi @redcompolitica – I’ve built multi-page registration processes for clients in the past, but unfortunately, it’s not very easy to do – BP’s registration system is not built in such a way as to make it easy.

    If your main goal is to make registration less overwhelming, you might consider moving some or most of your registration fields out of the “Base” group. This will mean that they don’t show up during the registration process, and users will have to fill them in by editing their profile after signing in.

    If your goal is to have *conditional* registration steps – where, for example, step 2 depends on a specific value provided in step 1 – then I’m afraid it’d have to be custom-built. Much of the work could be done with a custom theme template members/register.php and by modifying the way that registration data is saved and validated https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-members/bp-members-screens.php?marks=113#L72

    Some Trac tickets that are somewhat related that you might want to follow:
    https://buddypress.trac.wordpress.org/ticket/1842
    https://buddypress.trac.wordpress.org/ticket/4278

    Good luck with your project!

    charliep127
    Participant

    Hi BuddyPress users,

    I’m trying to delete the Primary profile field group for my WordPress multisite install, but I don’t know how. I AM able to prevent it from showing by turning off the “Extended Profiles” option in BuddyPress, but this is not an optimal solution, as I want my users to be able to easily upload profile pictures for themselves instead of having to make a Gravatar.

    I used to have far more profile fields and was able to remove them with no problems.

    Thank you very much for your time,
    Charlie Phillips

    Site: weathertogether.net
    Buddypress version: 2.9.2
    Wordpress version: 4.8.3

    #268762

    In reply to: get age from date

    psnation
    Participant

    BuddyPress Xprofile Custom Fields Type plugin is what I use to do this.

    It shows up on the profile as age. If you want it on the members page that takes some code editing. I saw a tutorial on BPDev site.

    amitrwt
    Participant

    I want to set a profile field where a user will list his experience in a particular organization. From and To.. I tried Date -> Range but it just renders single dropdown. The best possible scenario would be having a datepicker with range.?
    I’ve installed BuddyPress Xprofile Custom Fields Type but even this doesn’t have a range date picker.
    Anyone has any suggestion/solution would be appreciated.

    #268725
    willallen83
    Participant

    I struggled with this for weeks. It never worked out well for me.
    I used the Register Helper add-on plugin to add custom fields to the PMPro registration. I tried the above mentioned fixes, but nothing I tried let the PMPro registration process communicate with the BuddyPress (basically, I wanted one registration page to fill out the BuddyPress profile AND the necissary PMPro info).
    Whichever way I tried it, they remained seperate. Of course, the PMPro registration process did add the user to BuddyPress, but with an empty profile, regardless of the custom fields that I added.

    FINALLY, after MANY hours of working with this, I tried s2Member. This plugin is much more involved to configure, BUT it works perfectly AND integrates well with MailChimp. So now, I not only have integration with BuddyPress (specifically the profile, although the display is a bit off), but also with Mailchimp. And, this means that I can have different mail-lists or mail-list groups within Mailchimp! Perfect 🙂

    Basically, what I am saying is that if you want a better integration, go with s2Member.

    Note: I did not pay the $300 / year for paid membership pro support (too expensive for me), maybe they would have been able to help me resolve this issue. I did scour the forum and glean every bit of info I could to solve this without paying, but to no avail. BUT, with s2Member, it is free AND only $80 one time for the Pro version of the plugin.

    Good luck!

    And, if anyone sees this and has a solution, please add. As people (I assume because I was) are still looking for a solution.

    michaeltcarlson
    Participant

    Thanks so much for the solution above. How can I modify the code to apply only to a specific page:

    .field-visibility-settings-toggle {
    display: none !important;
    }
    .field-visibility-settings-notoggle {
    display: none !important;
    }

    In my case, I’d like “This field can be seen by Anyone” removed from the registration page (#371), but still be visible on a users profile, thus giving users some control over the privacy levels of their fields.

    Thanks in advance for the assistance.

    David Cavins
    Keymaster

    You can save extra things manually on the bp_core_signup_user hook:
    https://buddypress.trac.wordpress.org/browser/tags/2.9.1/src/bp-members/bp-members-functions.php#L1900

    But I imagine that the simpler answer would be to use Profile Fields. If you add profile fields to the base group, then they appear on the registration form and are saved at signup. https://codex.buddypress.org/administrator-guide/extended-profiles/

    Best,

    -David

    #268643
    sostenibles
    Participant

    @shanebp Thank you very much for your reply.
    I got the correct file and issue is solved.
    Problem was because fields indicated in the code have to be exact to the field name, and that includes both spaces and accents.
    I am displaying more than one field now, and code looks like this (see the accents and spaces!):

    <?php bp_member_profile_data( ‘field=Área de negocio’ ); ?>
    <br>
    <?php bp_member_profile_data( ‘field=Comunidad Autónoma’); ?>
    <br>
    <?php bp_member_profile_data( ‘field=La empresa’); ?>

    #268610
    sostenibles
    Participant

    Hi all!

    I’m building my new site (www.sostenibl.es) using WordPress v.4.8.2 and Buddypress v.2.9.1

    Currently, the members directory displays members’ names and last activity. But I want some profile fields to appear in the BP directory page instead.

    I’ve found a proposed solution in the forum, but it’s not working, and I do not know what I am doing wrong –needless to say that I have no coding experience whatsoever!

    Following other entries in this forum, I was trying to modify the members-loop.php located at bp-templates/bp-legacy. I found the section “if you want to show specific profile fields….”, and added the line: bp_member_profile_data( ‘field=la-empresa’ ).
    However is not working.

    I tried making changes to members-loop.php located at bp-themes/bp-default, just in case 🙂 ; but did not work either.

    I also tried this: <?php bp_member_profile_data(array(‘field’ => ‘la-empresa’)); ?>
    No results 🙁

    I tried also to use the field id instead of the field name. But it’s not working either.
    I am confused with the field name thing, and I am at a point where I don’t know where to find the field name unless it’s the name that I gave to the field (field name I gave has spaces e.g “la empresa”)

    I am really lost and do not how to get this to work. Please help!!

    Thanks in advance!

    #268427
    metalhead
    Participant

    Put it all in one column:

    /* Aligns Registration Profile Details fields to the left */
    #buddypress .standard-form #basic-details-section,
    #buddypress .standard-form #blog-details-section,
    #buddypress .standard-form #profile-details-section {
        width: 100%;
    }
    #profile-details-section {
        margin-top: 20px;
    }

    And the finish button too (recommended):

    #buddypress .standard-form#signup_form div.submit {
        float: left!important;
        margin: -12px 3px 3px 3px!important;
    }

    That should line it all up in 1 row. Congrats on not paying someone $1000 for that info 🙂

    #268363
    learntodesign
    Participant

    Is there any function I can tap into to set a default search upon going to the members page? For example the search page will automatically generate a $_GET request based on specific profile fields and go to /members/?field_6=Teacher&field_8=apple, instead of the user having to manually select these fields and then submit the form.

    I know I can do something similar by adding a custom query to the members loops as designated here:

    Members Loop

    However, this does not edit the form directly and only the members loop, and is not clean in my opinion.

    smurfworks
    Participant

    Hey team,

    I’ve searched older replies for an answer on how to do this but can’t seem to find anything that matches this scenario. I have a profile field group of custom fields that currently sits within the ‘view’ and ‘edit’ profile tab on buddypress. For both of these views, I’d like to move editing this single group to under the settings tab.

    I assume there’s probably some custom development involved, however as we have this great implementation of field management, I’m hoping there’s a way I can move it under the settings menu and still re-use a bunch of this functionality that’s all ready to go.

    I’m sorry if this topic is inappropriate for this forum, it’s my first time asking for help here.

    Thanks!

    #268338

    Hi guys,

    I have a WordPress MultiSite (With 9 SubSites) where I’m running BuddyPress 2.9.1, with the Multi Blog feature enabled. The problem is, when I try to edit the profile fields, I see that there are several instances of the same First Name and Last Name fields listed there (It looks like 8 sets of duplicates). And because these fields can’t be deleted, I really need some help in fixing this bug and removing these extra fields.

    Has anyone encountered this issue before? Any help would be much appreciated.

    #268281
    mixalhs89
    Participant

    Hello,
    How can i translate the label, like Name, of buddypress profile fields with polylang;

    #268249
    theredeclipse
    Participant

    I come up with this piece of code, it just add class for fields but its enough for me

    function bp_add_class($elements){
        $elements['class'] = 'field';
        return $elements;
    }
    add_action('bp_xprofile_field_edit_html_elements','bp_add_class');
    #268209
    coolhunt
    Participant

    Hey Guys,

    anyone have any experience in either the V2 wp-json?
    Im trying to return results for a search http://domain-com/wp-json/wp/v2/users/%5Bsearchterm%5D

    does anyone know the url string for this? I suspect that this probably doesnt read profile fields?…

    simon2902
    Participant

    Hi

    previous forum posts provide no answer to this question:

    How can I add target=”_blank” in Profile Fields Descriptions? This is needed for user registration, specifically terms of use hyperlinks, but it is always removed when I try to enter it.

    Suggestions?

    Thanks
    S

    lofiz
    Participant

    I have used https://en-gb.wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ and https://en-gb.wordpress.org/plugins/pods/ to create a new taxonomy that users can be part of.

    Example usage: Users can be part of ‘team red’, ‘team green’ or ‘team blue’.

    I would like to enable any user to send private messages to all members of a selected team.

    I have looked at mass mailing plugins and am new to BP. My thoughts are that either there is a way to code a private message procedure to search through users and send a message to the matching profiles. OR, look into Groups.

    If it is the latter, I would like Groups to be completely hidden from non-group members.

    Any thoughts welcome. Thank you.

Viewing 25 results - 676 through 700 (of 3,880 total)
Skip to toolbar