Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Tony G
    Participant

    @starbuck

    We’re on the same page. I think this is the right direction. I believe relevant filter hooks for bbPress include bbp_get_displayed_user_field( ‘name’ ), bbp_get_current_user_name, etc. Within a hook I can get a name from an XProfile field.

    I’ll continue to look in this direction – and I have a lot to learn.

    Thank you very much for your time and patience.


    Tony G
    Participant

    @starbuck

    Well, group meta allows meta data to be applied to groups. I’m thinking along the lines of data in the usermeta table which is only consumed by specific groups. This might be expressed as a name/value pair in the profile. So with reference to my original example, a GroupName profile value would include:
    school:Robert
    home:Bobby
    coolGame:Zarcon

    The BuddyPress Profile Shortcodes plugin allows for custom fields and related shortcodes to be used. This is much closer to my needs but still not quite there. I can’t create a profile field for every possible group. Ideally there would be a pulldown of groups to which the user belongs, where they can enter the name they wish the use for that group, and the group/name pairs would be displayed in a grid.

    Now I’m thinking one of the better user meta plugins could handle that. But I would also need to customize it so that there can only be one WP user with a specific value for a specific group. This is a unique key per group, as some reference to @Bobby can’t apply to more than one person, but the @Bobby in one group can be different from @Bobby in another group.

    On the client side, I would then need to modify bbPress to get the user name that’s specifically for the current group, rather than using wp_get_current_user()->display_name or whatever it has there. For example:
    get_user_meta($user_id,’groupName_’.$group_id,true)
    or better
    get_user_meta($user_id,’groupNames’,false)[$group_id]

    Actually I’d rather abstract all requests for a user name to a function which can then be replaced with custom code just once. I don’t suppose anyone has already done that, or it’s been proposed as a BP/BBP enhancement?

    I’m a noob with coding into WP, haven’t touched BP/bbP, and know little about the APIs, so please bear with me on the syntax and other specifics and focus on the concepts. Thanks.

    The more I try to flesh it out above the more it seems possible for me to do this myself. But it would be really helpful if someone has already done it. Or if someone with knowledge in this area can see a more direct line from an exiting plugin to the solution I’m describing.

    Thanks for your time!!


    Tony G
    Participant

    @starbuck

    Agreed on no duplication, but after a week with no response I figured it was time to bump or try elsewhere. 🙂

    I’m a developer for more decades than I should admit here, though not a PHP stud. If anyone can point me to a plugin that does something along these lines, I might be able to look at integrating between BP plugin and BP core. I’m thinking a plugin for custom fields would at least provide the storage location for a group-oriented name, plus other fields for group-specific data. So thanks for your response, Shane, and I’m hoping others will still feel welcome to respond as well.

    Shane, I don’t know if you can move topics as a mod, (I know you can delete 🙂 ) but might this be better over at HowTo rather than Installation? More eyes, more a appropriate? Thanks.


    Tony G
    Participant

    @starbuck

    Please advise if this posting was mis-placed, incomplete, or simply clueless. I’m just getting familiar with these mods and this specific community so I might not have provided the right information in the right location.

    To rephrase: I know BP groups existing WP users. But individuals have a different identity in different social groups. At school the teacher might call a guy Robert, at home he’s Bobby, to friends he’s Bob, and to his gaming friends he’s Zarkon. If this individual is logged into WP with a single email address, can we have groups where he can be identified with his preferred group name?

    Thanks!!

Viewing 4 replies - 1 through 4 (of 4 total)
Skip to toolbar