Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing what memberlist plugin displays.

  • @brampamp

    Member

    I’m very new to bbPress and am trying to list all members but I want to display specific information. I have installed the memberlist plugin which works brilliantly. However it displays User, Homepage and join date. I would much prefer to see user, location, occupation and interests.

    I assume this would be the SQL created by the memberlist plugin but I’m a bit of a noob when it comes to SQL so any help would be great.

    I would also like to rename (just for display purposes) ‘interests’ to ‘skills’ on the profile pages and wherever else it might be displayed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @ardentfrost

    Member

    One day I plan to add options such as these to an admin interface, but for the time being, you just gotta do it by hand.

    Of course, the trick to that is pulling out the information. get_profile_info_keys seems like it should pass you back an array of those values and you can just get them out of there, except I haven’t attempted to use that function and since it doesn’t ask for any information about the user you’re interested in, I don’t know how to tell you to get the information from that seemingly useful function.

    Which takes us to my personal favorite method: SQL commands. You’d be searching through the table bbprefix_usermeta (mine is bbpress_usermeta). Setup a SQL call like this:

    $result = $bbdb->get_results("SELECT * FROM $bbdb->usermeta WHERE user_id = $id");

    where $id is the id of the person you’re interested in and $result is the object that the person’s data will be loaded into.

    Then to access the information, you’d simply call it like this (like, for the example of where the user is from):

    $result->from

    You can echo that to have it printed or whatever you want done with that information. A quick glance at the database tells me that you can call this information (and what it means):

    “from” = location

    “occ” = occupation

    “interest” = interests

    “bbpress_title” = the title, custom or default

    You’d have to make a subroutine in bb-memberlist.php in the my-plugins directory to get $result, then use the information in memberlist.php.

    Sorry I can’t do more for you than this, but I used information from the table I had already gotten results from for ease in my current release. I could have added more stuff, but then some people might not have wanted them plus it’s easy to add or subtract from information users put in when they sign up and blah blah blah…. one day I’ll make it nice via the admin panel, but for now, good luck :)

    @trent

    Member

    Ardentfrost you are doing a great job. Your plugins are a great addition to not only this community, but all users of bbPress. I would imagine that you will do great on these plugins and other additions.

    Trent

    @ardentfrost

    Member

    Thanks Trent ;)

    I just wish I had more time to upgrade the existing plugins and make new ones. At least my 5 are ready for .80

    @brampamp

    Member

    Thanks very much ardenfrost, that’s given me a great start point. It’ll be a few days until I can try it but i’ll let you know how it goes.

    Thanks again

    @ardentfrost

    Member

    Just ask if you have anymore questions. Feel free to post up code that isn’t working also ;) There are a few of us who can help you with it.

    @brampamp

    Member

    I’ve taken the bb_profile_data() function and incorporated it into bb-memberlist.php as bb_member_profile_data() – I’ve tweaked it just a little to incorparate the email address and take out length of membership but other than that it’s the same.

    I call it using

    bb_member_profile_data($member->ID);

    from within the table created in the memberlist.php file. I’ve left all the other code the same apart from removing some table columns that were not needed.

    Thanks again for your help and pointing me in the right direction.

    Let me know if you would like to see the exact code.

    @ardentfrost

    Member

    That sounds fine dude. One of these days I”ll get around to adding in an admin panel for it :)

    I also want to turn the web link into a pic in the next release so that spammers no longer break the size of the table

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar