BP Profile Search › Display a list of members by field?
-
AuthorPost
-
Daniel
GuestLets pretend our member’s profiles have 3 fields:
– cats
– dogs
– rabbitsI want to display a list of members BY DEFAULT on a page who have the “cats” field filled in. In other words, I don’t want to require users needing to sort to “cats” from the dropdown. I want all members with “cats” to show immediately upon loading the page.
Can you help? The sooner the better.
Thanks!
Danielandrea
Plugin AuthorHi Daniel,
If I get it right, you need to show all members whose ‘cats’ profile field is not empty. That feature is not available yet, but probably we can find a workaround. What type is your ‘cats’ field (e.g. Text Box, Radio Buttons, …)?
Daniel
GuestHi there!
Thank you for your response. Yes, you have it right. My initial need was to display a list of users who’s cats profile fields are not empty. I figured the feature isn’t available yet thought so no worries. But to answer your question, the cats field would be a text box field.
Now that I’ve thought about it, though, even better would be adding cats, dogs, etc to the default members directory page. I am trying to avoid creating a custom directory template. Is there any quick and easy way to add specific profile fields to the default sorting dropdown without using shortcodes. In other words, Option E (here http://dontdream.it/bp-profile-search/custom-directories/), but not using shorcodes.
Thanks!
Danielandrea
Plugin AuthorHi Daniel,
Unfortunately it’s not possible to avoid the shortcode, but the procedure is quick and easy anyway 🙂
1. Go to Settings -> BuddyPress, Pages, and select ‘None’ for the Members page, then Save Settings. At this point, when you visit the Members page on the front-end, you’ll get a blank page.
2. Edit the now blank Members page and insert your shortcode:
[bps_directory order_by=’field_10, field_11, field_12′]
3. Done! Now you have a perfectly good Members directory with the additional sort options you need.
Daniel
GuestGot it! That worked perfectly.
Except a two bugs I’m encountering (you’ll be able to replicate them here): http://ef5.29d.myftpupload.com/members/
1) Filter the results by “Last Active to Construction Crew”. Scroll down and you will see that Construction Crew results field containing the entry is returning a strange string of numbers, instead of the years entered into the field that look something like this: ({I:0;S:4:”1972″;I:1;S:4:”1973″;I:2;S:4:”1974″;})
Any ideas how to fix this?
2) Filter the results by “Last Active to Galehead”, then click pageination #2. The search clears and no longer displays the remaining users within the “Galehead” filter.
Man. I’m so close. You’re help would be much appreciated.
Thanks so much.
Danandrea
Plugin AuthorHi Dan,
1) Probably the field type of ‘Construction Crew’ was originally ‘Checkboxes’ and was later changed to ‘Text Box’. The serialized strings you see are the old field values, the simple fix is that the admin or the profile owner edit them;
2) In your theme the Members directory does not paginate via AJAX as the standard themes do, and this is a problem with BP Profile Search. Did you write the theme yourself or did you buy it?
Dan
GuestHi Andrea,
Thank you for suggestions.
1) I see. What is strange is that Construction Crew and all other profiles fields containing more than one comma separated valvue are returning the serialized strings. Not just Constuction Crew (which has always been a text field, not a checkbox). Is there another way to fix this? It would be a bare of a task to change these fields manually (we have many more members than on the staging site). Is there a function or some other fix we could run to get these values displaying properly?
2) Got it. We bought the theme (called BuddyBoss). There MUST be a way. Is there a modification we can make somewhere to make this work? I’m not exactly skilled in .php, so dumbing down any suggestions would be appreciated so that I can understand 🙂
Very much appreciate your help.
andrea
Plugin AuthorHi Dan,
I need to see the database to understand why the serialized strings are there. Could you send an admin access for your test site to andrea@dontdream.it (my email)?
With site access, I could also try to fix your copy of BP Profile Search to work without AJAX, but that means you will be unable to upgrade to future versions.
What do you think?
Daniel
GuestThat would AMAZING.
I just sent you some temporary admin credentials to our staging site: ef5.29d.myftpupload.com/wp-login.php
If you’re able to work your magic, let me know and maybe we can implement the same fixes on our production site (which we’re planning on going live with soon).
Thank you so much.
Dan
-
AuthorPost