Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 551 through 575 (of 3,608 total)
  • Author
    Search Results
  • #271852

    In reply to: functionality doubts

    Venutius
    Moderator

    I’ve only used BP Profile Search and I’ve got to say you would probably need to customise that too, it’s got the basic fuctionality in that it allows you to search all the profile fields but I think the search algorithm itself needs revamping, also it would need to only be visible to one member type I think.

    HDcms
    Participant

    Hello,
    On another forum, I had this suggestion with WP function 🙂
    But I am embarrassed if I can not put a default value to my numeric field!

    $users = get_users( [ 'fields' => 'ids' ] );
    global $wpdb;
    /** @var \WP_User $user */
    foreach ( $users as $user_id ) {        
        $results = $wpdb->insert(
            'bp_xprofile_data',
            [
                'field_id'     => 794,
                'user_id'      => $user_id,
                'value'        => 4,
                'last_updated' => new \DateTime()
            ],
            [ '%d', '%d', '%d', '%s' ]
        );
    }

    regards

    #271703

    In reply to: Customize member loop

    Venutius
    Moderator

    I think you are really talking about new page, one that performs a search of the members profile fields and comes up with matches. If I were you, I’d look at using BP Match Me as a basis for this, or maybe BP Profile Search and then providing my own custom code to automate the search process.

    #271676
    Venutius
    Moderator

    Presumably you added this, since it’s not part of BP by default. Go to Dashboard>>Users>>Profile Fields and you should be able to delete it there. But make sure you don’t have any plugins relying on it being there. Same place for adding new fields.

    Venutius
    Moderator
    #271522

    In reply to: Member loop

    shaundrania
    Participant

    Thank you @shanebp!! Question- where it says “if you want to show profile fields you can”, how do I do that? I want to show certain profile fields.

    pedger
    Participant

    I have the same issue. Apart from the Name field, all new fields marked as required doesn’t throw errors when the user saves its profile on either on frontend and backend.

    I created the fields using User > Profile fields tool, where there’s a required option. The input elements on the frontend even has ‘aria-required=”true”‘ param.

    In my case, when the user leaves a field empty (i.e. deletes the info that was there previously, the db entry is simply deleted. (agreed with @dro-i-de, not the expected behavior)

    How xprofile handles the fields marked as required?

    running WP 4.9.4 Theme: Boss (child Theme) 2.4.2
    Buddypress: 2.5.14

    #271379
    David Cavins
    Keymaster

    Hi @teljkon-

    I don’t understand your points 2 and 3, but 1 can be solved easily: https://codex.buddypress.org/administrator-guide/extended-profiles/

    Fields in the “Primary (Base)” profile field group are added to the registration form.

    Venutius
    Moderator

    The only other free profile search I know of is BP Search, but that is only for looking up names, it does not search the other fields.

    #271347
    Venutius
    Moderator

    Ok I’m in.

    You should change that password now I’ve had access.

    I can see what the problem is, your Base Profile field looks to be corrupt. It’s duplicated and does not have the required Name field. I added this field to one of the profile fields and it still did not show up.

    So basically your profile field settings are corrupt in your database. As I see it there are two ways forward:
    1. Delete wordpress entirely including the Database and start again.
    2. Try to recover your Database by manually editing it.

    Given it’s a test site and you are not experienced I suggest option 1 is the best way forward.

    It would be good to know exactly what happened to get this error, technically it should not happen.

    #271302
    David Cavins
    Keymaster

    It would be better if you added your custom code to bp-custom.php rather than to a theme. (When the theme is updated, you’ll lose your changes.)

    About bp-custom.php: https://codex.buddypress.org/themes/bp-custom-php/

    To insert those fields, you’ll just have to change you code, replacing 'field=Location' with the name of your profile field. Here’s some more info: https://codex.buddypress.org/themes/guides/displaying-extended-profile-fields-on-member-profiles/

    #271294
    andreasnordengen
    Participant

    Well, I asked the developer behind the theme I´m using and got this code:

    function sq7_extra_fields_members_directory() {
     
        $location = bp_get_member_profile_data('field=Location');
        $specialization = bp_get_member_profile_data('field=Specialization');
     
        if ($specialization || $location) {
            echo '<div class="mdetcenter">'. 'Location : ' . $location . '</div>';
            echo '<div class="mdetcenter">'. 'Specialization : ' . $specialization . '</div>';
        }
     
    }
    add_action('bp_directory_members_item', 'sq7_extra_fields_members_directory');

    But, when I add the code and update, I get this message from WordPress:
    Could not communicate back with the site to check for faulty errors, so the PHP change was reset. You must upload your change to the PHP file in another way, for example, with SFTP.

    Could be related to my PHP version…

    #271142

    Also, telling me to get a registration profile plugin won’t help because I have to have the buddypress integration with Geodirectory which doesn’t translate profile fields with third party registration plugins.

    #271054
    David Cavins
    Keymaster

    Boone wrote something that might be helpful: https://github.com/boonebgorges/bp-social-media-profiles/

    It automatically converts some social site links in extended profile fields into the right kind of link.

    #271053
    David Cavins
    Keymaster

    That depends on where you’re using it. You could use a bp_signup_validate filter to check that a username has certain characteristics. But for profile fields or other places, you’d have to enforce it some other way.

    Here’s an example of how you might disalloe long usernames:

    
    add_action('bp_signup_validate', function() {
    	if ( isset( $_POST[ 'signup_username' ] ) && strlen( $_POST[ 'signup_username' ] ) > 60 ) {
    		$bp = buddypress();
    		$bp->signup->errors['signup_username'] = 'Geez, your username is really long.';
    	}
    } );
    
    #270989
    redbananasander
    Participant

    Hmm… Maybe this is normal funcition from buddypress? I have 24 active plug-ins:
    – ACF Accordion
    – Advanced Custom Fields PRO
    – Advanced Custom Fields: Font Awesome
    – Advanced Custom Fields: Gravity Forms Field
    – Black Studio TinyMCE Widget
    – BuddyPress
    – BuddyPress Activity Plus
    – BuddyPress Admin Only Profile Fields
    – BuddyPress Edit Activity
    – BuddyPress Global Search
    – Colsensation Addons (own plugin)
    – Custom Post Type UI
    – Export User Data
    – Gravity Forms
    – Gravity Forms (nl)
    – Gravity Forms User Registration Add-On
    – GravityView – Gravity Forms Import Entries
    – Invite Anyone
    – Members Import
    – Pronamic Pay
    – Warpdrive
    – WP Pusher
    – WP Sync DB
    – Yoast SEO

    That’s all 😉

    amandafrench
    Participant

    Never mind! I’ve found a fabulous solution that has gotten me out of SQL query hell. Again, if anyone else is trying to sort a Members Directory, here’s what I did:

    1) Put it in a table, not a list (I had done this anyway, since I wanted a single-page directory that displayed xprofile fields horizontally) — make sure it has a <th> table header row;
    2) Install the plugin Table Sorter https://wordpress.org/plugins/table-sorter/ and add the class “tablesorter” to the table.

    Et voilà! I commented out the sort type dropdown in members/index.php starting with
    <div class="item-list-tabs" id="subnav" aria-label="<?php esc_attr_e( 'Members directory secondary navigation', 'buddypress' ); ?>" role="navigation">
    all the way through

    <?php
    /**
     * Fires inside the members directory member order options.
     *
     * @since 1.2.0
     */
    do_action( 'bp_members_directory_order_options' ); ?>
    </select>
    </li>
    </ul>
    </div>

    and I made sure that the default single page list showed all users alphabetically by default in members-loop.php

    <?php if ( bp_get_current_member_type() ) : ?>
    	<p class="current-member-type"><?php bp_current_member_type_message() ?></p>
    <?php endif; ?>
    
    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=500' . '&exclude=1,2,3,4,6' . '&type=alphabetical') ) : ?>

    And then all I had to do was add that tablesorter class to the table as required by the tablesorter plugin, and I got a nice dynamic table with sortable columns, which can also be sorted by multiple criteria by holding down the Shift key on the second column. I set the initial sort order with parameters that select the column by number, as described at http://tablesorter.com/docs/example-option-sort-list.html and elsewhere.

    <table id="members-list" class="tablesorter {sortlist:[[4,0], [3,0], [2,0], [1,0], [0,0]]}" aria-live="assertive" aria-relevant="all">

    Yay.

    amandafrench
    Participant

    I guess I’m never satisfied, but I do have an additional request / problem, if someone can help (cough @boonebgorges?). Our xprofile fields are geographical: City, State, Country. I’d like to do a sequential sort on them on the Members directory: first ASC by Country (which I’ve now got working, finally, thanks to this post), then second ASC by State, third ASC by City. I’ve mucked around with SQL statements and ORDER BY FIELD and CASE IF THEN, but I can’t get those subsequent sorts to work.

    xprofile field_id values: 1 = Name, 8 = Org, 9 = City, 10 = State, 11 = Country

    Members loop code:

    <?php if ( bp_has_members( bp_ajax_querystring( 'members' ) . '&per_page=500' . '&populate_extras&type=alphabetical' . '&exclude=1,2,3,4,6') ) : ?>

    Below code in functions.php works – it sorts members by Country ASC
    custom_ids = $wpdb->get_col("SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 11 ORDER BY value ASC");

    Below code in functions.php doesn’t work to sort by Country, State, City ASC – returns an unsorted members list. I think it’s sorting randomly. It isn’t by user id, username, last active, or newest registered. When I apply the default member type sorts, though, with the members-order-select dropdown, that works.

    $custom_ids = $wpdb->get_col("SELECT user_id FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id IN ('1', '8', '9', '10', '11') ORDER BY FIELD (field_id, '11', '10', '9', '8', '1')");

    Any advice for constructing that SQL query? Do I need to look more into bp_parse_args?

    #270837
    Venutius
    Moderator

    Yep BuddyPress has it’s own registration page, it ususally automatically creates it – register though in reality buddypress does not use this pages content and just uses the pages slug as an anchor. You can go to Dashboard>>Users>>Profile Fields to add additional profile fields to the register page, you just add them to the Main field group. These are added to the right side of the registration page in the same order as viewed in the main profile group page.

    #270815

    In reply to: Select box value pairs

    Venutius
    Moderator

    I don’t think they work that way, I also looked at BuddyPress Xprofile Custom Fields but that did not allow for that, just a single field to enter the value. You might want to suggest it as a feature request on BuddyPress Trac:

    https://buddypress.trac.wordpress.org/

    #270785
    sasenzon
    Participant

    The site is members only so I can’t do that but the url basically saYs:
    https://members.institutechiro.com/members/?s=Sherman

    Now if I click on a field in the profile that is mandatory then the search function works. But this plugin was supposed to turn all fields in the profile to searchable. Thanks.

    yspeo
    Participant

    I found it. Thank you. But when I go to Profile>>Edit, there used to be a group just the same as Setting >> General with field that would allow me to change my password. I deleted that group. How can I get the change password fields back under Profile>>Edit?

    #270756
    Varun Dubey
    Participant

    @tom-corvus You can check codes at
    https://plugins.svn.wordpress.org/bp-default-data/tags/1.2.0/process.php with function name bpdd_import_users_profile()
    BP Default data plugin have created some fields and field group for BuddyPress.

    #270744
    virajsonagra
    Participant

    I am running following plugins in my site.

    1. BuddyPress
    2. BuddyPress cover
    3. BuddyPress NoCaptcha Register Box
    4. Buddypress Xprofile Custom Fields Type
    5. BuddyPress xProfile Rich Text Field

    Wordpress version 4.5.1

    #270706
    Henry Wright
    Moderator

    Unfortunately, the fields are synchronized only when the profile is updated. I do not know how to start mass synchronization

    This is likely because you’re hooking to a hook fired at profile update. You’ll need to hook your code to something that gets fired at another point in time.

Viewing 25 results - 551 through 575 (of 3,608 total)
Skip to toolbar