Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Submitting the form doesn’t seem to actually filter the results. Anyone have this working or know what we’re doing wrong?

    Thanks for your help everyone!

    OK, I think I have it working, however its not super desirable. I had to add 4 filters (and corresponding custom functions) in bp-custom.php and I also had to modify bp_core_get_user_displayname in bp-core.php. Adding a filter for it doesn’t do the trick because the passed in $user_id_or_username gets modified by the function the first time it is run in the core, and when using the filter $user_id_or_username actually contains the displayname, not the id or username.

    so I now have the following entries in bp-custom.php:

    // also had to modify bp_core_get_user_displayname in bp-core.php

    add_filter('bp_get_member_name','my_bp_get_member_name');

    add_filter('bp_get_group_member_link','my_bp_get_group_member_link');

    add_filter('bp_get_the_topic_last_poster_name','my_bp_get_the_topic_last_poster_name');

    add_filter('bp_get_the_topic_post_poster_name','my_bp_get_the_topic_post_poster_name');

    It would be great if:

    1. bp_core_get_user_displayname was used by all other functions that need a display name (currently I have to re-define the 4 additional functions above).

    2. bp_core_get_user_displayname could be changed in the filter and not the core (as explained above).

    Thoughts?

    Hi Ray,

    That will return the info for the logged in user only. Let me give a clear example:

    I am looking at the “members” page that lists 10 members. I want to write a function that will manipulate the names displayed on the members page for those 10 members.

    Neither loggedin_user or displayed_user is what I want.. does that make sense?

    Hi Ray,

    That will return the info for the logged in user only. Let me give a clear example:

    I am looking at the “members” page that lists 10 members. I want to write a function that will manipulate the names displayed on the members page for those 10 members.

    Neither loggedin_user or displayed_user is what I want.. does that make sense?

    Hi etiviti,

    $bp->displayed_user->id works if I’m calling the function on a profile page, however if I load the buddypress homepage or activity stream for example, displayed_user no longer works because I’m not looking at a user profile. I want a way to be able to know the id of the user in question regardless of what page I’m on, so that their name can be manipulated by my function on every page. Any ideas?

    Hi etiviti,

    $bp->displayed_user->id works if I’m calling the function on a profile page, however if I load the buddypress homepage or activity stream for example, displayed_user no longer works because I’m not looking at a user profile. I want a way to be able to know the id of the user in question regardless of what page I’m on, so that their name can be manipulated by my function on every page. Any ideas?

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