Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'profile fields'

Viewing 25 results - 4,076 through 4,100 (of 5,755 total)
  • Author
    Search Results
  • mohammad
    Participant

    After long hours trying to fix this issue, I present to all who care, a simple way to only include only members with certain profile field values in a loop. I tried assigning roles to certain users through custom profile fields, and then pull only those certain members on specific listing pages.

    What I tried first was including an if statement within the loop and only showing the members info of those assigned the specific role. It worked – to a point. The problem came in with pagination where the loop was still recognizing all members that were queried, and creating pages to list them even though those pages were empty since these members did not meet the if condition and therefore were not displayed.

    So, I needed a different approach which I present to you here. Place this in your functions.php and you’re good to go. It runs a quick query on all members and returns a comma separated list of member id’s that fit the criteria to give you a list of id’s to include. See example below.

    `
    /* Include only members that have a specific profile value in a specific profile field in a loop.
    * $theMetaValue = Value of field to search for
    * $theMetaFielt = Field name to search for Meta Value
    * EXAMPLE OF CODE IN ACTION:
    * include_by_meta(‘Profile Field Value’, ‘Profile Field Name’), ‘type’ => ‘newest’) )) : ?>
    *
    *
    *
    *
    * Credit: http://www.duable.com
    */

    function include_by_meta($theMetaValue, $theMetaField) {

    $memberArray = array();

    if (bp_has_members()) :
    while (bp_members()) :
    bp_the_member();
    $theFieldValue = bp_get_member_profile_data( ‘field=’. $theMetaField );
    if ($theFieldValue==$theMetaValue) {
    array_push($memberArray, bp_get_member_user_id());
    }
    endwhile;
    endif;

    $theIncludeString=implode(“,”,$memberArray);

    return $theIncludeString;
    }
    ?>
    `

    #23545
    gen385
    Member

    Hi,

    I would like to know how finally i can do that ? The topic have been discussed but not really resolved…. And i really need it. I can’t put a HUUUUUUGE list of city for all around Canada, i need to separate it with provinces, and i really don’t know how i can do that.

    Quote:
    ….
    Is there any way I can create/download a profile field that lists all the Countries, States/Provinces, Cities???

    And if you select.. Canada it will only list the Provinces in Canada.

    If I need to I will manually type out every single country and every single province, but I just need to know how to go about doing this.

    Thanks a lot for your help.
    Have a good day !

    Anthony

    #117767
    4ella
    Participant

    I agree with @modemlooper, there’s no need for a plugin if it will be implemented in core(hope it will run quicker), group’s fields is very important feature and I think that for many users who use groups as company & venue’s descriptions like me also much more important than profile fields. If not I hope @slaffik will finish his great work on it globally.

    #117765
    Micheal Kennedy
    Participant

    BP should definitely have them in core, just like they do for profile fields.

    #117762
    Micheal Kennedy
    Participant

    BP should definitely have this in core – just like like they do for Profile fields.

    Knight Fight
    Participant

    Location: bp-xprofiles-classes.php line 417

    I’ve added profile fields programmatically and I populate these with data using that filter. The problem lies in the fact that the function returns false before the filter is applied. The only way to get my filter to be used is to add bogus rows to these fields so it passes the following check..

    `if ( !$children = $wpdb->get_results($sql) )
    return false;`

    Is it possible to move the filter before that check and after the query, i have a workaround by inserting rows but its a bit of a pain to add them for every field.

    I’m not sure what the procedure is about submitting patches, but if possible I would like to see this changed.

    Many Thanx, Patriek.

    Tammie Lister
    Moderator
    #117520
    Nahum
    Participant

    @r-a-y I have something working but it’s real dirty looking… wondering if someone sees this and can offer a much neater way of going about this. maybe it will inspire someone to make an advanced plugin because this is a very interesting function of xprofile fields driving the content received by members i would think.

    `

    <?php global $bp;
    if (bp_has_members(‘include=’.$bp->loggedin_user->id)):
    while ( bp_members() ) : bp_the_member();
    $suggestions = bp_get_member_profile_data( ‘field=Interests’ );
    $nosuggestions = bp_get_profile_field_data((‘field=Interests’) == “”);
    endwhile; endif; ?>

    Suggested Posts

    • <a href="”>

    `

    I’d also like to add a way to recognize no suggestions and display a message that says no suggestions available.

    Anyway this is for loggedin user and multisite feed but it can be done on a single blog just by removing the switch_to and restore_current.

    #117463
    enderandrew
    Member

    @linusf I tried that plugin, and while it installs cleanly in 1.5, it doesn’t seem to work. I don’t see any areas where I can set privacy options on my profile fields.

    #117085
    gwu123
    Participant

    thanks @DJPaul. Will take your word. I still doubt if the search will be efficiently. I want to have a backup plan in case going forward this slows down the search.

    Thanks.

    #117065

    @Alan, or can someone please help me look at this code to know if something is wrong, have tried it and everything seems ok if the member did not add the “country field” as it shows the link and take you to the edit page, but immediately you input the field “Country” e.g “UK” and save, it breaks both Admin bar and the Sidebar.

    katje
    Member

    Thank you Gorges, but I already activated the invite anyone. It needs email addresses; what I want is for users to be able to search for other members on multiple criteria and to invite them. With 10.000 members you don’t want your users to have to scroll through the whole list to find someone.

    I’m not a developper but with some reasoning I reckon it must be simple to use the profile form. I put a lot of fields there as required and text becomes links as well. You could let a search and invite feed on the profile information.
    Nothing like that available?
    And how difficult will it be to create a plugin like that?

    #117043

    @Alan, i will try it and if i run into any problem , i will let you know.

    regards

    #117041
    Alan
    Member

    `


    <?php
    global $bp;
    $data = bp_get_profile_field_data(‘field=Country’);
    $user_status = is_user_logged_in() ;
    $add_data_link = $bp->loggedin_user->domain . ‘/profile/edit/group/1’;
    ?>

    <?php echo '‘. ‘Add Your Coutnry’.’‘; ?>

    `

    Make sure that you change the link in $add_data_link at the end … you can check out the slug and see in what group is the Country field located …

    #117039

    I think it could be achieved by adding an empty checking which i have no clue. i think something loke “if empty return” could do.

    #117035
    Tammie Lister
    Moderator

    Could this work with a empty checking or null value on the $data? That would be my first suggestion.

    Hi, i will like to display some profile field at the members profile page, i know i can do that by adding the following code to members-header.php, but how can i put a link, so that if the field is not filled by the member it will just show let say “add your Country” and when click it will just go to the place where he can fill the field

    `

    Country:

    `

    regards

    #117032
    Paul Wong-Gibbs
    Keymaster

    It’ll be fine. xprofile’s database structure is good.

    #117024
    gwu123
    Participant

    bounce. Any thoughts?

    #116983
    christophg
    Member

    On this same vein, can I make free members get a different registration form. Lets say with just the “base” profile fields to fill out for my records?

    #116965
    lpryor
    Participant

    Yes, the ordering should be on name. But it should search on the other fields, surely? The way it does when you order by recently active, say?

    Currently (straight out of the box default theme) it applies the search terms to all the extended profile fields if you order by anything other than alphabetical. If you order by alphabetical, it applies the search terms to the name only.

    So if you keep the same search terms, but choose a different ordering, you get different members showing. This is counter intuitive, to say the least.

    #23287
    lpryor
    Participant

    Either there’s something I seriously don’t understand, or there’s an inconvenient feature in the member search.

    If you choose alphabetical order, the search only operates on the name of the member, rather than on all the extended profile fields. You can reproduce the problem by doing a member search on some word that appears in an extended profile field for at least one member, but isn’t in anyone’s name. You will get some members listed. If you change the order to Alphabetical, they will disappear.

    This appears to be because on line 243 of bp_core_classes we take only the name record in the profile data table, if the ordering is alphabetical. If the ordering isn’t alphabetical we keep all the records, which is what we want. I think the way round it is to do two separate joins, one to get the extended profile field records in so that they can be searched, and another to provide the term on which to do the ordering.

    Is there any way round this, other than modifying the function in the core file on my site (which doesn’t seem a particularly good idea)? I really need the alphabetical ordering, as the others are pretty meaningless to most of the users of my site.

    Also, is this a known inconvenient feature? Or is it a bug, in which case I should report it?

    #23268
    gwu123
    Participant

    Hi,

    I would like to create 150+ profile fields for users (resume type application). In addition I intend to use Profile search plugin (http://buddypress.org/community/groups/bp-profile-search/)

    Can anyone advice on how efficient this is going to be and how well this will scale with growing users.
    I need to super user search feature.

    Does anyone have any other way I can implement this?

    Thanks.

    #116909
    drhoussem
    Member

    ???????

    #116908
    drhoussem
    Member

    any replay?

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