Just want to chime in again:
In the WP database the table wp_users is where the registry date is. The column is user_registered and I probably need how I would like the date to show?
I am no programmer, so just have a vague idea how to get the info:
Probably get the user’s ID, then get the date from the table/ column and row, and then print it in a certain date output?
bump
very interested in this both things
To get register date i’m using:
echo 'Member since: '.date("Y/m/d", strtotime(get_userdata(bbp_get_reply_author_id())->user_registered));
Still working to show post count, soon i’ll get it 😉
For right now, you can use the bbp_get_user_topic_count_raw
and bbp_get_user_reply_count_raw
functions, respectively. These will eventually be replaced with cached functions, probably using usermeta to keep the counts.
<?php
echo '<br>Replies: '.bbp_get_user_reply_count_raw(bbp_get_reply_author_id());
echo '<br>Topics: '. bbp_get_user_topic_count_raw(bbp_get_reply_author_id());
?>
Output:
Replies: 3
Topics: 2
or use
echo 'Messages: ';
echo bbp_get_user_reply_count_raw(bbp_get_reply_author_id()) + bbp_get_user_topic_count_raw(bbp_get_reply_author_id());
Output:
Messages 5
Hi all, and thanks to @koebdb for tricks, but i have a little question, read this:
<?php
echo '<br>Messages: '.bbp_get_user_post_count(bbp_get_reply_author_id());
?>
This function exist in includes/users/options.php, is written to show all messages from one users, but if you use it return 0…. WHY?
This is the function:
/**
* Output a users total post count
*
* @since bbPress (r3632)
*
* @param int $user_id
* @param boolean $integer Optional. Whether or not to format the result
* @uses bbp_get_user_post_count()
* @return string
*/
function bbp_user_post_count( $user_id = 0, $integer = false ) {
echo bbp_get_user_post_count( $user_id, $integer );
}
/**
* Return a users total post count
*
* @since bbPress (r3632)
*
* @param int $user_id
* @param boolean $integer Optional. Whether or not to format the result
* @uses bbp_get_user_id()
* @uses get_user_option()
* @uses apply_filters()
* @return string
*/
function bbp_get_user_post_count( $user_id = 0, $integer = false ) {
// Validate user id
$user_id = bbp_get_user_id( $user_id );
if ( empty( $user_id ) )
return false;
$topics = bbp_get_user_topic_count( $user_id, true );
$replies = bbp_get_user_reply_count( $user_id, true );
$count = (int) $topics + $replies;
$filter = ( true === $integer ) ? 'bbp_get_user_post_count_int' : 'bbp_get_user_post_count';
return apply_filters( $filter, $count, $user_id );
}
Now i have used the second of koendb and it works fine…