Info
- 4 posts
- 2 voices
- Started 3 years ago by Nekita
- Latest reply from Nekita
- This topic is not resolved
Show User Registration Date
-
- Posted 3 years ago #
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 -
- Posted 3 years ago #
Hmm, still didn't figure out the syntax for this. :(
-
- Posted 3 years ago #
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.
-
- Posted 3 years ago #
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. -
You must log in to post.