contact the plugin author
I did but unfortunately it seems that he does not offer support.
I’m trying to find where bbp-author-name is created and perhaps I can do something.
@aleksderfar
the plugin is still fresh it was uploaded to the WordPress repository 5 days ago.
making the online status location configurable seems to be on the developers to-do list.
i did see that the plugin author did reply back though.
and you did figure how to show the green/red icon , so if you could tell him how you did it to help with future development of the plugin.
Nice plugin. I did it manually in bbPress profile screen and BuddyPress screen, with SVG Wifi colored icons. Not easy to explain how, different files involved.
But for topic user info could not manage it. Different queries.
@stagger-lee
if you could im sure that will help other users even the developer.
Cannot post it. Fix this stupid filter. What is this ?
Cannot post same comment on some other topic either. Duplicate content warning.
remove the http:// when you go past 2 links.
functions.php:
/**
* webdeveloperswall.com/buddypress/check-if-a-user-is-online
**/
function is_user_online($user_id, $time=5){
global $wp, $wpdb;
$user_login = $wpdb->get_var( $wpdb->prepare( "
SELECT u.user_login FROM $wpdb->users u JOIN $wpdb->usermeta um ON um.user_id = u.ID
WHERE u.ID = $user_id
AND um.meta_key = 'last_activity'
AND DATE_ADD( um.meta_value, INTERVAL $time MINUTE ) >= UTC_TIMESTAMP()
" ,APP_POST_TYPE
));
if(isset($user_login) && $user_login !=""){
return true;
}
else {return false;}
}
pastebin.com/hEfRfKGe
members-loop-php (BuddyPress)
pastebin.com/9AyQJHBe
member-header.php (BuddyPress)
Probably the same process for bbPress alone. Cannot ruin now all to test it.
Font Awesome needs to be activated for frontend. Or more easy, activate Dashicons for frontend and use some other SVG icon.
Some CSS:
.bp-user #buddypress .online .fa-wifi {
color:green;
font-size:22px;
}
.bp-user #buddypress .offline .fa-wifi {
color:#cf4d35;
font-size:22px;
}
.bp-user #buddypress .online,
.bp-user #buddypress .offline {display:inline-block; text-align:right;float:right;}
.members #buddypress .online-list .fa-wifi {color:green; font-size:15px;}
.members #buddypress .offline-list .fa-wifi {color:#cf4d35; font-size:15px;}
#buddypress .online-list,
#buddypress .offline-list,
#buddypress .offline,
#buddypress .online {font-size:12px;}
Move all this to another topic, to not ruin this.
members-loop-php (BuddyPress)
member-header.php (BuddyPress)
Cannot make links clickable. Great advertising for bbPress forum script.
@stagger-lee
the way you did it requires BuddyPress especially the activities part of it.
still neat though, i like how you used the wifi signal for the online status icon.
You can use same function for bbPress part, I believe. It is up to you where do you want to adapt it.
Or maybe “is_user_logged_in()”:
http://wordpress.stackexchange.com/questions/34429/how-to-check-if-a-user-not-current-user-is-logged-in
Forgot about this and that I did it without buddyPress. Took code from this plugin and adapted it to my needs. But I see you already found it and adapted it self. Added some additional thing, Non logged User doesnt see online/offline icons, logged in User see them. Good to force curious people to log in.
https://wordpress.org/support/topic/show-a-red-green-circle?replies=16
https://wordpress.org/plugins/bbp-user-online-status/screenshots/