Skip to:
Content
Pages
Categories
Search
Top
Bottom

Help : Friends online widget

  • Profile photo of gwu123
    gwu123
    Participant

    @gwu123

    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • Profile photo of Marcus
    Marcus
    Participant

    @netweblogic

    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 photo of Marcus
    Marcus
    Participant

    @netweblogic

    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 photo of gian-ava
    gian-ava
    Participant

    @gian-ava

    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 photo of stwc
    stwc
    Participant

    @stwc

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

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

    Profile photo of stwc
    stwc
    Participant

    @stwc

    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 photo of Marcus
    Marcus
    Participant

    @netweblogic

    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 photo of anindyaray
    anindyaray
    Member

    @anindyaray

    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Help : Friends online widget’ is closed to new replies.