levani01
Member
Posted 3 years ago #
How can I show whether the user is online or not. Just like on message boards and web messengers add green button next to his name on single post page if the user is online and red button if he's offline (or something like this :) )
Is it possible?
Thanks
levani01
Member
Posted 3 years ago #
This plugin is really perfect but I don't want to show the list of all online users. I just want to show whether the post author is online or not on single post page.
yeap, how could we check wheather user is online in some loop using user_id or not? quite a simple query i think..
if(is_user_logged_in()) :
global $current_user;
get_currentuserinfo();
echo $current_user->display_name;
/* green button stuff here */
else :
/* offline stuff */
endif;