Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to add "View Who's Online" and "View Statistics"?


  • AlexiousRahl
    Participant

    @alexiousrahl

    Hello. I’m about to launch my customized WordPress/bbPress/BuddyPress platform; it’s a quite large undertaking and eventually we decided for this, even though bbPress is a bit lacking in some aspects when compared with similar forum software, but we went for it since it granted more compatibility with WP/BP.

    Anyway, I noticed an image today with Forum Statistics and Online Users List, something that I thought was not possible with bbPress. Here it is:

    Can anyone of you tell me how can we do the same? Thanks in advance!

Viewing 16 replies - 1 through 16 (of 16 total)

  • Stephen Edgar
    Moderator

    @netweb

    There is a new shortcode and widget for bbPress stats in the upcoming bbPress 2.3


    jezza101
    Participant

    @jezza101

    The new shortcode is:

    [bbp-statistics]

    Is it possible to style this or control which stats are visible? For example “empty tags” and “hidden replies” aren’t really stats to share about (are they?!)

    How is the “who’s online” done?


    Stephen Edgar
    Moderator

    @netweb

    The new shortcode is actually [bbp-stats] https://codex.bbpress.org/shortcodes/


    DJScorpion
    Participant

    @djscorpion

    Even in 2014…
    Still searching (or probably self building) a function to see if a user is online. (to display next to the name/avatar)


    Stephen Edgar
    Moderator

    @netweb

    Maybe take a look at the two example methods (Comments 14 & 16) in the bbPress trac ticket:

    https://bbpress.trac.wordpress.org/ticket/1792

    As always patches welcome :)


    DJScorpion
    Participant

    @djscorpion

    Okay I took a look but unfortunately this is way to complex for now.
    How can it be that there’s nothing equal out there? o.O The bbp-stats is not that cool..


    qlymax
    Participant

    @qlymax

    If you download the buddypress plugin, there will be a widget called: Who’s online ..

    That’s a easy solution for now.

    https://codex.buddypress.org/buddypress-components-and-features/buddypress-widgets/


    DJScorpion
    Participant

    @djscorpion

    Well, it turns out more and more I can’t get around buddypress. Need private messaging and ssome other features too

    BUT bbpress is soooo cool by itself.


    Robin W
    Moderator

    @robin-w

    Just had a two minute play with

    https://wordpress.org/plugins/wp-useronline

    Looks like it would sort your who’s on line.


    Skisma
    Participant

    @skisma

    @alexiousrahl Do you have a way to find out the link to the website in the example image you provided? Whoever owns that site clearly knows how to set it up.


    jmodine
    Participant

    @jmodine

    It looks like its a second footer widget area. I would edit the footer file in your child theme to do this and then inline custom css to take care of it. you would need to reference content-statstics.php to include the different pieces for stats in the footer.

    for example if you place this inbetweent your <footer> and </footer> you ahouls have desired effect.

    <div style=”width:66%; float:Left;”>
    <?php get_sidebar( ‘footer’ ); ?>
    </div>
    <div style=”width:33%; float:right;”>
    <?php $stats = bbp_get_statistics(); ?>
    <table style=”border-width:3px” >
    <tbody>
    <?php do_action( ‘bbp_before_statistics’ ); ?>
    <tr>
    <th><li class=”blue-bullet”><?php _e( ‘Registered Users’, ‘bbpress’ ); ?>:

    <?php echo esc_html( $stats[‘user_count’] ); ?>
    </th>

    <th><li class=”blue-bullet”><?php _e( ‘Forums’, ‘bbpress’ ); ?>:

    <?php echo esc_html( $stats[‘forum_count’] ); ?>

    </th>
    </tr>
    <tr>
    <th><li class=”blue-bullet”><?php _e( ‘Topics’, ‘bbpress’ ); ?>:

    <?php echo esc_html( $stats[‘topic_count’] ); ?>
    </th>

    <th><li class=”blue-bullet”><?php _e( ‘Replies’, ‘bbpress’ ); ?>:

    <?php echo esc_html( $stats[‘reply_count’] ); ?>
    </th>

    <?php do_action( ‘bbp_after_statistics’ ); ?>

    </tr></tbody></table>

    <?php unset( $stats ); ?>

    Now you will have to play with height box text size and add some custom css to your your style.css to get the bullets i added this right here.

    ul.blue-bullet li {
    color: blue;
    }

    and all that did is define the color of my custom bullets.

    Then for users get the widget that is already included added to your footer sidebar. you should be good.


    jmodine
    Participant

    @jmodine

    I guess I should have tested that code before I posted it. This gets it in the footer but I cant seem to get the blue bullets this way (although they are there) I even tried placing the

      tag first just in case it needed that which didn’t do it. Also I cant seem to adjust the font size in the footer either. So the table boxes wont increase to fill the footer. I will play with it. See if i can’t come up with a better solution

    AlexandruIoan
    Participant

    @alexandruioan

    Try to use a plugin, search for ” statistics plugin or who’s online plugin ” or use this new short code : [bbp-statistics] .
    You welcome!


    Skisma
    Participant

    @skisma

    @jmodine thanks for help man! Please let me know if you come up with something better. I’ll try this out and see what happens, any chance you can attach a screenshot of what the end result looks like?

    @alexandruioan I’ve searched already and there’s not really anything as detailed as the OP’s image.


    Robkk
    Participant

    @robkk

    @skisma i think that was just a mockup from this website in the link below

    and the author of this topic just stumbled upon it.

    http://www.sitepoint.com/forums/showthread.php?630149-bbPress-theme-project-Design-wireframe-UI/page3

    and since this is from 2009 it is most likely the bbpress standalone version 1.0x and such

    but you could accomplish close to the same result using wp-usersonline plugin and also the inbuilt stats shortcode and just a little bit of CSS.

    create a new topic about this though.


    Andrew Breksa
    Participant

    @abreksa4

    Check out bbp user online status (https://wordpress.org/plugins/bbp-user-online-status/) a plugin I recent wrote to add online/offline statues to bbpress topics/replies.

Viewing 16 replies - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.