Skip to:
Content
Pages
Categories
Search
Top
Bottom

2 profile types and 2 “members” pages


  • Joffrey Quillet
    Member

    @jaykyuu

    Hello everyone,

    Here’s the question: a client of mine wants to set up a BP site with 2 profile types (“band” and “bar”). I figured out that you could do that by setting up a radio button with the 2 choices in the registration form, using the extended profile. What I need now is 2 different “member” pages (one for each member type), each page showing only one of the two types of members.

    In case it’s not clear enough, I would need to have one “Bands” page accessible from the website menu and displaying only the members who chose “Band” in the “profile type” field during the subscription.

    Is that possible, and if so, how can I do it ?

    Thanks for your time

Viewing 10 replies - 1 through 10 (of 10 total)

  • noizeburger
    Participant

    @noizeburger

    Do you mean two different memberlists?


    embergermedia
    Member

    @embergermedia

    I have the same situation. I think I am going to solve mine by using private groups for each set. I haven’t actually gotten there yet, so not sure how well it will work.


    noizeburger
    Participant

    @noizeburger

    If your users fill or check a field “Band” or something else, the easiest way to show them on one page, seems to be a search link: http://www.mydomain.com/members/?s=Band where Band is the name of the used field.


    noizeburger
    Participant

    @noizeburger

    PS: you can see it in action right here: http://www.minemusig.at/thenaughtydaughters/ -> go to “Profiltyp”, it’s a selectfield you have to check on registration and also works as a “role-selector”, too (if you want to know how, I can help). If you click on “Band” it shows you all other profiles of that type.


    Joffrey Quillet
    Member

    @jaykyuu

    Yes, you’re right, that’s what I want to do, to have two different memberlists that can be displayed separately on two different pages.

    Your solution seems to work just fine on your website. I would prefer it if there was a way to filter the members directly in the members loop for instance, but your way is pretty interesting too.

    Does the ?s=xxx thing work by default on Buddypress or do I have to code it myself ? I’m kind of a beginner with Buddypress and I’m not really good in PHP, so the easier the better :)


    nickmclennan
    Member

    @nickmclennan

    Hey noizeburger, also interested in achieving something similar to your site. Can you give us details on how to do it?


    Joffrey Quillet
    Member

    @jaykyuu

    Noizeburger, I’ve been testing your solution for a few days now and it’s working great. I’ve also found a way to improve it slightly, and I’m pretty sure a good PHP developer could improve it even more. Let me explain:

    With your solution, the search is made on the term “band” for instance. But if people who have another type of profile have the word “band” in ANY field of their profile, the search will find them anyways. So I thought it is possible to write a script that hides the unwanted results. I used Javascript but I’m pretty sure it would be better in PHP.

    In order to do that, I added a PHP line that includes the profile type field in the search result. Then with Javascript, I parse that line and, depending on the URL of the page, I give different classes to search results. For instance, if I was on the “band” page, I give all the “bar” profiles a CSS class that hides them. Works perfectly.

    There is a problem though: since the unwanted profiles are just hidden but still exist in the HTML code, the loop counts them anyway and so the search results count does not match the number of profiles that are displayed.


    josh101
    Participant

    @josh101

    This looks interesting wish I was better with code so I could help. I like to be able to separate users by team. What Ive been doing so far is used the verified user plugin it now let you change the word verified to what ever you want on a per user bases.This way I can show who does want on the site.


    Alan
    Member

    @uloga

    @noizeburker schaut gut aus :)


    Bowe
    Participant

    @bowromir

    Something which can also be extremely helpful for everyone in this topic is the BP Profile Search plugin :-)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘2 profile types and 2 “members” pages’ is closed to new replies.
Skip to toolbar