Navigation

Search

ssi_whosOnline

Description

Displays a list of users online or returns an array of this information, depending on output_method.

Syntax

void ssi_whosOnline ([array $output_method])



Parameter $output_method

Expected type: Array
Description: The output method - 'echo' to display the results of the function or anything else to return an array.

Array Elements of $output_method
Key Optional Expected type Description
buddies no Integer (1.1 only) How many of a member's buddies are online
guests no Integer The total number of guests online
hidden no Integer The number of hidden users who are online (0 if none)
num_users no Integer The total number of users online (including hidden users (also includes buddies in 1.1))
total_users no Integer The grand total of all types of users online (users, hidden users, guests (and in 1.1, buddies, if applicable))
users no Array of arrays An array of arrays with information about the users who are online (key is logTime with username appended): id (member ID), username, name (display name), group (primary group ID or 0 if they don't have one), href (URL to user's profile), link (link to user's profile [in 1.1, this is bold if this user is on the current member's buddy list]), hidden (whether or not the user has chosen to hide their online status), is_last (whether or not this is the last item in the array)


Notes

  • This function will not log online presence, so if a user has not visited the board prior to calling this function, they will not be shown in the list.
  • Use ssi_logOnline if you wish to log the users' online presence as well.
  • The ability to view hidden users depends on the moderate_forum permission (another instance where you might get different results with ssi_logOnline...)
  • The "hidden" option in the users array will always be false for those who can't see hidden users...
View all versions of this function