Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="online">
- <?php
- global $bp;
- function check_is_user_online($user_id){
- if ( bp_has_members( 'type=online&include='.$user_id) ) return true;
- else return false;
- }
- $this_id = bp_displayed_user_id();
- $is_online = check_is_user_online($this_id);
- if ($is_online) echo "<img src='http://www.yourweb.com/wp-content/themes/yourtheme/_inc/images/online.png' />";
- else{ echo "<img src='http://www.yourweb.com/wp-content/themes/yourtheme/_inc/images/offline.png' />";}
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement