Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP Member Filter


  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    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.

Viewing 25 replies - 26 through 50 (of 55 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    This is going to need an update to work with 1.2 and the bp-default theme. The files have changed as well as the ajax makes the sort-order a little wonky.

    An update for 1.2 is coming soon. :)


    spaceoddity
    Participant

    @spaceoddity

    Ah, OK. I’m using Buddypress 1.1.3 (the one on the download page)… Is that the same as 1.2?


    danvoinea
    Member

    @danvoinea

    Still no update for 1.2 :> Would be highly appreciated !

    Thanks,


    spaceoddity
    Participant

    @spaceoddity

    I’m sure he’s still working on it. We have to be patient… I’m sure it’ll be well worth it when it’s done. :-)


    aran
    Participant

    @aran

    Will this allow users to search for the results of more than one xprofile field at a time?

    So, for example, they could look for someone in a particular city who teaches piano, that kind of stuff?

    If so, I think it would be one of the most important single additions to the BP universe, and would be very interested indeed to hear how work is going with it…:-)


    gaysurfers
    Participant

    @gaysurfers

    I am dying to see the new version compatible with WordPress 2.9.2.

    Please can you keep us updated??

    Thanks


    gaysurfers
    Participant

    @gaysurfers

    I am dying to see the new version compatible with WordPress 2.9.2.

    Please can you keep us updated??

    Thanks


    Leland
    Participant

    @northcreatif

    Can I sponsor this development or get some help updating this plugin for bp 1.2. I could really use this working. Thanks.


    Psyber
    Participant

    @psyber

    Same here :-)

    I’m willing to sponsor this as well. This is a very much needed plugin for any social network.


    chopo87
    Participant

    @chopo87

    Hi, what’s the latest news for this pluggin? The Plugin’s changelog says it now supports BuddyPress 1.2 ( https://wordpress.org/extend/plugins/bp-member-filter/changelog/ ), but I can’t get it to work on BP 1.2.3. This is probably just me being ignorant, but with such limited documentation available it hard for n00bs like me to get it working. I’d be more than happy to sponsor the plugin as well if support for 1.2.3 does exist and the documentation is extended.

    Just installed the plugin on WP 2.9.2 + BP 1.2.4.1 and as jpl888 points out on the WP forum, it can work with a little fettling:
    https://wordpress.org/support/topic/399989

    To install it I added the code from the pastebin link: http://pastebin.com/bw0suXwe to my members list page (members/index.php), changed the bp_filter_profile_field(”) argument to be the name of the profile field I wanted to filter on and on testing it, I got hit with the following error in the logs:

    `PHP Warning: Parameter 2 to bp_replace_members_filter() expected to be a reference, value given in snip…/wp-includes/plugin.php on line 166, referer: snip…/members/`

    So I found the bp_replace_members_filter(…) method at line 265 in the plugin file bp-member-filter.php and removed the ampersand from the 2nd parameter so the method signature becomes:

    `function bp_replace_members_filter( $has_members, $members_template )`

    After that filtering works for me where the profile field to filter on is a select box. Filtering on a multiple select box does not work for me, and as posted earlier filtering on checkbox profile fields is not yet implemented.

    Be warned though, I just checked the error log and removed the ampersand from the param and it then worked, I don’t know if that change will have any other side effects. I can see that it means I’m telling PHP that the method now expects a value rather than a reference, and that appears to be what BP is giving it, but beyond that…


    Ricki Steigerwald
    Participant

    @rickisteigerwald

    The patebin.com link is expired. Is it possible to see how to create the form?


    John Lewis
    Participant

    @jpl888

    And again no sign of the author. AWOL. Do hope he hasn’t done a “Hans Reiser”.

    Seriously though we could do with some support on this plugin. The multi checkbox feature would be really desirable and there is no sign of member filter being integrated into Buddypress before 1.4+, according to the roadmap. If the author would be willing to give us an idea where he got to with the plugin and what he sees as being the problem getting multi checkboxes to work. I’m sure I could have a go at fixing it, particularly as a customer will pay me to sort it out.

    Abientot!


    chopo87
    Participant

    @chopo87

    @rickisteigerwald The pastebin link hasn’t actualy expierd, it’s just broken because it sticks a “)” at the end of the URL. Try this one: http://pastebin.com/bw0suXwe .

    ;-)


    chopo87
    Participant

    @chopo87

    @olizilla Just to confirm that your solution seems to work, and I am yet to experience any side effects to removing the & from $members_template and treating it as a input variable and not a reference. However it would be nice if @johnjamesjacoby could provide some feedback on that.

    An interesting minor bug that I have come across with drop down variables. Drop down lists are not analysed by whether option1, 2, 3… x is selected but rather by looking searching for the text string associated with the value. For the most part this is irrelevant, in some cases this may even be fortuitous, there is one particular case where this causes a problem though.

    Say I have a field called gender that allows members to specify their sex with options Male and Female. If I set filter to female, all works as expected and those that are male or rather not answer are filtered out. However, if I select male, as the word female also contains the string “male”, the female results still come up, all be it with less priority at the end (I think).


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    This plugin is going to get a good nudge soon, I promise. The solution with removing the ampersand actually cropped up recently and I just patched it in the trunk, so it’s correct and won’t hurt anything.

    I’m going to make a UI in wp-admin to allow you to select which fields are searchable, and it will include a bundled template to get you by to start with. ETA on this is a week or two at least.

    That’s fantastic news! I can’t wait.

    I have it working in BP1.5.2 + WP3.0. However I cannot do a keyword search while also filtering by fields. it’s one search or the other. Does anyone know how to set that up correctly?


    zanzaboonda
    Participant

    @zanzaboonda

    Can’t wait for the update – this is exactly what I need! :)


    devmo1
    Participant

    @devmo1

    @johnjamesjacoby

    I just came across this thread after keeping my fingers crossed on the plugins development.

    Can you provide an update on it’s status? Anxiously awaiting its use & happy to contribute, too.


    zanzaboonda
    Participant

    @zanzaboonda

    Any word on this yet by chance? :)


    John Lewis
    Participant

    @jpl888

    @chopo87

    It was actually me that fixed the template error. Granted I didn’t know why, see below:-

    https://wordpress.org/support/topic/plugin-bp-member-filter-cant-get-this-to-work


    John Lewis
    Participant

    @jpl888

    @John James Jacoby

    Any word on when the updated plug-in will be released?

    I have a customer waiting for the multi-checkbox issue to be fixed, and I’m willing to pay if that will get it done quicker?


    Bowe
    Participant

    @bowromir

    I would love to use this plugin as well @johnjamesjacoby.. :)


    John Lewis
    Participant

    @jpl888

    FYI the profile search plugin https://buddypress.org/community/groups/bp-profile-search/ will have the multi-checkbox funtionality in the next release (due in about weeks time). I have been in contact with the developer and am testing the pre-release for him. He says he will email it to any interested parties if they want to give it a try.

    I’m not trying to knock John James but the profile search developer is very good at coming back to people. He even logged into one of my customers sites to identify a problem for me. I cannot praise him highly enough at this stage.

Viewing 25 replies - 26 through 50 (of 55 total)
  • The topic ‘BP Member Filter’ is closed to new replies.
Skip to toolbar