Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 5,326 through 5,350 (of 5,755 total)
  • Author
    Search Results
  • #51790

    phpMyAdmin import/export of the tables would probably be easiest? There isn’t a method within BP to do this unfortunately, and I’m not sure it’s on the roadmap either.

    #6412
    3612275
    Inactive

    Is it possible to create your own prebuilt profile fields and then have them saved? I’m getting tired of typing out every NFL, MLB, NHL, NBA, etc team into a profile field grouping. I would just like to make it once, then import it somehow on different installs.

    Hopefully it’s possible :).

    #51707
    Lriggle
    Participant

    Thanks guys, I’ll take a look!

    #51700
    peterverkooijen
    Participant

    I see the html for the xprofile input fields is in function get_edit_html in bp-xprofile-classes.php:

    switch ( $this->type ) {
    case 'textbox':
    $html .= '<div class="signup-field">';
    $html .= '<label class="signup-label" for="field_' . $this->id . '">' . $asterisk . $this->name . ':</label>';
    $html .= $this->message . '<input type="text" name="field_' . $this->id . '" id="field_' . $this->id . '" value="' . attribute_escape( $this->data->value ) . '" />';
    $html .= '<span class="signup-description">' . $this->desc . '</span>';
    $html .= '</div>';
    break;

    So I guess I could add onkeyup=”copyinput()” there, but then all xprofile fields will get that. Would that mess up the system? The Javascript refers to the fields by ID.

    According to Jeff Sayre this method will be deprecated in version 1.1, but I need a temporary solution before I make the switch.

    Trying that now…

    #6378
    tr123
    Participant

    Hi

    I understand from a previous post I made that an advanced search is not yet available. What I need is a search plugin where user can make more than one search for a member. For example you could search for members, by age, location, hobby in one search (taking these things from created fields in profile.

    I would be happy to pay towards for this as a paid plugin or make a donation if its something other people are looking for to.

    #6377
    tspraul
    Participant

    Everything seems to be installed fine. I created a blog with posts and can view it fine on its own. But when I go to the blogs directory I get the message “No blogs found. Blogs must fill in at least one piece of profile data to show in blog lists.” I filled out the member profile fields I could find, but no change. What exactly do I need to fill in?

    WPMU: 2.8.4a

    Buddypress: 1.0.3

    #6362
    peterverkooijen
    Participant

    Is there already a plugin that replaces WP profile edit (wp-admin/profile.php) with BP profile edit? Or auto-forwards with zero second delay to a custom BP profile/password/email edit page?

    What would be the hook for such a plugin?

    Users end up on WP profile edit after getting a new password and other cases. The first thing they see is the Admin Color Scheme picker, obviously super important.

    Then they see all those profile fields that don’t synch with xprofile at all, so they’ll waste their time filling them out.

    And Jabber / Google Talk! Does anyone actually use that?

    The only thing that you really need from that page is the new password thingy, all the way at the bottom…

    #51470

    In reply to: Import existing user

    peterverkooijen
    Participant

    Apparently Manoj Kumar’s very essential users import plugin does not work with the latest version:

    The Big K at 19:19 on 9 August 2009

    Hi Manoj,

    The plugin is not compatible with WPMU 2.8.3 & Buddypress 1.0.3. Could you please fix it.

    This is also the version of the plugin I’ve tried – I gave the wrong link earlier.

    In my installation the plugin worked for the essentials – username, email address – but nothing was added to meta in wp_signup and the xprofile fields.

    Next I’ll try it in a fresh install of Buddypress 1.0 RC… :-(

    #51449

    In reply to: Show xprofile data?

    Treblamah
    Participant

    This should help:

    https://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-profile-data-loop-bp_has_profile/

    I had to separate the fields by group to pull only one field at a time that preserved the formatting. The other ways I found to pull individual field data produced text without line breaks.

    #6353
    peterverkooijen
    Participant

    Another dumb question: How can I show xprofile data on the profile pages?

    For example, I have a field called ‘introduction’ (field_4). How can I show the contents under profile-name and avatar?

    Must have been asked before, but this was the only thread I could find about it.

    #6352
    peterverkooijen
    Participant

    This has probably been asked a million times, but I can’t find it: Is there a built-in way to only show the required fields on the initial signup form and leave the rest for the profile editing form?

    What’s the best way to hide the non-required fields? I’ll now resort to CSS trickery…

    EDIT: Running into problems with CSS trickery. I can hide the input fields using their ID’s (“field_3” etc.), but then I still get the labels. The labels only have this:

    <label class="signup-label" for="field_3">

    Can I somehow use that “for=” in CSS?

    I can’t hide the whole signup-field block, because field_1 and field_2 are required. I can’t hack CSS id’s or classes into core files, because the labels and inputs are generated by script.

    r-a-y
    Keymaster

    Ditto!

    peterverkooijen
    Participant

    I’d like to test this plugin as well.

    #51392
    Nightlyfe
    Participant

    can the default / built in profile system be extended to have advanced & fully developed profiles (custom fields and such)?

    what is gained by going with bp if so?

    Nightlyfe
    Participant

    Did this get released?

    #51279
    peterverkooijen
    Participant

    The html of the custom xprofile fields is generated by yet another function; get_edit_html() in bp-xprofile-classes.php. So if you want to change anything in the custom fields, including the * for required fields, you’ll need to copy/rename that function to bp-custom.php as well.

    EDIT: …which is not straightforward:

    Fatal error: Call to undefined method BP_XProfile_Field::custom_get_edit_html() in /serverpath/wp-content/mu-plugins/bp-custom.php on line 256

    #51271
    peterverkooijen
    Participant

    If so, the display name is still editable via the “Edit Profile” screen (like I stated above). Not sure what would happen if you attempted to change the display name… would it sync up with the usermeta table?

    Yes it does, that’s what the original xprofile_sync_wp_profile() already did, although I think you can turn it off in the admin area. Even if you did that, it wouldn’t mess up anything vital.

    My main concern was to consistently get a separate first name + last name in the database, because I need them for several other scripts. That only needs to happen on activation.

    Also I needed to learn how to use the fullname value in a function so I could autogenerate a username from it.

    Re: rearranging the signup page… BP 1.1 will enable you to move fields around on the sign up page. Check out testbp.org as an example of a customized register page.

    I need my site done before Labor Day or September 1st really. And the new more versatile template system does not solve any of my other issues.

    #51270
    peterverkooijen
    Participant

    Temporary solution how to customize registration form until 1.1 arrives, FYI and my own reference:

    Changed this line in function bp_show_register_page() in functions.php in my template:

    require ( BP_PLUGIN_DIR . '/bp-core/bp-core-signup.php' );

    to

    require ( 'custom-signup.php' );

    Copied bp-core-signup.php to the template folder, renamed to custom-signup.php.

    Go customize! :-)

    Unfortunately the custom fields are generated by yet another core function:

    do_action( 'signup_extra_fields', $errors );

    This action is associated with the function xprofile_add_signup_fields in bp-xprofile/bp-xprofile-signup.php.

    Copied the function to bp-custom.php, renamed action and function to custom_signup_extra_fields and custom_xprofile_add_signup_fields.

    Used this CSS trick to hide the avatar upload. Will use the same trick to hide the username field.

    #51269
    r-a-y
    Keymaster

    Oh sorry! I think I’m confusing what you’re trying to do.

    You’re trying to auto-generate the username based off the display name xprofile field, correct?

    If so, the display name is still editable via the “Edit Profile” screen (like I stated above). Not sure what would happen if you attempted to change the display name… would it sync up with the usermeta table?

    My guess from the post I wrote above is “no”, since you only have your function running when a user has activated their account. But I guess that’s the point!

    —

    Re: rearranging the signup page… BP 1.1 will enable you to move fields around on the sign up page. Check out testbp.org as an example of a customized register page.

    #51259
    peterverkooijen
    Participant

    This function for bp-custom.php adds fullname from xprofile field_1 to wp_usermeta.

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

    $fullname = $meta[field_1];
    $space = strpos( $fullname, ' ' );

    if ( false === $space ) {
    $firstname = $fullname;
    $lastname = '';
    } else {
    $firstname = substr( $fullname, 0, $space );
    $lastname = trim( substr( $fullname, $space, strlen($fullname) ) );
    }

    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);

    It shouldn’t be a big step to make the fullname lowercase, strip the spaces and store it as username.

    Make lowercase and strip space looks something like this:

    $str = strtolower($str);

    $str = str_replace(' ', '', $str);

    But does the system even allow changing the username at the wpmu_activate_user stage?

    The username is stored in four places in the database:

    wp_signups -> user_login

    wp_users -> user_login

    wp_users -> user_nicename (?!)

    wp_users -> user_url (as last part)

    Manually changing the username at these points in the database does NOT screw up my system. Login with email address continues to work fine with the same password. The profile page and links function as normal. :-)

    That is good news. It means it is possible to simply update the username from this same function.

    Now I just have to figure out the PHP and the queries for those four fields. Any pointers apprecriated!

    EDIT: Is $user_id a number or the username? That could complicate things…

    I assume $user_id is the username. Can I make this a two-stage rocket? First run the synchro_wp_usermeta function and then a separate function to deal with username, synchro_name_username? Put them in a plugin with something like this at the bottom?:

    add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);
    add_action( 'wpmu_activate_user', 'synchro_name_username');

    Would that execute the functions in the right order?

    #51213
    peterverkooijen
    Participant

    BTW, how will fullname/firstname+lastname be handled in the new version? Will it be synchronized with wp_usermeta? Or will there be built-in fields in xprofile? Or another solution?

    Will there be an option to make them required? Will you offer an option to autogenerate username from fullname?

    Trying to decide which way to go for temporary solutions.

    peterverkooijen
    Participant

    When I do this:

    $fullname = $wpdb->get_var("SELECT meta FROM $wpdb->signups");
    echo $fullname;

    I get the serialized content of the first meta field in wp_signups:

    a:8:{s:7:"field_1";s:13:"Julius Caesar";s:18:"xprofile_field_ids";s:2:"1,";s:20:"avatar_image_resized";s:84:"/serverpath/wp-content/blogs.dir/1/files/avatars/0/caesar.jpg";s:21:"avatar_image_original";s:84:"/serverpath/wp-content/blogs.dir/1/files/avatars/0/caesar.jpg";s:6:"public";s:1:"1";s:7:"lang_id";i:1;s:8:"blogname";s:9:"theempire";s:10:"blog_title";s:16:"The Roman Empire";}

    The function inserted this crap also into the wp_usermeta fields. Success! (Sort of…)

    The bit of data I need is the fullname, the second bit, in this case ‘Julius Caesar’. I’d need the second bit of data from the user with the activation key.

    How would I add that to the query?

    I’ll first try this:

    $fullname = $wpdb->get_var("SELECT meta FROM $wpdb->signups WHERE activation_key = %s", $key);
    echo $fullname;

    Nothing… :-(

    I probably had to add $key as an argument. Trying again after some food…

    #51172
    gerikg
    Participant

    Sorry about the empty response. I thought I had it and when it didn’t work it screwed up. I edited out my post.

    Okay this is the fix I came out with. I created a new group in BP profile called signature and the field name signature too.

    In BBpress in the post.php I inserted (note I don’t know PHP, if anyone can shorten this would be appreciated):

    <?php if ( bp_has_profile('user_id='.get_post_author_id().'&profile_group_id=XXX') ) : ?>
    <?php while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
    <?php if ( bp_profile_group_has_fields() ) : ?>
    <?php while ( bp_profile_fields() ) : bp_the_profile_field(); ?>
    <?php if ( bp_field_has_data() ) : ?>
    <?php bp_the_profile_field_value() ?>
    <?php endif; ?>
    <?php endwhile; ?>
    <?php endif; ?>
    <?php endwhile; ?>
    <?php else: ?>
    <?php endif;?>

    Just replace XXX with your group id #, mine was 3.

    What it doesn’t do is toggle between signature, anyone want to try that?

    #51107
    omgitsrfb
    Participant

    I got the same issue with an upgrade to WPMU2.8.4a and BP1.0.3. Have two issues one is the one mentioned above by Arezki

    Hi all: I noticed that the listing of members using the alphabetical feature is not working. When you go to: http://tatazara.com/members and try any letter like F or S for Francis Stevenson, you get the link: http://tatazara.com/members#f but the page stays at /members directory. Any thought?

    and the other is that is gives me the ‘ol:

    No members found. Members must fill in at least one piece of profile data to show in member lists.

    error that othe threads have brought up.

    I upgraded to bp1.0.3 to get rid of the second issue per Andy’s instructions in a previous thread, but that didn’t help.

    the groups and blogs alpha directory work just as advertised but not the member alpha directory. yes, people have entered info into profile fields. the member search function works fine.

    Anyone got an idea about this? Could it be something with the different types of name fields?

    Thanks in advance for your advice.

    peterverkooijen
    Participant

    The ideal registration form would look like this:

    – fullname

    – email address

    Both fields would of course be mandatory. Ideally fullname would be checked for two or more parts, but xprofile_sync_wp_profile() can handle one part input and I can live with an occassional missing last name.

    I use a jQuery validation script on another form in my site, that I may also be able to use on the registration form. As far I understand it doesn’t interfere with anything on the server side.

    Username would be generated behind the scenes from fullname.

    Many other member information fields would be optional under edit profile.

    If I can figure out how to select fullname from meta in wp_signups, adapting xprofile_sync_wp_profile() shouldn’t be that difficult.

    Or are my latest attempts above still nowhere near a solution? If you see the obvious mistakes, please point them out.

Viewing 25 results - 5,326 through 5,350 (of 5,755 total)
Skip to toolbar