Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of hnla

Help : Friends online widget (8 posts)

Started 1 year, 11 months ago by: gwu123

  • Profile picture of gwu123 gwu123 said 1 year, 11 months ago:

    Hi Guys,

    I have modified the “Who’s Online avatar” widget to “Friends Online avatar” using the code below. This works fine for all users except the admin. For admin all the users are listed. Any idea wats worng.

    <?php if ( bp_has_members( ‘user_id=’ . bp_loggedin_user_id() . ‘&type=online&per_page=’ . $instance['max_members'] . ‘&max=’ . $instance['max_members'] . ‘&populate_extras=0′ ) ) : ?>
    <div class=”avatar-block”>
    <?php while ( bp_members() ) : bp_the_member(); ?>
    <div class=”item-avatar”>
    ” title=”<?php bp_member_name() ?>” alt=”<?php bp_member_name() ?>”><?php bp_member_avatar() ?>
    </div>
    <?php endwhile; ?>
    </div>
    <?php else: ?>

    <div class=”widget-error”>
    <?php _e( ‘There are no users currently online’, ‘buddypress’ ) ?>
    </div>

    <?php endif; ?>

    Thanks

  • Profile picture of Marcus Marcus said 1 year, 11 months ago:

    I’m working on modifying this right now. The code you put in here is mangled though (wrap it in backticks). I can’t see what differs from this and the original widget?

  • Profile picture of Marcus Marcus said 1 year, 11 months ago:

    I’ve modified the Who’s Online Avatar and created a “Friends Online Avatar” widget, with an added option for setting the widget title.

    You can get it from:

    http://files.netweblogic.com/widget-friends-online.zip

  • Profile picture of gian-ava gian-ava said 1 year, 10 months ago:

    Hi Marcus, can you tell me what exactly this widget does?

    And if yuo can use it only as a widget or as an include in template files?

    Thanks.

    Actually I was looking for a simple snippet to show who’s online. Can’t believe I can’t put my hands on it!

  • Profile picture of stwc stwc said 1 year, 10 months ago:

    Is this what you’re looking for (and gwu123 has recreated)?

    http://wpmu.org/new-plugin-available-buddypress-my-friends-widgets-download-here/

  • Profile picture of stwc stwc said 1 year, 10 months ago:

    Actually I was looking for a simple snippet to show who’s online.

    Unless I’m mistaken, the ‘Who’s Online Avatars’ widget is part of the default Buddypress install.

  • Profile picture of Marcus Marcus said 1 year, 8 months ago:

    Sorry for late reply, the widget I made is a proper WP widget that you can manage in the wordpress widgets section and it’ll show who’s online. It works just like the default who’s online widget, but it’ll only show your friends. I updated it with the version I have working on my site with latest buddypress installation.

    http://files.netweblogic.com/widget-friends-online.zip

  • Profile picture of anindyaray anindyaray said 1 year, 5 months ago:

    I have tested this in localhost with BP 1.2.5.2 / WP 3.0.1 …. firstly it showed warning and crashed , then by adding the plugin name to the file it seems to work fine.

    @netweblogic Thanks