Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 5,201 through 5,225 (of 5,755 total)
  • Author
    Search Results
  • #56613

    In reply to: BP Member Filter

    Xevo
    Participant

    I believe the xprofile fields are the fields like “name”, so basically your users their account details.

    I like the fact that you can order your users like this, A to Z is kinda… lame and outdated. I’ll definately try this out later. Thanks JJJ.

    Edit: JJJ was 51 seconds faster then me. :)

    #56612

    In reply to: BP Member Filter

    Extended Profile – Basically the profile fields you setup for your audience

    An example would be here at buddypress.org, if you wanted to search for people who put “puppies” in their interests field. Rather than searching for puppies and possibly getting someone with the name “I Love Puppies” it will isolate your search down to the field you’re searching in.

    Clear as mud? Haha

    #56611

    In reply to: BP Member Filter

    stwc
    Participant

    I want to thank you for this, but I don’t even know what ‘xprofile fields’ refers to! ;-)

    #7554

    Topic: BP Member Filter

    in group forum Third Party Plugins

    Super preliminary “you broke it you bought it” edition… This plugin for BuddyPress will allow you to filter users by XProfile fields when viewing your members directory.

    http://johnjamesjacoby.com/files/2009/11/bp-filter.zip

    Just waiting for the WP plugin repo before this goes there.

    index.php and members-loop.php will go in…

    themes/bp-default/directories/members/

    …or in the same location in your custom theme. They will *need* to be modified to fit the xprofile fields you intend to filter users by. I’ve included some examples in index.php.

    Jeff Sayre
    Participant

    This is a free, open source project primarily powered by volunteers’ efforts. So don’t expect to get instant results.

    As r-a-y has stated, there used to be several pre-built fields and site developers also had the option to create their own pre-built fields by importing their list via a .cvs file. But, as Andy states in this thread, that feature is no longer available:

    https://buddypress.org/forums/topic/making-prebuilt-profile-fields

    So, you either have to code a solution yourself or hire a developer to do it.

    By the way, up until two-weeks ago, there was only one official BuddyPress developer. Now there are two. The rest of us are unpaid volunteers–some of us with coding experience, some of us with design experience, and some of us just interested in running social networking sites.

    You can ask for additonal insights on the #buddypress-dev IRC channel. But even there, it is simply a group of developers with their own projects and responsibilities. Only Andy and jjj are the official voices of BuddyPress development.

    pivey
    Participant

    I need to have 5 custom dropdowns each with more than 150 entries.

    So.. this would make a 700-800 manually entered fields one by one….. and lots of Coca Cola :-)

    Besides the solution to dump these option values directly into the DB, is there a solution adding huge amount of values at once like comma seperated etc…?

    Maybe extending the function?

    #7492
    pivey
    Participant

    Hi,

    i have looked around for a solution to implement jQuery multiselect dropdowns and datepicker for dropdowns and date related fields created with “Profile_checkboxes” ….to gather user information and dispaying it on the user profile.

    Especially the multiselect tool will improve multichoice handling.

    Like descriped here:

    Multiselect: http://code.google.com/p/dropdown-check-list/

    and for the datepicker : http://keith-wood.name/datepick.html

    Any idea is greatly appriciated

    #56118

    In reply to: X-Profile Fields

    r-a-y
    Keymaster

    I don’t see this as well in BP 1.1+.

    This was extremely useful!

    But, I’m guessing if you already have these profile fields setup when you upgrade, these fields should still exist.

    It’s only if you decide to create new x-profile fields that you won’t be able to use the CSV option.

    —

    EDIT: Added an enhancement ticket in Trac:

    https://trac.buddypress.org/ticket/1327

    #56042

    In reply to: html in profile fields

    philbow
    Participant

    DJPaul,

    Yes it was wrapped, and no line breaks/whitespace.

    Thanks,

    Phil

    #7441
    Lriggle
    Participant

    Just installed a fresh WP/BP in my test environment with WP2.8.5.2 and BP1.1.2. I’m having an issue setting up certain custom profile fields.

    In our live environment, which is a bit older and running BP 1.0.3, there were some pre-built fields available for things like State and Country pulldowns. I’ve been able to find the CSV files where this info resides in 1.1.2, but the pre-built fields don’t seem to be available.

    Have these been phased out of use in this version of BP, or did I mess something up? I don’t relish the idea of creating 50 pulldown items for the US states…

    #56004

    In reply to: html in profile fields

    Paul Wong-Gibbs
    Keymaster

    I assume you’ve wrapped your code in <?php ?> brackets?

    Also, check you haven’t got any linebreaks or white spaces anywhere.

    #55992

    In reply to: html in profile fields

    philbow
    Participant

    I am putting it into bp-custom.php per the thread referenced. The error is that it can’t pass the headers because it already did.

    Thanks,

    Phil

    #55915
    peterverkooijen
    Participant

    Excellent, that works very nicely. Thanks John James Jacoby!

    Could something like this become part of the core? When you have the name of a member, it should be easy to add associated data. This function makes it a lot easier.

    Edit: The function probably needs to be expanded a bit. I get these slashes (escapes?) in the output:

    Pandora's Box

    I’ll look into that when I have time…

    #55905

    Within the members loop, the problem is that you’re not feeding it any user_id to get the data for… Like I said above, without a user_id, it’s just looking for the $bp->displayed_user->id, which doesn’t exist because when you’re on a directory page, there is no displaued_user->id; you’re not looking at a member…

    Within any member related loop, you will need to make a custom function for that loop and use the user_id available to you to spit out what you need…

    Put this in your bp-custom.php… (haven’t tested this, wrote freehand, lookout for bugs)

    function bp_custom_member_list_xprofile_data( $field ) {
    echo bp_custom_get_member_list_xprofile_data( $field );
    }
    function bp_custom_get_member_list_xprofile_data( $field ) {
    global $site_members_template;

    return xprofile_get_field_data( $field, $site_members_template->member->id );
    }

    Then use it like this on fields that need checking…

    <?php if ( $company = bp_custom_get_member_list_xprofile_data('Company') ) : ?>
    <p><?php echo $company ?></p>
    <?php endif; ?>

    …or like this on fields that don’t…

    <p><?php bp_custom_member_list_xprofile_data('Company') ?></p>

    #55904
    peterverkooijen
    Participant

    Thanks for the additional information. I’ve tried this in members-loop:

    <?php if ( $company = xprofile_get_field_data('Company') ) : ?>
    <p><?php echo $company ?></p>
    <?php endif; ?>

    and this

    <p><?php echo xprofile_get_field_data('Company'); ?></p>

    Still get nothing with either version…

    The search actually searches all fields of the user/group/blog, and returns anything that is relevant to that item. So if any of my xprofile_field’s have a “k” in it somewhere, it will return me. So in theory, it doesn’t suck yet, it just hasn’t been narrowed down. It’s a blank slate and a starting point to building a better search. Search functions also greatly depend on the goal of the website and what results you’re trying to pull out.

    WPMU Sitewide Search plugins currently aren’t for the faint of heart. They take all of your posts/tags/categories for all blogs, lump them into new additional full text database tables, and search those instead. It’s the only real way to do it without a million joins that just wouldn’t make any sense… Problem is you’re duplicating your data twice over into 1 mega huge table, and rebuilding the search index for old posts on a larger website would be an astronomical task that would take days of processing.

    @erich73, those are good recommendations for the directories. Put them in a trac ticket as an enhancement for maybe 1.3?

    #55901

    In reply to: html in profile fields

    What error does it generate? The code looks fine. Where are you putting it. The only thing I can think is that it’s running before the filter is added somehow.

    #55897

    I recommend using the field name, just because it’s easier to keep track of…

    Example…

    <?php if ( $firstname = xprofile_get_field_data('First Name') ) : ?>
    <h3><?php _e('First Name', 'your-theme-textdomain') ?></h3>
    <div class="profile-data-field">
    <?php echo $firstname ?>
    </div>
    <?php endif; ?>

    …will get you the data from the field named “First Name” for the currently displayed user. If there is no user displayed (your account or anyone else’s), it will return false.

    #55887
    peterverkooijen
    Participant

    Doesn’t work for me. Field id ‘2’ is supposed to be company name in my installation, but this in the members_loop.php only displays name and last active:

    <h3><a href="<?php bp_the_site_member_link() ?>"><?php bp_the_site_member_name() ?></a></h3>
    <p><?php do_action( 'bp_core_directory_members_content' ) ?></p>
    <p><?php echo xprofile_get_field_data('2'); ?></p>
    <label><?php bp_the_site_member_last_active() ?></label>

    Should I use bp_the_site_member_something(‘2’)?

    #7418
    philbow
    Participant

    I have a need where I want to add html to the bp profile fields. I am using WP 2.8.4 and BP 1.1.1. Per a different thread, I’ve tried….

    function stuff_i_want_triggered_after_bp_loads(){
    remove_filter( 'xprofile_get_field_data', 'wp_filter_kses', 1 );
    }
    add_action('wp', 'stuff_i_want_triggered_after_bp_loads');

    …but it generates an error. Since the thread was older, I’m guessing something changed in 1x version.

    How can I enable html in profile fields?

    Thanks,

    Phil

    #55852
    buzz2050
    Participant

    Hi again,

    Well, now I have a fresh install of both WPMU(2.8.5.2) and BP(1.1.2) on my localhost. I do not have any other plugins apart from BP installed and still the same problem.

    I have added some ‘required’ custom fields to the ‘Base’ Profile Group. Even though the user fills them during the registration, they still appear blank on the ‘Edit Profile’ page (in BP members) and he has to fill them again (editing and saving works).

    I have the same install on my server, but there I upgraded from earlier versions and apparently, this problem does not occur there. Not sure what’s going on??!

    Please HEELLP!!

    -Sib.

    #55665
    peterverkooijen
    Participant

    @Chouf1, the code is not for uppercasing; it’s making sure firstname and lastname are stored consistently in the different places where WP/WPMU/BP stores names.

    Why is it too much to ask for consistently, reliably stored firstname + lastname in the WordPress world? Uppercasing should be part that imho. It’s utterly ridiculous to have to do that in CSS. Is that even official CSS? Do all browsers support it?

    In most software for grownups firstname and lastname fields are at the top of the members/users table, part of the core of the application, the heart of member registration and management. In the WP/WPMU/BP world it’s a messy afterthought, stored halfheartedly in three or four different locations, in different ways, without any synchronization between them. Aaarrrggghhh.

    Before a WordPress user account is activated, it is stored in the wp_signups table; there’s a meta field storing various things. Have you checked if its that one?

    That’s one of the two places where the lowercase version of the name is stored. My code above updates names with uppercase in the usermeta fields.

    My question is which code stores them in xprofile or wp_signups. Where should I apply my nameize() function to get clean names in xprofile?

    Cleaning them up before they’re stored in wp_signups would do the trick as well, because I think the xprofile data is taken from there. I don’t think the wp_signup data is used for anything else later, so it has a lower priority to me.

    Edit: Of course I’m not trying to uppercase all chars of the name, just the first ones, as used to be custom in western culture. FYI, here’s the nameize function I use:

    function nameize($str,$a_char = array("'","-"," ")){
    //$str contains the complete raw name string
    //$a_char is an array containing the characters we use as separators for capitalization. If you don't pass anything, there are three in there as default.
    $string = strtolower($str);
    foreach ($a_char as $temp){
    $pos = strpos($string,$temp);
    if ($pos){
    //we are in the loop because we found one of the special characters in the array, so lets split it up into chunks and capitalize each one.
    $mend = '';
    $a_split = explode($temp,$string);
    foreach ($a_split as $temp2){
    //capitalize each portion of the string which was separated at a special character
    $mend .= ucfirst($temp2).$temp;
    }
    $string = substr($mend,0,-1);
    }
    }
    return ucfirst($string);
    }

    Edit2: The CSS solution only works on the first name. The last name still starts with lowercase. Any easy CSS trick for that? I don’t think so.

    Apparently the same CSS trick is used in this forum, which would explain why my “username” – cough, spit – is displayed as ‘Peterverkooijen’ instead of ‘peterverkooijen’ as I had entered it. Why is that kind of mess considered acceptable?

    #7382
    peterverkooijen
    Participant

    My first custom field_1 is for fullname. I want to capitalize that input. I already have a function that does that – nameize(). Where should I apply it?

    I’ve gone through a lot of trouble to also update the full name in wp_usermeta and elsewhere upon activation, so those fields all have nicely formatted names.

    But the display name is apparently stored in xprofile before activation. Where is the code that does that? Or is there a way to update the xprofile field with capitalized versions in the same custom function I use to update wp_usermeta?:

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

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

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

    $company = $meta[field_2];

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

    $firstname = nameize($firstname);
    $lastname = nameize($lastname);

    $autousername = str_replace('-', '', str_replace("'", "", str_replace('.', '', str_replace(' ', '', strtolower($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 user_login = %s WHERE ID = %d", $autousername, $user_id ) );
    $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_nicename = %s WHERE ID = %d", $autousername, $user_id ) );
    $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);

    #55510
    buzz2050
    Participant

    Thanks for your reply Jeff. I understand that the register.php directly contains all the elements now.

    However, we liked the registration page of the default ‘bphome’ theme (BP 1.0.3) better (earlier) and accordingly we customized our site theme(premium edu-clean home theme for WPMU) to have a register page like that.

    To achieve this, I created a custom page template register.php with code similar to that of bphome’s and plonked it in my theme folder. There if you see, the page template is divided into right-column, center-column, left-column (it hosts the registration section)

    The code for this register.php is something like:

    <?php get_header(); ?>

    <!-- div content starts -->
    <div id="content" class="widecolumn">
    ....
    ....

    <div id="left-column">
    <div class="register bp_core_widget_welcome">
    <h2 class="widgettitle"><?php _e( 'Register for an Account', 'buddypress' ) ?></h2>
    <?php bp_core_signup_do_signup() ?>
    </div>
    </div>

    </div><!-- div content ends -->
    <?php get_footer(); ?>

    It’s the bp_core_signup_do_signup() that is responsible for including the content of the registration page in the left-column.

    Here is how my current registration page looks like:

    http://www.cmswebusa.com/testsib/reg_pg.png

    The registration section on the left is included in that section due to the bp_core_signup_do_signup() call. We still haven’t converted to the new single theme way, but we have already upgraded our BP to 1.1.2 and since then our custom fields just don’t get saved. Not sure what to do here?! I was wondering this could be happening coz of the deprecated function call. Also, how do I still make the registration section appear in the left-column of my page? Is there a function to include the register template or something?

    Thanks,

    Sib

    #55467
    buzz2050
    Participant

    @DJPaul

    Earlier when we were using WPMU 2.8.4a with BP 1.1, our registration form worked fine and all the custom fields got saved just fine. Only after the upgrades, are we experiencing this issue. Did not touch the WPMU install, just upgraded BP, that’s it!

    However, we do have a custom registration page which is different than wp-signup.php. On this page we are calling bp_core_signup_do_signup() which is deprecated in BP1.1.2. Could that possibly be creating the issue? Is there any alternative to this call in the newer version?

    We really need to fix this asap, users are already grumbling. Any troubleshooting advice is greatly appreciated.

    Thanks,

    Sib

Viewing 25 results - 5,201 through 5,225 (of 5,755 total)
Skip to toolbar