SHARE
TWEET

Who is on

Naijaping May 28th, 2013 95 Never
  1. <div id="online">
  2. <?php
  3. global $bp;
  4. function check_is_user_online($user_id){
  5. if ( bp_has_members( 'type=online&include='.$user_id) ) return true;
  6. else return false;
  7. }
  8. $this_id = bp_displayed_user_id();
  9. $is_online = check_is_user_online($this_id);
  10. if ($is_online) echo "<img src='http://www.yourweb.com/wp-content/themes/yourtheme/_inc/images/online.png' />";
  11.  
  12. else{ echo "<img src='http://www.yourweb.com/wp-content/themes/yourtheme/_inc/images/offline.png' />";}
  13.  
  14. ?>
  15. </div>
RAW Paste Data
Top