Skip to:
Content
Pages
Categories
Search
Top
Bottom

Providing additional Info in userlist


  • medani
    Participant

    @medani

    Dear developers, dear community,

    first of all I’d like to thank you for your great work. I’ve got a little question concerning about how to provide / display additional infos in the userlist. In the registration process, we’ve added 2 required fields “Country” and “Town”, which we’d like to display in the userlist.

    I now tried to use the BP members loop in the members-loop.php file but didn’t manage to get either the user ID nor the 2 specific fields.

    Many thanks in advance!

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

  • stwc
    Participant

    @stwc

    I’ve been trying like crazy to get that happening with some success, but some very wonky failure too, that I have been totally unable to track down.

    For example, in my childtheme’s members-loop.php, after [?php do_action( ‘bp_directory_members_item’ ) ?]

    I’ve added a div with

    [span]Website: [a href=”[?php bp_member_profile_data(‘field=Website’); ?]”][?php bp_member_profile_data(‘field=Website’); ?][/a][/span]

    which works fine.

    What I’ve totally been unable to do is to display that span conditionally based on whether the field has data or not. Not sure if it’s a bug or if I’ve been trying the wrong things.


    medani
    Participant

    @medani

    thanks a lot, stwc, that did the trick :)

    i’ve tried now to count the symbols in the receiving string via strlen(), but bp_member_profile_data() already provides the “echo” – i’m sorry, can’t help you on this (first buddypress project of mine) :/

    @stwc You could do something like: http://buddypress.pastebin.com/5WBGMCuU

    @medani use bp_get_member_profile_data()


    stwc
    Participant

    @stwc

    Thanks, Paul, I’ll try that tomorrow!


    medani
    Participant

    @medani

    thx a lot, paul for your tip – that worked well :) !!

    i’ve got another question concerning the sort options. i’d like to make it possible for visitors to sort for “country” (a required filed of our registration process) in the groupmember overview. are there any things that i should keep in mind on doing this !?

    thanks, chris

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Providing additional Info in userlist’ is closed to new replies.
Skip to toolbar