bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

trick for profile page -> add user post and topic count

(2 posts)
  • Started 1 year ago by _ck_
  • Latest reply from outchy
  • This topic is not resolved

No tags yet.

  1. Since bbpress.org doesn't have a "tips and tricks" I'll post this here.

    If you'd like to tweak your profile.php template to show the total posts and topics started by a user, add this code under "bb_profile_data()"

    <?
    echo "forum posts: <b>".$bbdb->get_var("SELECT COUNT(*) FROM bb_posts WHERE poster_id = $user_id AND post_status = 0")."</b> &nbsp; "
     ." topics started: <b>".$bbdb->get_var("SELECT COUNT(*) FROM bb_posts WHERE poster_id = $user_id AND post_status = 0 AND post_position = 1")."</b>";
    ?>

    I'd make this into a plugin but I don't know how to append information within the profile (ie. attach to bb_profile_data)

    Posted 1 year ago #
  2. awesome, just what i was looking for! thanks :)

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.