Forums

Join
bbPress Support ForumsPluginsShow User Registration Date

Info

Show User Registration Date

  1. Hello bbP community,

    I'm looking for the syntax to display the User Registration Date, e.g. under the User Name. I'm not interested in post counts for my forum so this would be a nice replacement.

    Thanks
    Lars

  2. Hmm, still didn't figure out the syntax for this. :(

  3. You didn't mention what version you're using.

    But, in my old version and in the latest trunk, bb-admin/admin-functions.php contains "bb_user_row" which returns the date the member registered: you can see it in the admin screen for managing users. I imagine duplicating or using that function would get you the the date of registration.

    And when viewing a member profile, the "Member Since" text appears there also, with a more nicely formatted date (no time.) If you look at how the date is displayed there I bet you could get it to display where you want.

  4. Hi chris and thank you for your suggestion.
    I looked into the function you mentioned in template_functions.php which would be around here:

    function bb_profile_data( $id = 0 ) {
    	if ( !$user = bb_get_user( bb_get_user_id( $id ) ) )
    		return;
    
    	$reg_time = bb_gmtstrtotime( $user->user_registered );
    	$profile_info_keys = get_profile_info_keys();
    	echo "<dl id='userinfo'>\n";
    	echo "\t<dt>" . __('Member Since') . "</dt>\n";
    	echo "\t<dd>" . bb_datetime_format_i18n($reg_time, 'date') . ' (' . bb_since($reg_time) . ")</dd>\n";

    The problem is that this functions gets the data from the currently logged in user, or so I would assume, given that it's the data for that specific profile.
    But in order to display the registration date for each user in a topic I'd need to call the data for each user individually.

  5. You must log in to post.