Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

wpForo 1.x.x [Closed] Online Members Widget

5 Posts
4 Users
0 Reactions
3,557 Views
Posts: 237
Topic starter
(@mrsamg)
Reputable Member
Joined: 9 years ago

Online Members Widget shows avatars with a square boarder around them. This isn't how the avatars show in the other widgets. Can this be corrected? I've using a white theme and the black square boarder stands out. 


4 Replies
Robert
Posts: 10606
Admin
(@robert)
Support Team
Joined: 10 years ago

I see it looks as designed:

https://wpforo.com/docs/root/getting-started/forum-sidebar-and-widgets/wpforo-widgets/

In any case if you want to remove the grey square boarder just please use this CSS code:

#wpf-widget-online-users .wpforo-widget-content a.onlineavatar {border: none!important;}

Posts: 237
Topic starter
(@mrsamg)
Reputable Member
Joined: 9 years ago

Yes, that worked!


Posts: 1
(@stefano)
New Member
Joined: 6 years ago

Hi, i have a problem

Even if i set with no selections the read only option on usergroups and on forum access the widget show the member online of my private forum. There is a bug ?

Thanks


Posts: 113
(@nando4)
Estimable Member
Joined: 9 years ago

Widget code has bug - there is a misplaced DIV when there are no online members:

	public function widget( $args, $instance ) {
echo $args['before_widget']; //This is a HTML content//
echo '<div id="wpf-widget-online-users" class="wpforo-widget-wrap">';
if ( ! empty( $instance['title'] ) ) {
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
}
$groupids = ( !empty($instance['groupids']) ? array_filter( wpforo_parse_args( json_decode($instance['groupids'], true) ) ) : WPF()->usergroup->get_visible_usergroup_ids() );
// widget content from front end
$online_members = WPF()->member->get_online_members($instance['count'], $groupids);
echo '<div class="wpforo-widget-content">';
if(!empty($online_members)){
echo '<ul>
<li>
<div class="wpforo-list-item">';
foreach( $online_members as $member ){
if( $instance['display_avatar'] ): ?>
<a href="<?php echo esc_url(WPF()->member->get_profile_url( $member['ID'] )) ?>" class="onlineavatar">
<?php echo WPF()->member->get_avatar( $member['ID'], 'style="width:95%;" class="avatar" title="'.esc_attr($member['display_name']).'"'); ?>
</a>
<?php else: ?>
<a href="<?php echo esc_url(WPF()->member->get_profile_url( $member['ID'] )) ?>" class="onlineuser"><?php echo esc_html($member['display_name']) ?></a>
<?php endif; ?>
<?php
}
echo '<div class="wpf-clear"></div>
</div>
</li>
</ul>';
// nando4>> bug in widget - move div that was here below
}
else{
echo '<p class="wpf-widget-note">&nbsp;'.wpforo_phrase('No online members at the moment', false).'</p>';
}
echo '</div>';
echo '</div>';
echo $args['after_widget'];//This is a HTML content//
}