Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member since

  • Is there any function to call for “member since” for each user? I would like to put it into user profile page. Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • https://buddypress.org/community/groups/buddypress-member-profile-stats/ will display a member since (ie, nuprn1 has been a member for 3 months, 3 weeks. )

    Thanks a lot!

    Before I had try to use get_user_details but it doesn’t work with BP :


    KatyP
    Member

    @katyp

    I’d like to show “member since” [date] rather than “member since 6 days ago.”

    Does anyone know how to do this?

    I’d also like to show “member since” without showing status update count, but these two are bundled under one checkbox in the admin panel.


    KatyP
    Member

    @katyp

    This is for everybody who wants to edit the BuddyPress Member Profile Stats plugin so that it will read “[username] has been a member since [date]” instead of “[username] has been a member since [x] days ago.”

    #1. Open buddypress-member-profile-stats/bp-member-profile-stats.php in the Editor

    #2. Find where it reads:

    `apply_filters( ‘etivite_bp_member_profile_stats_get_member_registered’, esc_attr( bp_core_time_since( $bp->displayed_user->userdata->user_registered ) ) );`

    #3. Paste in this right underneath it:

    `function etivite_filter_override_member_registered( $content ) {
    global $bp;

    return date( “F j, Y”, strtotime( $bp->displayed_user->userdata->user_registered ) );
    }
    add_filter(‘etivite_bp_member_profile_stats_get_member_registered’,’etivite_filter_override_member_registered’);`

    I made a further modification. I didn’t want it to read [username]. At first I thought I’d change it to FirstName Last Name, but then I decided that I just wanted it to read that they joined my site on that date. Here’s what I did.

    I found where it reads:

    `function etivite_bp_member_profile_stats_get_member_since() {
    return ‘

    ‘. bp_get_displayed_user_username() .’‘. __( ‘ has been a member for ‘, ‘bp-member-profile-stats’ ) .’‘. etivite_bp_member_profile_stats_get_member_registered() .’.

    ‘;`

    And I changed it to:

    `function etivite_bp_member_profile_stats_get_member_since() {
    return ‘

    ‘. __( ‘ Joined … on ‘, ‘bp-member-profile-stats’ ) .’‘. etivite_bp_member_profile_stats_get_member_registered() .’.

    ‘;
    }`

    where … is the name of my site.

    Hope this helps whoever is looking for this type of modification! :D Best of luck to everyone out there!


    Prestonty
    Member

    @prestonty

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Member since’ is closed to new replies.
Skip to toolbar