SHARE
TWEET

r-a-y

a guest May 8th, 2010 559 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function my_member_username() {
  2.         global $members_template;
  3.        
  4.         return $members_template->member->user_login;
  5. }
  6. add_filter( 'bp_member_name' , 'my_member_username' );
  7.  
  8. function my_bp_displayed_user_fullname() {
  9.         global $bp;
  10.        
  11.         return $bp->displayed_user->userdata->user_login;
  12. }
  13. add_filter( 'bp_displayed_user_fullname' , 'my_bp_displayed_user_fullname' );
  14.  
  15. // the following function requires a core hack @ bp-activity/bp-activity-templatetags.php on line 578
  16. // change:
  17. // apply_filters( 'bp_get_member_name', $comment->user_fullname )
  18. // to:
  19. // apply_filters( 'bp_get_member_name', $comment->user_fullname, $comment )
  20. function my_get_member_name($name, $comment) {
  21.         return $comment->user_login;
  22. }
  23. add_filter( 'bp_get_member_name' , 'my_get_member_name', 1, 2 );
  24.  
  25. function my_bp_get_activity_action($action, $activity) {
  26.  
  27.         $displayed_user = bp_core_get_core_userdata( $activity->user_id );
  28.                
  29.         return str_replace( $displayed_user->display_name, $displayed_user->user_login, $action );
  30.  
  31. }
  32. add_filter( 'bp_get_activity_action', 'my_bp_get_activity_action', 1, 2 );
  33.  
  34. function my_bp_get_the_topic_post_poster_name($name) {
  35.         global $topic_template;
  36.        
  37.         return str_replace($topic_template->post->poster_name, $topic_template->post->poster_login, $name);
  38. }
  39. add_filter( 'bp_get_the_topic_post_poster_name' , 'my_bp_get_the_topic_post_poster_name' );
  40.  
  41. function my_bp_get_the_topic_last_poster_name($name) {
  42.         global $forum_template;
  43.        
  44.         return str_replace($forum_template->topic->topic_last_poster_displayname, $forum_template->topic->topic_last_poster_login, $name);
  45. }
  46. add_filter( 'bp_get_the_topic_last_poster_name', 'my_bp_get_the_topic_last_poster_name' );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top