Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 4,901 through 4,925 (of 5,755 total)
  • Author
    Search Results
  • #72572
    peterverkooijen
    Participant

    I’m still on 1.1.3. In 1.1.3 xprofile only gets synchronized with wp_usermeta when the user updates his account, which means you can never count on the data being there, which makes it pointless.

    Lousy synchronization between xprofile and usermeta is not a bug, it’s a conscious design feature. Why? I’ve brought this issue up many times and have never received a clear answer.

    I use a custom function like this below to synchronize member data upon registration into all the different, unconnected places in the database where data is stored:

    function synchro_wp_usermeta($user_id, $password, $meta) {
    global $bp, $wpdb;

    $uid = get_userdata($user_id);
    $email = $uid->user_email;

    $fullname = $meta[field_1];

    ... whatever you need here ....

    update_usermeta( $user_id, 'nickname', $fullname );
    update_usermeta( $user_id, 'first_name', $firstname );
    update_usermeta( $user_id, 'last_name', $lastname );

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET display_name = %s WHERE ID = %d", $fullname, $user_id ) );
    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_url = %s WHERE ID = %d", bp_core_get_user_domain( $user_id ), $user_id ) );
    }
    add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);

    Not sure if this still works in 1.2. I had posted my work-arounds under ‘FAQ: How To, Code Snippets and Solutions’, but they have been deleted. So I guess they solved the issues in 1.2?

    To synch xprofile you’d need to create the fields in xprofile that you have in wp_usermeta and then do something backwards like the above function, if that hook etc. is still valid.

    #10526
    Leland
    Participant

    I am using the most recent versions of BP and WP and user registration seems to work fine sharing the username and password. How can I make BP import / sync additional usermeta fields? I have custom usermeta fields for my WP install and I create custom xprofile fields but they don’t seem to sync so I have two separate user tables basically. Is there any way I can make sure the xprofile fields update the wordpress usermeta everytime there is a change? or only use 1 table for both?

    I have searched everywhere to get more info on this topic but can’t seem to get anywhere. Also all of the mass user importers for BP 1.2 don’t seem to work with the regular WP install so I’m kind of stumped. I would be happy to sponsor some support help on this. Thanks.

    mgpix
    Participant

    Hello,

    I’m using BP 1.2.3 on a WordPress 2.9.2 install with the WP-FB-AutoConnect plugin.

    On registration, WP-FB-AutoConnect automatically set the user first_name and last_name and I like that. However, once registred users can not change these first_name and last_name when editing their BP profile.

    Is it possible to let members change the WP user data in adition the the BP profile fields ?

    #72487
    jwack
    Participant

    hmmm, any idea how to add the a paragraph under the “name” field, under profile details? I am not seeing where its being added? Here is where it pulls in the custom fields, but the name field can’t be edited to add a description like the other custom fields in the admin.

    <?php if ( 'textbox' == bp_get_the_profile_field_type() ) : ?>

    <label for="<?php bp_the_profile_field_input_name() ?>"><?php bp_the_profile_field_name() ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ) ?><?php endif; ?></label>

    <?php do_action( 'bp_' . bp_get_the_profile_field_input_name() . '_errors' ) ?>

    <input type="text" name="<?php bp_the_profile_field_input_name() ?>" id="<?php bp_the_profile_field_input_name() ?>" value="<?php bp_the_profile_field_edit_value() ?>" />

    <p><?php endif; ?>

    newbie999
    Participant

    Hello. I added the code below in wp-content/plugins/buddypress/bp-themes/bp-default/members/members-loop.php, to display additional profile fields in the member directory and to display the member’s role (either ‘Subscriber’ or ‘Provider’). I only have 2 types of roles – Subscribers cannot edit posts and Providers can edit posts. In the code below, I specifically checked for the user’s role to determine whether I need to display ‘Subscriber’ or ‘Provider’.

    Questions:

    – is there a way to check for the capability instead – i.e., if the user can ‘edit posts’ then I will display ‘Subscriber’, otherwise I will display ‘Provider’? If so, can you please let me know how to do that as I have not been able to figure it out.

    – is there a way to display a newline so that ‘Subscriber’ or ‘Provider’ will display on the next line, below the member’s title and company name. I tried to echo “\n” but it’s not outputting a newline and I have no idea why.

    Thank you for the help.

    <?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 regadless of the number of fields you show):

    *

    * bp_member_profile_data( ‘field=the field name’ );

    */

    if( bp_get_member_profile_data ( ‘field=Title’ ) )

    echo bp_member_profile_data( ‘field=Title’ ), ‘ (‘, bp_member_profile_data( ‘field=Company’ ), ‘)’, ‘ – ‘;

    $user = new WP_User( bp_get_member_user_id() );

    if ( $user->roles[0] == ‘subscriber’ )

    echo ‘Subscriber’;

    else

    echo ‘Provider’;

    ?>

    r-a-y
    Keymaster

    I’d like all the subscribers/authors/etc (aka artists) for a given blog (aka art project) to be listed at the top of the blog’s index.php page, with a few fields from the xprofile (bio, specialty, etc.). Ideally, I’d get them to echoed in a way that was easy to feed into a snazzy jquery slider gizmo.

    Should be possible, Nathan, using some WP template tags combined with that code snippet I posted above.

    I’d help out if you can guarantee me some free lodging in that art monastery some time in the future ;)

    #72341
    Mike Pratt
    Participant

    @xezo that is correct. I thought he was talking about access to all profile fields for edit/delete, for which you do have access via the extra Admin bar menus created by BP for admins. Those are the ones I use all the time (fixing avatar crop screw ups, as an example)

    So, from that perspective, the only use for Skeleton Key would be for additional stuff introduced by less that robust plugins, no?

    rsqst
    Participant

    Thanks for your help @r-a-y

    It’s for the next version of this website: http://www.artmonastery.org

    It’s for a network of artists. Each blog will be a specific art project, and each subscriber/author will be an artist participating in that art project. Many artists will be participating in many different art projects, and I’d like their bio information to be publicly displayed on each blog/project.

    The blogs will be the public “portal” for each of the art projects, which we will us to promote the projects. The groups that are associated with each blog (with the group blog plugin) will be the internal communication tool for the artists.

    I’d like all the subscribers/authors/etc (aka artists) for a given blog (aka art project) to be listed at the top of the blog’s index.php page, with a few fields from the xprofile (bio, specialty, etc.). Ideally, I’d get them to echoed in a way that was easy to feed into a snazzy jquery slider gizmo.

    artists.

    I’m trying to build a resource for these artists that is really 1 database with many faces, and given that I love wordpress, buddypress seemed like the best way to do that. It’s just stretching my abilities, at the moment ;)

    #10470
    nemci7v
    Participant

    A blog community on which users have their own profiles and post their own articles (in one blog – not multiple MU blogs)? Also with custom login screens. They would just have a screen with a new post form and some custom fields. Lastly, would I be able to display popular articles?

    Buddypress seems very exciting, not sure how powerful it is.

    CleboMa
    Member

    I use some checkboxes in my extended profile fields, to have a better layout in the members-profile the clicked values should not be seperated with ‘,’ I want them seperated in a new line with a or as a list. Where can I change this.

    #72150
    5963314
    Inactive

    Hi Paul,

    I was thinking about that option. Some fields can be very big, what’s the datatype used for multi-line text box? I want to allow my users to add maximum of 1-2 pages worth of text in these fields.

    Also, is there a way to enable TinyMCE to format text in multi-line text box?

    Final question: If I use a Drop down select box, can I direct users to a different group based on their response.

    Lets say I create two groups – Football and Hockey.

    I get my user to select their sport, if the select Football, they get directed to Football group to fill out football profile, other wise they get directed to Hockey group to fill out hockey profile.

    #72101
    holdenandmason1
    Participant

    @dre1080, my post was about creating an advanced search page to search members based on the profile fields. Like the original poster said, “For example you could search for members, by age, location, hobby in one search (taking these things from created fields in profile.”

    You could use a Google search to do what you’re asking for.

    #72003
    gabrielcrowe
    Member

    more experimentation leads me to this solution:

    items from the form are passed through global.js

    i found and modified the posted items to include /match my new fields:

    /* Default POST values */

    var object = ”;

    var item_id = j(“#whats-new-post-in”).val();

    var content = j(“textarea#whats-new”).val();

    var artist = j(“input#artist”).val();

    var track = j(“input#track”).val();

    /* Set object for non-profile posts */

    if ( item_id > 0 ) {

    object = j(“#whats-new-post-object”).val();

    }

    j.post( ajaxurl, {

    action: ‘post_update’,

    ‘cookie’: encodeURIComponent(document.cookie),

    ‘_wpnonce_post_update’: j(“input#_wpnonce_post_update”).val(),

    ‘content’: content,

    ‘artist’: artist,

    ‘track’: track,

    ‘object’: object,

    ‘item_id’: item_id

    },

    and it worked just fine. _POSTed items are now available in my bp-custom.

    #71725
    Brajesh Singh
    Participant

    hey, you are most welcome.

    well, you will need to edit registration.php

    here is my take on it.

    it will list all the fields from all the profile groups,and allow users to fill them. so please beware of it.

    http://bpdev.pastebin.com/RLreXE7X

    If you want to restrict to 1 or two profile groups, change the argument from

    bp_has_profile( )

    In my edited code and it will work

    And a little bit detail, I have removed the argument for bp_has_profile( ), so it lists all profile groups and then put then collected field ids in an array, which is passed via

    hidden field ‘signup_profile_field_ids`

    #71723
    Gene53
    Participant

    Hi Brajesh and thanks for the quick response.

    I think your code is great but my problem is that the registration page only show whatever fields that are in group 1 (default BP function) and I need a few extra fields to be filled out in the signup page, any way around this such as showing the group 2 fields in register?

    Thanks,

    Gene

    #71716
    Gene53
    Participant

    Dang, I have to reopen this thread, one thing was solved but another problem was created.

    Brajesh’s code solved my “user can’t edit his name field” but I then realized that the registration page only showed the profile name field (which I renamed Username) which was the only field I had in profile group 1.

    My problem now is that I need extra fields upon registration but I still want the name field hidden or not editable in the edit profile screen.

    Is there something I can change in Brajesh’s code (or new code altogether) that will accomplish this?

    Thanks,

    Gene

    #71700

    In reply to: Forum size issues

    norrismp
    Participant

    I changed that to 100% and it still doesn’t change. Here is the Tables/Forum section from default.css:

    /* > Data Tables


    */

    table {

    width: 100%;

    }

    table#message-threads {

    margin: 0 -20px;

    width: 100%;

    }

    table.profile-fields { margin-bottom: 20px; }

    div#sidebar table {

    margin: 0 -16px;

    width: 117%;

    }

    table tr td, table tr th {

    padding: 8px;

    vertical-align: middle;

    }

    table tr td.label {

    border-right: 1px solid #eaeaea;

    font-weight: bold;

    width: 25%;

    }

    table tr td.thread-info p { margin: 0; }

    table tr td.thread-info p.thread-excerpt {

    color: #888;

    font-size: 11px;

    margin-top: 3px;

    }

    div#sidebar table td, table.forum td { text-align: center; }

    table tr.alt {

    background: #f4f4f4;

    }

    table.notification-settings {

    margin-bottom: 20px;

    text-align: left;

    }

    table.notification-settings th.icon, table.notification-settings td:first-child { display: none; }

    table.notification-settings th.title { width: 80%; }

    table.notification-settings .yes, table.notification-settings .no { width: 40px; text-align: center; }

    table.forum {

    margin: -9px -20px 20px -20px;

    width: 100%;

    }

    table.forum tr:first-child {

    background: #fafafa;

    }

    table.forum tr.sticky td {

    background: #FFF9DB;

    border-top: 1px solid #FFE8C4;

    border-bottom: 1px solid #FFE8C4;

    }

    table.forum tr.closed td.td-title {

    padding-left: 35px;

    background-image: url( ../images/closed.png );

    background-position: 15px 50%;

    background-repeat: no-repeat;

    }

    table.forum td p.topic-text {

    color: #888;

    font-size: 11px;

    }

    table.forum tr > td:first-child, table.forum tr > th:first-child {

    padding-left: 15px;

    }

    table.forum tr > td:last-child, table.forum tr > th:last-child {

    padding-right: 15px;

    }

    table.forum tr th#th-title, table.forum tr th#th-poster,

    table.forum tr th#th-group, table.forum td.td-poster,

    table.forum td.td-group, table.forum td.td-title { text-align: left; }

    table.forum td.td-freshness {

    font-size: 11px;

    color: #888;

    }

    table.forum td img.avatar {

    margin-right: 5px;

    }

    table.forum td.td-poster, table.forum td.td-group {

    min-width: 130px;

    }

    table.forum th#th-title {

    width: 100%;

    }

    table.forum th#th-postcount {

    width: 1%;

    }

    #71667
    Paul Wong-Gibbs
    Keymaster

    A quick google reveals several bulk-import scripts and plugins for WordPress/MU. Have a look at http://www.dagondesign.com/articles/import-users-plugin-for-wordpress/.

    Regarding bulk import of xprofile data: Manjor Kumar had done some BuddyPress-specific import plugins for a very early version, but I can’t vouch for if they still work:

    https://wordpress.org/extend/plugins/bulk-import-members-users/

    and

    https://wordpress.org/extend/plugins/user-import-for-buddypress-all-fields/

    #71631
    Gianfranco
    Participant

    Ok, DJPaul, I just did: https://trac.buddypress.org/ticket/2283

    #71628
    Paul Wong-Gibbs
    Keymaster

    Confirmed; please report this as bug on http://trac.buddypress.org, using your username and password from this site. It affects both the Profile Fields UI, both backend and frontend (missing a stripslashes call).

    Gianfranco
    Participant

    I got a profile field with a drop down menu and for some options there are apostrophes.

    When I save it, the apostrophe generates a backslash before itself.

    Example:

    It’s never enough

    Becomes:

    It\’s never enough

    This is quiet annoying. Any fix?

    Gene53
    Participant

    Hi,

    Being that my site is Username only (I have changed Name to Username in General Settings), I only have that field in Base and other fields in a different group.

    How can I hide the Base group in “edit profile” so the user can’t change his username?

    Cheers,

    Gene

    #71597
    Gianfranco
    Participant

    jivany, thanks a lot for taking an interest in this. I appreciate.

    I eventually ended up re-arranging things to have the best with what BP provides (limitations?).

    But I will test the above code and see if I get want I wanted.

    I’ll report later.

    Thanks.

    ;-)

    #71592
    jivany
    Participant

    @gian-ava: For your second question, check out this post https://buddypress.org/forums/topic/faq-how-to-code-snippets-and-solutions#post-13243

    I haven’t tried this but it would suggest you could do something like:

    <?php if ( bp_has_profile('profile_group_id=9') || bp_has_profile('profile_group_id=7') ) : ?>
    <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <div id="widget1">
    <?php if (bp_the_profile_group() == "9") : ?>
    // Do whatever you want with group 9
    <?php endif; ?>
    <?php if (bp_the_profile_group() == "7") : ?>
    // Do whatever you want with group 7
    <?php endif; ?>
    </div>
    <? endwhile; ?>
    <?php endif; ?>

    The only part I’m not sure about is if you need the first call to bp_the_profile_group() on the second line (after the start of the while loop).

    #10342
    peterverkooijen
    Participant

    I want to add one or two fields on an event registration form in a plugin to update the xprofile data of that user. I have no clue where to start with this.

    The query would presumably look something like this:

    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->bp_xprofile_data} SET value = %s WHERE ID = %d AND field_id=2", $companyname, $user_id ) );

    Lets say I want to create a form from scratch to update one field ‘companyname’ in xprofile. If there’s already data in that field it should echo that on the form as value.

    How do I echo the value? What do I need to get the data from the form to the query? How do I make sure the update is made in the records of the logged-in user?

    Is there an example anywhere of a basic xprofile update form? Built-in examples in BP all use arrays and loops, they’re not for specific single fields in xprofile. It’s very hard to figure out what’s going on if you’re not a php programmer.

Viewing 25 results - 4,901 through 4,925 (of 5,755 total)
Skip to toolbar